Exclude spam referrals from Google Analytics

What is a spam referral?

A normal day consulting for Google would generally start with grabbing a cup of tea on the way and sitting down at the desk, in front of a line of people who were queueing to get my advice on their digital marketing. I will never forget Stacy, a vegan bakery owner who was running a friend's Analytics before launching her own website. She came to get a quick overview of Google Analytics. She had read everything there was to read online but it still didn't make sense. She wanted to talk to a real person about it.

She didn't understand why her friend's website was receiving so much referral traffic. First she didn't know what referral traffic meant. A referrer is a website that links to yours, I said. But why are they not staying, Stacy asked. And she was right: The referral traffic had almost 100% bounce rate every single time. I looked at the list of referral sites for her.

The referrers were spambots, I explained to her. A bot is a crawler program which is developed to perform repetitive tasks with high degree of accuracy and speed. They are generally used for web indexing, like the Googlebot. Spambots are designed to inflate your web traffic.

Want to see?

Rick Eliason kindly shared a view of Google Analytics where you can see for yourself how to identify spambots in your Reporting tab. A non-exhaustive list of the most common spambots includes:

Talking to the web server.

When you browse the web, your web browser fetches files from a web server using HTTP - that's Hypertext Transfer Protocol. This is what you see at the start of URLs. HTTP is a request/response protocol:

Your computer sends a request for a fileGet me the file 'littlebluecats.com/digital-analysis' and pronto!
Your computer also sends some additional information in the request such as your IP address and your HTTP referrer header (or put simply which page you came from if followed a link).

Then the web server sends back a response Here it is. It is accompanied by the file you requested.

Spambots and SEO.

Spambots are designed to crawl websites and send HTTP requests with fake referrer header to avoid being detected as bots. The fake referrer header contains the website URL that the spambots try to promote and/or build back links. When your website receives an HTTP request, Google treats the referrer header as a backlink. This influences the SEO ranking of the website that spambots promote.

Exclude spambot referrals from Analytics.

You will need to have access to your Admin settings in Analytics. Select the relevant view (and please make sure that this isn't your default Master View) in the right-hand side tab and click on "Filters".

Now let's imagine that you have a list of spambots you would like to exclude from appearing in your data. You can obtain the list by checking your referral traffic in the Reporting tab > Acquisition > All Traffic > Referrals. Let's say you have identified 2 spambots:

adtiger.tk

wordpresscore.com

You will need to work with a regular expression to filter these out. But that's fine. We're going to show you how to do it.

Add a filter. This opens the editing window.
I've named my filter "Exclude spambots".
The Filter Type is "Custom".
Select "exclude" from the Filter Field "Campaign Source".
Then the Filter Pattern is where you enter the list of websites you want to exclude. You can come back and edit the list when you notice another spambot in your Reporting data. By excluding these at a filter level they will automatically be removed from the data Reporting and you will not be able to see them. If you want to keep having access to your spambot within your data report, you need to create an exclusion segment instead of a filter. Here's a brilliant pre-built spambot exclusion segment.

When you are adding more than one website to exclude this is how you build your regular expression:

adtiger\.tk|wordpresscore\.com

And last but not least "Verify your Filter" to check if your settings are correct.