Referrer spam is a real pain in all of its forms. It pollutes your lovely clean Google Analytics data with fake visits to your website, generated by automated scripts. Typically, these visits have no engagement – a 100% bounce rate, 0 second time on site and a really stupid referring domain such as “buy-cheap-online.info”.
This can really wreck your statistics by skewing your conversion rates and acquisition channel ratios. Taking action to prevent this type of thing is a wise thing to do.
We also recommend annotating the changes you make in Google Analytics, so that in two years when you’re scratching your head trying to work out what happened today to make your referral traffic drop off a cliff, you can see it at a glance.
Head to the admin section of your property
Click on “View Settings”
Check “Exclude all hits from known bots and spiders
Filter the spam.
Head back to the admin section of your property.
Go to Tracking Info
Go to Referral Exclusion List
You will need to add referral exclusions for all known Referral Spammers.
However, it is useful if you are able to identify referral spam yourself.
Head to the reporting tab
Head to Acquisition > All Traffic > Referrals
If it has a 100% bounce rate, 1.00 page/session and an Avg. Session Duration of 00:00:00 this is a huuuuge red flag and the site is almost certainly spam. If you are suspicious but not totally sure, try Googling the domain and see if you get a load of results from disgruntled webmasters complaining about their analytics data. That’s usually a dead giveaway!
Advanced "future proofing"
The problem with the above two steps is that new spammers are born all the time, so you will have to periodically check your Analytics for new referrers, which can be annoying.
We can’t automatically filter all of the new ones, but we can automatically filter less sophisticated ones. Doing this also has the advantage of stopping Ghost Event Spam.
Head to the reporting tab
Select a really big timeframe so that we can look at lots of data
Head to Audience > Technology > Network.
Select Hostnames as the Primary Dimension
Show as many rows as you can
We are looking to whitelist valid hostnames – by extension, blacklisting everything else. The only hostnames you should be accepting are domains that legitimately have your Google Analytics code on them. This means your domain (which would include any subdomains) and perhaps if you have a separate shop or blog domain that you also run the same analytics code on. Some unusual but valid examples include translate.google.com or any third party e-commerce shopping cart services, which you will want to keep. Forget everything else, even google.com or (not set).
Make a note of your valid domains.
Head back to the Admin tab.
Select Filters in the View column
Filter Name > Valid Hostnames
Filter Type > Custom
Filter Field > Hostname
Populate the filter pattern field by listing your valid domains, separated by a pipe, with no spaces.
Use the verification tool to check you’re happy with the results. If you are, save the filter!
And you are done! Just remember, if you move domain, add a new domain, add a new third party checkout service, remember to add it to the filter, or the data from that domain will be treated as spam!
Won't this stop me from seeing legitimate referral traffic?
No. What we are doing here is qualifying that the tracking information being sent to Google is originating from your domain! Think about it - there is nothing to stop me from taking your Analytics tracking ID from your page source and adding it to all of my own website, completely screwing your data. This is the mechanism whcih some spammers use, particularly Ghost Event Spam.