Google Analytics has been overrun with spam – there’s no doubt about it. Every time I login to an account I can’t help but notice all the misrepresented data on display. There are a number of different ways to exclude this data in GA but I have found this simple solution will remove the majority of unnecessary referral spam. It will even allow you to view your data historically.
So here is the quick fix: Setup a custom advanced segment where the hostname contains the URL.
Here we go, step one:
Under Audience > Overview (the default Google analytics screen) click on the ‘All Sessions’ segment to display the segment options. Then click ‘New Segment’.
Rename the segment to something recognisable, for example “Hostname contains yoururl.com”.
Under Advanced > Conditions select ‘Hostname’ as the filter, ‘contains’ as the parameter and then enter the URL you are tracking.
Then click ‘Add Filter’.
You’re done! Just go and select your new segment and click ‘Apply’.
There you have it, a quick and easy way to retroactively filter the majority of your referral spam.