UPDATE: December 2016 – There’s been a deluge of Google Analytics spam originating from Russia, with many accounts seeing upwards of 1,000 false hits over the past 30 days. If you haven’t already implemented the below filter, we highly recommend you do so to preserve the integrity and accuracy of your Google Analytics data. 5 minutes worth of prevention equals months of cure in this case. For some entertaining reads on the spammer behind this, check out these articles on Motherboard and Ohow.

While Google Analytics is getting better at weeding out referral spam by default, it’s still not perfect. After trying numerous hacks for dealing with annoying spammers like ILoveVitaly.com, Semalt.com, Social-Buttons.com, and Success-SEO.com (not to mention about a hundred others), we finally landed on one that works using a simple filtering technique. Thankfully, it’s extremely easy to set up.

01. Set Up a New View for Your Filter

First, set up a new View to ensure you don’t skew your historical data as this will only affect traffic moving forward. That way, you can continue to make apples-to-apples comparisons of your data before-and-after you set up your filter.

This is important because cutting referral spam out will reduce the amount of traffic you appear to be getting while improving all your other KPIs, like engagement and conversion metrics. The extent of the effects is dependent on how much referral spam you’re receiving, of course, but this is best practice regardless.

02. Create a New Hostname Filter

Okay, now that you have your new view set up, go to Admin -> View -> Filters and create a new filter with the following settings:
“Include only” + “traffic to the hostname” + “that are equal to” + your URL

NOTE: If you have multiple domain names, you’ll want to use a regular expression to match them all. Otherwise, this configuration will work just fine.

Below is an example from our own Analytics profile.

Filtering Out Google Analytics Referral Spam

03. Voila! That’s it. Really.

This works because referral spammers don’t know your hostname / URL — they just spam Google Analytics IDs at random, so it never actually points to your URL and therefore gets caught in this simple filter! It’s not a complete solution, but it should eliminate the vast majority of your referral spam data.

Ben Wills

Author Ben Wills

Ben is the CEO of Decoder, where he evangelizes the virtues of data-driven marketing and client advocacy.

More posts by Ben Wills

Leave a Reply