You’re prepping a website report for management and there it is in brazen glory, a spam entry in your top referral sources.
If you’re lucky, it’s one of the more ‘safe-for-work’ spam sources. Common Google Analytics referral source spammers include:
Then scroll and select ‘Exclude all hits from known bots and spiders.’
Be sure to continue to scroll down and Save your settings.
Name the filter the most uncreative name you can think of. It may be months until you come back to this section of Analytics, afterall.
Select to create a Custom filter type to Exclude.
For the Filter Field, select ‘Referral‘ and paste the following as a Filter Pattern.
semalt|button|traffic|seo|buy|free|(po*rn)|(su*ck)|(event\-tracking)
Finally, add the desired Google Analytics views you would want to filter bots from, and Save your settings.
Now with your best Scarlett O’Hara fist shake, proudly declare ‘As God is my witness, I’ll never see bots in my Analytics again!’
Just like your email inbox, you’ll probably get a few creative spam hits now and again, but this filter will take care of the lion’s share.
- best-seo-offer.com
- buttons-for-your-website.com
- social-buttons.com
- buttons-for-website.com
- buy-cheap-online.info
- get-free-traffic-now.com
- simple-share-buttons.com
- event-tracking.com
Preventing Google Analytics Spam
Preventing spam won’t remove spam from historical data (we cover that last) but it does go a long way in keeping it from happening in the future.Google Analytics ‘Prevent Known Bots’ (Investment < 1 Minute)
Google understands that analytics spam is a nuisance, and takes active measures to reduce it – but those counter-measures aren’t enabled by default. By enabling this setting, you’ll prevent Google’s known bots. It doesn’t stop all spam, as these bots seem to be a step ahead, but it will go a long way in reducing the spam that’s already been ‘discovered.’ Select ‘View Settings‘ From Your Admin menu:

Google Analytics Bot Filters (Advanced) (Investment < 5 Minutes)
While best practice is to never filter data from your primary view, I think we can all agree that this spam will never provide much use. This countermeasure sets Google Analytics to exclude bots based on a set of common features. We’ve spent a few weeks tweaking this Google Analytics regex bot filter over dozens of analytics accounts so you don’t have to. Like any spam filter, the goal was to filter as much of the bad as possible without over filtering. From your Admin menu’s Account column, select All Filters, then + New Filter.


