Best Solution to Remove Spam Referral Traffic from Google Analytics

There has been a lot of talk recently about spam referral traffic in Google Analytics. It’s not necessarily harmful, but it can really mess up your data. And in our opinion, inaccurate data is the root of all evil. And poor decisions. We find it most annoying as it significantly increases the bounce rate and reduces pages per visit, among other things.

How do I remove spam referral traffic from Google Analytics?

There are a few ways, subject to where the spam is coming from. We have tried a few over the last 3 months or so, and thought we’d share the solution that has worked best for us. So what is spam referral traffic in Google Analytics? It will look something along the following lines.

Google Analytics Spam

You can filter your view in Google Analytics in a number of different ways, which means there are plenty of solutions to get accurate analytics data. The spam referral solution we used is not necessarily the best one out there, but we have found it most effective to get rid of the vast majority of Google Analytics spam referral.

1. Spam Referral Traffic – Exclude by campaign source

Excluding Google Analytics spam referral traffic by campaign source is one of our favourites, as it is a very quick fix and does not require a deep technical know-how. It allows you to add specific terms to the sources that you want to have excluded. This is where you take advantage of the spammers’ own spammyness (is that a word?).

We had a look at which sources spam us most and included these in the campaign source exclusion. This may be different to yours but it will be along the same lines. We used;


The ‘|’ symbol means ‘or’ in Google Analytics language. You can add as many terms as you want (within the character limit) and Google is extremely effective in blocking these out. The same filter could be applied for other terms if you wish to exclude referrals from specific websites.

Here’s a quick snapshot of how you set up the campaign source filter.

Campaign Source Exclusion

2. Spam Referral Traffic – Exclude by country

This is a bit of a grey area. We excluded referral traffic from Brazil and Russia, as we see big spam numbers from these countries and as a company we don’t trade with these countries at all. Some people also add Indonesia to this list as it is a big source of spam traffic. We haven’t, as we specialise in trade with Asia. This means we need to understand traffic and demand from each country in Asia including Indonesia.

If you don’t expect any traffic or demand from Russia or Brazil, we’d recommend to put these on the country exclusion. If you wish to exclude other countries that spam you, it’s up to you. Just make sure you don’t exclude any legitimate traffic that should be included in your Google Analytics data.

Here’s a quick snapshot of how you set up the country filter.

GA Country Exclusion Filter


We know that there are many more other solutions out there, which may or may not be more effective in your particular case. The reason we prefer these two options is that they are extremely easy to apply, and extremely easy to modify when needed. It’s also a great solution if you don’t have a deep technical know-how of Google Analytics.

Big thanks for Jared Gardner for a very comprehensive review of Google Analytics spam referral. Check out his article on Moz here.



Like it? Share it!