How to get rid of referrer spam in Google Analytics

If you’ve been looking at your Google Analytics reports for the past few months, you might have seen some spam referral visits from sites such as:

  • Free Social Buttons
  • Darodar
  • Get Free Traffic Now

Further visits of this nature have been appearing too – like these:

google analytics referrer spam

(The above example is in Acquisition>All Traffic>Referrals)

It’s really annoying because it pollutes your Google Analytics data by adding extra visits that didn’t truly exist.

Checking the “Remove bots and spiders” option in the admin seems to catch some of said visits, but not all of them.

Remove bots and spiders google analytics

(You can find the above option in Admin>View Settings>Bot Filtering)

I would usually suggest adding a filter to remove visits from these sites, but it’s pretty unfeasible as the sites used tend to change all the time.

The most helpful solution I’ve found is in relation to the fact that your Google Analytics tracking code is not being executed on your website, but via an entirely different hostname – usually coming under the name (not set).

Google Analytics Hostname

So, to get rid of these spam referrers in Google Analytics, you need to create a filter that only includes traffic to your hostname (your domain name). This means that you shouldn’t see any traffic that does not come to your main domain.

For example, here is a filter that only includes traffic to edit.co.uk:

Hostname Filter Analytics Google

This filter will remove the following traffic (which is from spam referral traffic and tools):

Not Set Referrer

Using a filter like this should mean you can get rid of the referral spam coming into your Google Analytics profile. However, if the spammer is really persistent and clever, this may not catch them all. Keep checking your reports to see if these kinds of referrers come back.

If this hasn’t worked for you, please feel free to get in touch and I’ll see what I can do for you. If you find another method that works, please comment as I’m keen to see this referrer spam wiped out for good.

Related Posts