What Is Referral Spam?
It’s when someone purposely sends fake traffic to another website in order to show up in Google Analytics Referral Traffic reports. The goal is to get webmasters see it in their referral traffic and visit the spammer’s website. This is particularly problematic when decisions are being based off of analytics metrics that are littered with pseudo information. This is why it’s important to block referral spam traffic and keep your website’s analytics data as clean as possible!
How To Cleanup Google Analytics Data
1. Make a copy of your Google Analytics View
Label the copy of your primary Google Analytics View “Filtered”.
2. Enable Bot Filtering in your new Filtered Google Analytics View
In your new Filtered View go to View Settings and check the following checkbox to enable Bot Filtering and save your changes:
3. Filter out your IP Address
In your new Filtered View go to Filters and create a new filter set to exclude traffic from the IP addresses that are equal to and enter your home IP address. Just go to whatismyip.com to figure out what your IP address is from the corresponding location, enter it and save the filter. Add another one for your work IP address too if relevant.
4. Install Spam Filters on your Filtered Google Analytics View
Simo Ahava created an awesome Spam Filter Installer that saves a ton of time. It has a large collection of the most prominent referral spam sources caked into it. All you have to do is run it on your Filtered Google Analytics View and it installs 19 additional filters (at the time of this writing) for a plethora of spam sources in seconds. Click on the button below to use it:
5. Identify All Valid Hostnames and Filter Out The Rest
By this point you’ve eliminated the vast majority of all referral spam hitting your site. But if you’d like to take it even further, you can also identify all your valid hostnames and create a filter that excludes all the non-valid ones. To learn how check out Carlos Escalera’s detailed guide on the Moz Blog: Stop Ghost Spam in Google Analytics with One Filter.
Something To Add?
Do you know of a better way to deal with referral spam traffic on a WordPress website? Anything else to say? Say your piece in the comments!