How to Block Out Referrer Spam in Google Analytics

Lately many webmasters have seen massive spikes in their Google Analytics traffic reports. Previously when big spikes occurred we'd often assume this was something which was associated with great marking or perhaps encouraging SEO works. However, with a recent influx of referral spam this is no longer the case.

If you're unsure as to whether you've been affected take a look in your Google Analytics account at the Acquisition tab under All Traffic - Referrals. You'll see some of the most common names are Traffic Monetize, 4 Webmasters and semalt. Also look down the source for phrases like "cheap seo", "100 dollars seo", "best seo offer" and "get free traffic now". These are all tell tale signs of referral spam traffic.

 

Referral Spam can also be known as log spam, referrer bombing and described by Google as ghost referrals. This is essentially generated in your Google Analytics reports by fake visits. In some scenarios the spammers will not even have to visit your website. They can transmit spammy data which comes directly Google Analytics and this gets added to your reports.

So how do we go about removing referral spam? Easy just follow the steps below!

1. Setup a New View Within Google Analytics

This is not paramount that you do this however it's just best practice to always have one unfiltered view. To do this you will need to be in the Admin section of your Google Analytics account.

 

Once you drop down the view tab you will see at the bottom the option to create a new view. Give your view a name (advisably one that's distinguishable) and set your reporting time zone. Next select "Create View".

 

2. Analyse and Identify Your Referral Spam Traffic

To do this you need to look at the Acquisition tab - All TrafficReferrals. Please be aware you'll need to switch back to your old view as the new view you've setup to block referral spam won't be collecting any data yet.

You'll then need to identify the sources which are spam and create a hit list of domains which we'll use later. To do this it's probably best advised to set the date rage to a year and then look through the list. If you're unsure about the domain I'd suggest either doing a quick search on Google or leave it off your hit list until your sure it is referral spam. Later on we'll look at adding these in and excluding them.

 

3. Exclude All Hits from Known Bots and Spiders

Make sure you've switched back to your Exclude Referral Spam View and in the Admin Tab of your newly selected view select View Settings and tick the box which says "Exclude all hits from known bots and spiders". Whilst this will not exclude the whole list of referral spam it will certainly help to exclude some domains and it will act as a good starting point.

 

4. Exclude Your List of Sources from Your Spam Exclusion Hit list

Still in the Admin section of Google Analytics got to the Property Settings column and select Tracking Info and select Referral Exclusion List.

 

Now you'll need to select " + Add Referral Exclusion" and add the domains from your referral exclusion hit list in the box provided. For example:

If you need to edit the domain at any time just hover over the domain name link in your list and click once. This will enable to change the URL.

 

5. Final thing...RECENT UPDATE

This is the most important part. After liaising with Google closely over the spam issues we have found that steps 1 - 4 will help to remove some of the referral spam but not all of it.

We have recently been working closely with the Google Analytics team and have finally been able to come to a solution which ensures all of the referral spam is excluded from your data. So to make sure that we do block everything, rather than looking to exclude a load of domains, we need to create a filter to include the website URL by it's hostname.

Go to the filters section in the view settings of Google Analytics. Also make sure you're still in the view you setup earlier that's going to be excluding referral spam.

 

When setting up the new filter I'd advise calling it something that's easily identifiable so that when you're looking through your filter list you instantly know what it is. I've just called mine "Include Hostname yourwebsite.com".

Next you need to select the "Custom" filter type. Then select include and on the drop down select hostname. Once you've done this add a backslash after the closing period. This will help to ensure that all subdomains are still included as well.

 

Once you've done this you can verify this to see if the changes you have applied will have an affect. If you've selected a wide data range (ideally one where you've been hit by lots of spam robots) then you will see the implications of the change here. Like the example below. If you see something like this it will be a good indication that your filtering has worked.

 

Now you should be ready to rock spam referral free! Hope this has helped to make your Google Analytics data a load more accurate!

Work with us

Work with us

Think we’d be a good fit for your business?

Let’s chat through your requirements. Email or call us on 01943 605894