August 4, 2015

Finally Stop Referral Spam In Google Analytics Forever

Categories:  +
Published: 4 August 2015 

Spam Spam Spam! This is all we hear about on the web these days and for many people it wasn’t a problem with their Google Analytics — until now, with referral spam! But don't worry if this is happening to you, we've got a simple solution for you outlined below.

Referral spam is now corrupting Analytics accounts everywhere and causing unwanted headaches for marketing teams and business owners alike. Google is working on the problem with no specified completion date, but the online community has tackled the lack of solution and is working its magic; people all over the world are developing their own solutions to this very pesky issue. We’ve seen lots of people coming up with solutions, but they are complicated and difficult to implement. At Matter Solutions we found a simple answer to the question of referral spam by thinking a little out of the box.

What is referral spam and how does it differ from regular spam?

Referral traffic is made up by visitors who have come to your website from another website via a link. A simple example of this is someone who has arrived at your site from a post on Facebook that links to one of your pages; these “True” or “Organic” referrals are real people, like your Aunt Sue and differ from referral spam.

Referral spam comes from "bots" that crawl your website, designed to perform repetitive tasks quickly and accurately. So the referral spam we're talking about in this article occurs when your website gets "fake" referral traffic from these bots and is recorded into your Google Analytics confusing the true results.

Is referral spam dangerous?

Referral spam is not directly dangerous for your site in any manner, it only affects the data collected for Google Analytics.

So, while referral spam won’t actually harm your site, if you want to use your Google Analytics data for any reason you will have to remove the spam to see the true results you're after. The referral spam itself is just blocking you from getting accurate data from your Analytics, and without accurate data it’s impossible to make decisions about what’s best for your site and your business.

Why is referral spam bad?

When using Analytics to assess the progress of your site, referral spam makes your data unreliable and inaccurate. By using the referral spam remover solution that we are putting forward below, we are now able to accurately examine and track our clients’ results. But how did we manage this? Read on!

Problems with some of the current suggestions

Many SEO and digital marketing consultants have been trying to find a way around the referral spam problem since it started getting really bad a few months ago.

The current suggestions to solve the referral spam issue are both cumbersome and ineffective: They require you to add each spam domain, like, into Google Analytics. Once added, only these domains will be blocked from causing referral spam.

If you choose this method you can end up spending all of your time adding in each and every new spammy-website into that list; which is time consuming, and quite frankly as professionals focused on adding value to your digital marketing, it doesn't make sense to do it this way. Beyond being a recurring time-sink, this method doesn’t actually clean up the rest of your Google Analytics data.

So not only will you be spending your time adding in each variation to sites like ‘’ to your spam list but you will still be left with data that is historically meaningless!

How to Remove Referral Spam?

We decided that the current solution was just not going to be good enough and we needed to innovate and find a better way. We then experimented with some different solutions through trial and error, and it wasn’t until we had re-framed the issue did we come up with an answer: "Why filter out the spam when it’s easier to filter in the trusted websites?"

To do this we set up a segment that only allows trusted websites to show up in your Analytics. Once this segment is used you just have to add in occasionally any new trusted websites.

Follow this simple step by step guide to setting up the spam filter segment

Steps to Remove Referral Spam: In your Google Analytics follow these steps to create a segment to remove any referral spam.

1. Add a segment


2. Choose "New Segment"


3. Advanced> Conditions


4. Filtering

Change the 'Ad Content' drop-down to 'Source' by clicking on the drop down menu and selecting 'Acquisition > Source'source

Under 'Include' change ‘Contains’ to ‘Matches Regex’mathces_regex

5. Add in your trusted website

With the pipe ‘|’ (normally found above your enter key) add in each domain with the pipe between them. You only need to add in the domain as it will also include all sub domains as well. Note: Make sure your list doesn’t start with a pipe end with one either otherwise it will fail.trusted_websites_

6. Save and apply the filter to remove all spam from your analytics.

The light at the end of the spam tunnel

Just last week Ben the director of Matter Solutions caught up with a team member of Google and confronted him about what they are doing to fix the referral spam problem,  the Google team member confirmed that they are working on a solution to this issue.

While we don't have a way of knowing how long this will actually be — we’re here putting forward our findings to share and waiting with the rest of you for Google's update.

Have you been experiencing problems with referral spam and found our fix useful? Have you found any other tricks or ways to get around it? We'd love to hear about your success stories and techniques, so let us know in the comments! For more information on Brisbane SEO Services, contact us.

Ben Maden

Read more posts by Ben

4 comments on “Finally Stop Referral Spam In Google Analytics Forever”

  1. I found that creating a segment with Source matching regex only showed referral traffic (with spam removed). It did not include non-referral sources of traffic.

    In order to get a full Audience overview including other sources (direct, organic, social etc.) I had to set the segment to be "Medium NOT referral OR Source matching regex of trusted domains".

Leave a Reply

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