Have you been in your Google Analytics and noticed that your traffic is higher than usual, but your behavioral statistics (bounce rate, pages/session and session duration) are worse? Well, you may be getting hit with a lot of spam within your analytics account.

Close-up image of an office worker using a touchpad to analyze statistical data

The spam gets called by different names depending on who you talk to, but for the purpose of this article, spam will be referred to as “Ghost Referrers”.

What is a Ghost Referrer?

A Ghost Referrer is essentially a spam bot that pings your Google Analytics tracking code multiple times so they show up in your Google Analytics dashboard. Most of these bots don’t even visit your site, but run a script looking for Google Analytics UA tracking codes in order to show up in your account.

How Do I Know it is a Ghost Referrer?

The first thing you should look at is your Referral Traffic in Google Analytics. If you see things such as “floating-share-buttons.com” “semalt.com” or “get-free-social-traffic.com”, it’s pretty obvious those are spamming your site. You can also look at the behavioral statistics (bounce rate, pages/session and avg. session duration) to see if there was any behavior from those sites. If everything is 0 (or bounce rate is 100%), you can be sure that those are Ghost Referrers.

ghost-reffer

Another way to see if you are getting hit with Ghost Referrers or spam, is to look at the hostname that traffic is coming from. If you see URLs that are just a bunch of letters, then you can be sure it’s spam. The only URLs that should show up here are your website and any other URLs you own that are forwarding to your main website.

invalid-hostname

How Do I Stop The Ghost Referrers & Spam?

There are many ways to combat spam. The first is to filter out each individually. To do this, navigate to the “Admin” section of Google Analytics. Under the Property level, click on “Tracking Info” and then “Referral Exclusion List.” You can then enter all of the Ghost Referrers individually that you found to be spam.

referral-exlusion

Another way (and probably the best way) to filter out the spam, is to setup a valid hostname filter. To do this, first navigate to the “Admin” section of Google Analytics. Under the View level, click on “Filters” and then “Add Filter.” Enter the name “Valid Hostname.” Under Filter Type, select “Custom” and then “Include.” In the Filter Field dropdown menu, select “Hostname.” In the Filter pattern box, enter in your website’s URL. To be safe, enter in the www and non-www of your website. If you have additional domain pointing to your main URL, use a | to separate different URLs. In the end, your Filter Pattern should look something like this:

valid-hostname-filter

The final way to filter out spam is to create custom segments in the Reporting view. Click on the box that says “All Sessions.” Click on “+New Segment” and enter in the Segment name. In the left navigation in the Segment, click on “Conditions.” You want to filter the sessions, so be sure to select “exclude” from the dropdown menu. The first condition is usually set to “Ad Content” and you’ll want to change that to “Source.” At that point, enter in the spam URL in the text field. If you have additional spam URLs, click the “And” button and follow the steps above to filter out all URLs. Once complete, click “Save”. You now have a saved Segment that you can use whenever you want.

segment

Conclusion

Spam and Ghost Referrers are always going to be around. What’s worse is that the spammers will eventually figure out how to beat the Filters and Segments and you’ll have to find another configuration to filter them out. It’s unfortunate that you have to do this, but it is the way of the digital world and following the steps above, you can rest assured you’ll be looking at true visitor data for your conversion optimization.