Given the ongoing war against Google Analytics Spam, and how much easier it is becoming for spammers to trigger false traffic, I wanted to provide a quick filter resource for folks to clean up their data quickly, as this is a PERSONAL area of interest to me as a digital marketer.

This will help you exclude language spam (like Secret Google and Vote Trump), browser spam, referral spam (like ilovevitaly plus others), and more!

Once GA Spamfighter runs, you’ll see a BUNCH of these Spam Filters

These resources are not all encompassing, but rather the filters that I specifically apply to all of the properties I manage. It has been immensely useful to me, and I hope you get a lot out of it too. I’ve either built these filters myself with the help of the Dev teams at my current and previous positions, and from several fantastic contributors at www.reddit.com/r/analytics

GA SpamFighter, by Anchor Metrics:

http://gaspamfighter.com/

Click “Get Rid of My Spam” and follow instructions to filter out SPECIFIC spam sources, on their master list.

Quick, easy, revocable access once the filters are in place.

This is my GO TO step 1 for spam issues in Google Analytics Properties.

Next up are the more specific filters that I put on every GA Property that I manage. This process is quick, easy, and eliminates about 90–95% of spam, leaving me to manually filter out new sources as they come in.

First, navigate to your filters page and select “Add New Filter.”

Next, you’re going to create a new filter, and use the following guide to fill in the “Filter Name” “Filter Field”, and “Filter Pattern” boxes.

Make sure you select “Custom” as the filter type to be able to input all three fields.

Once you have the boxes filled in, click “Verify” (a blue text link below the filter fields) to ensure that it’s working, and then Save it.

If your GA property does not have enough data to verify against, it MAY show up as an error, but if you check back in a day or so, even if you get an error message, and the spam has stopped, the filter is working correctly. No need to be concerned.

Filter Name: Exclude Language Spam

Field Box: Language

Pattern: .{12,}|\s[^\s]*\s|\.|,|\!|\/

(This filter was part of a previous blog post)

Filter Name: Exclude Browser Spam

Field Box: Browser

Pattern: [^\s]{3,}\.[^\s]{2,}

Filter Name: Exclude Operating System Spam

Field Box: Operating System Platform

Pattern: [^\s]{3,}\.[^\s]{2,}

Filter Name: Include Valid Browsers

Field Box: Browser Version

Pattern: (^(([0–9]+\.)+[0–9]+|[-_a-z0–9\+\s]+)+|^\(not set\)|^)$

Filter Name: Include Valid Screens

Field Box: Screen Resolutions

Pattern: (^[0–9]+x[0–9]+|^\(not set\)|^)$

Here is the Custom Add Filter utility. Note the Verify This Filter link directly above “Save”

I want to give you a quick note: This will only remove spam data moving forward, it cannot affect the historical data already recorded, I’m sorry. This will continue to prevent data from being logged that fits into these filters as long as the filters exist. If you want to see more accurate historical data, you should set up custom segments.

Also, you WILL need to update the Browser, OS and Screen filters after a while, as versions will continue to change.

As always, you should also take the opportunity to set up a hostname filter, but that will vary based on your personal needs, your site, and any secondary resources you have running. I recommend looking at https://megalytic.com/blog/how-to-filter-out-fake-referrals-and-other-google-analytics-spam for some great info on how to do this.

Let me know if you have any filters that YOU use for your properties.

Best of luck, fellow GA Admins!