« Adinton Blog

How to remove referrer spam in Google Analytics

In this post, we are going to explain step-by-step, how to block those referrer spam sites that appear in our Google Analytics statistics. By doing that, we will be able to have clean data and take the right decisions in our online marketing channels.

What is a referrer spam site?

Referrer spam is all that fraudulent traffic that aims to web analytics tools. Mainly, a spam bot makes a site request using a fake URL so when we check our data those site will appear on our referrer list. They aim to get relevance and traffic thanks of being annexed to us. Since they act in thousands of websites at the same time and make thousands of requests to their Analytics, they know that a minor part of us will be curious and will access to their promoted websites. If we sum all those visits, in the end they get a lot of traffic to their sites or affiliate sites.

no sleepin thecity

Why is it important to exclude referrer spam from our statistics?

Because if we do not exclude them, we are going to be seeing in our statistics visits that have never happened. Our data will be wrong and that might lead us to take wrong decisions and  create the wrong marketing strategies.

How do I deal with referrer spam?

We cannot do anything from the server configuration. So we do not have to waste time on configuring the .htaccess. Referrer spam only attack our analytic tools and right now, most of the analytic tools do not offer spam protection. So if we want to block those site we have to configure it on our own, manually using a custom filter. There are two ways of doing so, we are going to proceed explaining both.

First Option

This first option works either you have Universal Analytics or not. First we have to go to our Analytics tool. In most of the cases it will be Google Analytics. Then we go to Admin >  All filters > Add filter to view.



Below the “Excluir” (exclude) section, we will have to add our domains we want to exclude. For doing that we will have to add them with a regular expression such as:


Once we do that we will start excluding those referrer spam. That means that in our historical data will still see those referrer sites until the date we created this filter.

Second Option

This second option we can only use it if we have universal analytics. This option consist on include the domains in an exclusion list of referrer. So in order to apply this condition, we will have to go to Admin and Properties.


From there you can proceed with adding all those domain you want to exclude.


From the moment we start applying this filter, we will be excluding all those sites we have added so do not forget that all the data you have gather previously, will still show those sites in your statistics.


If you decide to use the second option, you will have as well to add another filter to the view you want to have those referrer excluded with those same referrer list. On the contrary if you do not do that, you will have that spam traffic counted as direct traffic. Thanks to Mike Sullivan from Analytics Edge, for his comment via Twitter with: http://help.analyticsedge.com/spam-filter/why-you-should-not-use-the-referral-exclusion-list-for-spam/


Leave a reply

Your email address will not be published. Required fields are marked *


Log in with your credentials

Forgot your details?