Ghost referral spam
Ghost referral or referrer spam is a form of spam that targets the Google Analytics accounts of web site owners so that when they click on the ghost referrer URLs they are taken to a web site that makes the spammer money. The ghost URLs are injected into a web site owner's analytics data by using web spiders or bots that visit the sites leaving behind fake referrer URLs.
How ghost referral spam works
Ghost referral spam targets webmasters that use Google Analytics. The aim is to get you, the website owner, to click their links in Google Analytics. When you visit their page you will help them make money.
Google Analytics records the URL of the referring URL (the web site a visitor came from) in it's analytics data so that when you look at your analytics data you get a list of all the sites that appear to be linking to you (referrers list). Out of curiosity you may click on the links to visit the sites to see how they are linking to your site and what they are saying about your site's content.
What the ghost referral spammer does is they set up a web site that will somehow make them money. This can be in the form of displaying advertising, selling something, or a redirect. In the case of a redirect what they do is create a web site that just redirects to another web site or to any one of many web sites in a database. The idea is similar to blind links. You think you are going to website A but end up at B, C, D or Z. It works by employing either a plain HTML redirect in the web site's index page or by a script in the index page that redirects all incoming traffic to a random web site from a pool of web sites stored on the spammer's web site. Another option is to redirect to a shopping web site with an affiliate identifier in the URL in the hope that any purchase you may make on the shopping site will earn them a commission.
Ghost referral spammers use web spiders or bots to automatically visit web sites all over the internet leaving behind fake referrer URLs so that any site using Google Analytics will store the fake referring URL. The spammers aim to target hundreds of thousands of web sites daily so that if only one or two curious people click on their fake referrer URL they will make money.
Advanced spiders or bots only need to visit your web site once to then spam your web site again and again with different ghost referrals. They work by visiting your site and reading your Google Analytics script embedded in your web page. They extract your unique Property ID and add it to their database. Then they just spam Google Analytics directly using the property id's in their database. Others know the format of the Property ID and just randomly generate them so they need never visit your web site.
How ghost referral spam affects you
The main problem for you, the webmaster, is that the ghost referral spam is polluting your analytics data statistics making it look like you are receiving more traffic than you actually are. This can be annoying and there are many articles available on the web dedicated to teaching you how to block the referrer spammers and how to create and apply filters to remove the fake URLs from your analytics data. The problem is that you will have to carry out this activity fairly regularly and it can become tedious. Some webmasters prefer to ignore this data favouring to roughly calculate how much traffic is fake and to factor that out when reviewing their web site's performance. For example if the spam is five percent of your traffic you can minus that percentage from your totals.
As long as you don't click on any suspicious URLs you won't be helping the spammers make any money. If you are curious about a particular URL in your analytics data you can always paste the URL into a search engine and without visiting the site you can get a rough idea of what the site is and if it has been reported as a spam referrer from reading the snippets of the search engine results.
There is no way for you to prevent ghost referral spam. Anyone can visit your web site and can fake the referral URL should they wish, or copy your Google Analytics Property ID. They can then spam Google Analytics directly without visiting your website again so fancy scripts on your site will defend you. You can apply filters to your analytics account to filter out the ghost URLs but that will cost you in terms of time and effort. Or you could just calculate how much of your traffic is fake and factor it out of your results when viewing it. Whatever you do, avoid clicking the links as you'll be doing what the spammers want.
If you have any feedback regarding this article, or you have a suggestion for a new article, or just want to say thanks for the info then feel free to drop me an email at firstname.lastname@example.org.
Article date: 13th September 2015