Jump to content
Mike Rockett

Analytics spam

Recommended Posts

So I'm seeing these across nearly all of my domains in Google Analytics...

1482303985361screensave.png

Anyone else gettin this? I guess there's no easy way to prevent it from happening. Or perhaps I should whitelist languages through htaccess?

  • Like 1

Share this post


Link to post
Share on other sites

I'm going to try create GA filters that only allow tracking of specific languages - that seems to be the only way to go about it, considering that these douche bags (sorry, they really are) hijack Analytics IDs. I could also use segments, but filters could workwell for this.

Share this post


Link to post
Share on other sites
19 minutes ago, elabx said:

Can confirm, no wall can stop spam.

It's almost as if I shouldn't even bother with analytics. But hey, I'll do what I can and see what happens.

Share this post


Link to post
Share on other sites

I've seen that too, hand in hand with a near doubling of new sessions in GA with arbitrary pages/view rate for last month, so this really messes up the stats. I've found some reports saying that these entries all come from Accept-Language headers (not Measurement Protocol) so it should be possible to block these requests at server level with a regex on Accept-Language that throws away anything that doesn't match the required format given in rfc7231. I'm going to take a look after Christmas hols if Akamai lets me add that such a filter in DSA. It should be relatively easy to do in Apache and NGINX, something like

RewriteCond %{HTTP:Accept-Language} !^$|\*$|([a-z]{2,3}(-[a-z]{2,3})?)(\s*,\s*[a-z]{2,3}(-[a-z]{2,3})?)*($|;) [NC]
RewriteRule ^.*$ "-" [F]

The regex isn't a complete validity check and untested yet, but it should get the job done. Might even work for a GA filter too.

  • Like 2

Share this post


Link to post
Share on other sites
11 hours ago, BitPoet said:

I've seen that too, hand in hand with a near doubling of new sessions in GA with arbitrary pages/view rate for last month, so this really messes up the stats. I've found some reports saying that these entries all come from Accept-Language headers (not Measurement Protocol) so it should be possible to block these requests at server level with a regex on Accept-Language that throws away anything that doesn't match the required format given in rfc7231. I'm going to take a look after Christmas hols if Akamai lets me add that such a filter in DSA. It should be relatively easy to do in Apache and NGINX, something like


RewriteCond %{HTTP:Accept-Language} !^$|\*$|([a-z]{2,3}(-[a-z]{2,3})?)(\s*,\s*[a-z]{2,3}(-[a-z]{2,3})?)*($|;) [NC]
RewriteRule ^.*$ "-" [F]

The regex isn't a complete validity check and untested yet, but it should get the job done. Might even work for a GA filter too.

Thanks - I have now done that for those spammers that spam through the site. Just wisg Google made it easier to run filters on GA for those that don't spam through the site/domain.

7 hours ago, fbg13 said:

Just came across this article https://kinsta.com/blog/language-spam/.

Thanks - that looks good. :-)

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...