1

I've been reading up on how to filter out spam from Google Analytics. In this case, I'm trying to filter out the spam that shows up under referrals.

In the Filter Pattern field of Analytics, I have the following:

semalt\.com|buttons-for-website\.com|rank-checker\.online|monetizationking\.net|site-auditor\.online

Yet it makes no difference to my Analytics. I've also clicked the verify link but all I get back is:

This filter would not have changed your data. Either the filter configuration is incorrect, or the set of sampled data is too small.

Am I doing something wrong?

2

Are you filtering by campaign source? Also, are those all of the spam domains that you're seeing in your referral traffic? Most of the regex I've seen for this is considerably longer and more inclusive.

Don't forget to include a hostname filter as well to help with ghost spam. I also recommend filtering out your internal IPs for good measure.

  • ah thank you, setting it to campaign source and now it appears to be working! I read on a couple of guides that you should have it set to 'referral' though? – pealo86 Oct 10 '16 at 9:00
  • ...also no that's not all the spam domains I was seeing, but just wanted to check I was doing it properly first. I'll go ahead and add the rest now :) – pealo86 Oct 10 '16 at 9:01
  • oh hang on a minute actually, it seems to work when 'verifying' the data, but then when I actually view my analytics again it still seems to be tracking visits from the spam domains? – pealo86 Oct 10 '16 at 9:04
  • 1
    You might need to give it a while; the filter won't work retroactively so you won't see changes to historical data. It will only affect future data. – Daniel Parscale Oct 10 '16 at 13:35
  • 1
    Of course! One more thing, just in case: be sure to have a view set up in GA that has no filters as well, just in case you ever for any reason find a problem with your existing filters. Trust me, a day will come when you'll be so relieved that you have. Cheers! – Daniel Parscale Oct 13 '16 at 13:35
2

Myself, I have been completely blocking domains, IP ranges and even whole countries right in my .htaccess file. For instance:

Domain Referrers

# Options +FollowSymlinks
RewriteCond %{HTTP_REFERER} ranksonic.com [NC]
RewriteCond %{HTTP_REFERER} emailmarketingrobot.com [NC]
RewriteCond %{HTTP_REFERER} monetizationking.net [NC]
RewriteCond %{HTTP_REFERER} compliance-checker.info [NC]
RewriteCond %{HTTP_REFERER} semalt.com [NC,OR]
RewriteCond %{HTTP_REFERER} 1-99seo.com [NC,OR]
RewriteCond %{HTTP_REFERER} seoanalyses.com [NC]
RewriteRule .* - [F]

IP Ranges

# Deny from 184.72.64.0/18     (184.72.64.0 - 184.72.127.255)

Countries

<Files *>
order deny,allow
###
# Russia (RU), Ukraine (UA), Belarus (BY), Bulgaria (BG), Czech Republic(CZ), Romania (RO), Latvia (LV), Estonia (EE), Kazakstan (KZ), Moldavia/Moldova (MD), Poland (PL), Serbia (RS), Siberia, Slovakia (SK), Slovenia (SL)
# deny from 2.72.0.0/13 2.92.0.0/14 2.132.0.0/14 5.1.0.0/19 5.8.36.0/22 5.16.0.0/14 5.34.56.0/22

It's amazing how much your bounce rate goes down when you block all of your spammy referrers and hacking attempts from all of the notorious hacker countries...

  • I'm not exactly sure what you mean by "campaign source"... When I notice that i'm getting a lot of referrals in Analytics from a given domain, I will visit the site and 9 out of 10 times I will find that it is some sort website that is sending out bots out to scrape whatever data off of my site. All of the IP addresses are discovered by viewing my web logs and finding IP addresses that are viewing tons of pages and pulling up tons of 404's. Then I will run the IP's and most of the time they end up being from Russia and China. Obvious hacking attempts... – M-n-I SEO Guy Oct 3 '16 at 11:08

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.