Thursday 10 September 2015

How To Stop Referrer Spam in Google Analytics

The fight against referrer spam has long been a losing battle. It seems like every time a ‘solution’ is found, the spammers are already a step ahead, like a never-ending game of Whack-A-Mole.

A lot of people make the mistakeof trying to block spam by using server solutions like the .htaccess or plugins. These will not work as this type of referral never visits your site and is merely fake data.

The spammers generate UA codes at random and send the fake data directly to the Google Analytics server via the back-end ‘Measurement Protocol’.

It’s a pretty ingenious way to annoy people and get affiliate traffic en masse, but there is one inherent flaw – as the UA codes are random there is no way of knowing what your particular hostname is.

You can exploit this flaw by implementing a ‘Valid Hostname Filter’. It is the simplest and most effective solution out there.

I’ve been giving these instructions to clients for the last few months and it seems to work very well. Let’s hope it lasts.

Here’s how to do it:

To find out your valid hostnames:

  • Go to the Reporting tab on GA and select the biggest timeframe possible on the date range.
  • In the lateral bar, select Audience
  • Expand Technology and select Network
  • At the top of the report, make sure you select Hostname because Service Provider is selected by default.
  • Find and copy all the valid hostnames.
  • Your valid hostnames will include all the places where you put your tracking code (UA-XXXXXX-1), such as yourdomain.com, yourdomain.com, blog.yourdomain.com.

How To Stop Referrer Spam

You can see from the example above that you may also have services in which you add your tracking ID, like an ecommerce provider, or in this case, a translation service for an international audience.

You may find official-looking hostnames like amazon.com, or even google.com, but these are planted there by spammers to deter you from removing them so your account can continue to be spammed.

Once you have this list, you will need to build a REGEX – don’t be put off by the scary name, it’s really easy. Just use the ‘|’ character to separate your domains.

This is the REGEX for the above example:

hampshirewoodprojects.com|hampshirewoodprojects.co.uk|translate.googleusercontent.com

To create the filter:

  • Go to the Admin tab and create a new view in the property.
  • Select New Filter.
  • Select Create New Filter and enter Valid Hostname Filter as a name.
  • In Filter Type select Custom.
  • Make sure you choose Include and select Hostname from the dropdown.
  • Finally, paste the REGEX that you built with your valid hostnames in Filter Pattern.

Verify the filter and you’re done!

How To Stop Referrer Spam

Always remember to create this filter in a new ‘view’ so you have something to compare the data to. Unfortunately this won’t work retroactively unless you know how to use custom segments, but with the new view there will only be the new data anyway.

If you’ve got any thoughts, please feel free to write a comment, or if you need some help you can reach me directly via @koozai_jack on Twitter.

The post How To Stop Referrer Spam in Google Analytics appeared first on Koozai.com



from Donald Jarrett digital marketing news http://ift.tt/1J0dZsp via transformational marketing
from Tumblr http://ift.tt/1JZ7nhH

No comments:

Post a Comment