We’re all familiar with the concept of spam and spam traffic to websites that shows up on Google Analytics’ data and can, depending on the size of the site and the level of traffic it receives, really skew the data collected and make it hard to accurately analyse what is happening with the site and its visitors. However, we now also have the problem of ghost spam!
Unlike traditional referral spam, which relies on bots hitting your site, ghost spam is something that shows up in Google Analytics as a visit and has the effect of skewing the data collected, but doesn’t actually equate to anything or anyone having visited the site.
Ghost spam relies on your tracking ID. The spammers target a large number of ID numbers at random, and simply send through fake data in a format that Google’s tracking code recognises and interprets as a visit. This is both more efficient and easier for spammers to achieve, and can also be more troublesome to get rid of for a website owner as you can’t simply block the spam from hitting your site; it never did in the first place!
As there’s not actually a visit that can be blocked directly at the website level (through the .htaccess file) or from the server itself, we must find the answer within Google Analytics and its reporting.
Luckily, Google Analytics is highly configurable and it is possible to set up a number of filters that stop certain information from being displayed in reports, or even from being recorded at all and this is how ghost spam must be dealt with.
When someone visits a website, Google Analytics records many things about that visit, one of them being the hostname. For a legitimate visitor, that hostname will almost exclusively be the website’s domain. Ghost spam can be recognised by the fact that it will have a hostname that doesn’t make sense for that website. It will either be unrelated to the site or it will simply be listed as “not set”. The filter needed therefore for legitimate website traffic is one that only shows information about visits with a valid hostname.
This filter should be set up as follows:
Once you have followed these steps, simply save your filter and Google Analytics will not record further data from this ghost spam.
Unfortunately, this method will not work with referral spam carried out by automatic bots, which do actually visit your site. This is because they will usually have a valid hostname by virtue of having accessed your site. This type of spam in Google Analytics can also be blocked and or filtered though, and our next blog post will explain how you can do this as well.
If you would like any help in analysing your Google Analytics data, or would be interested in how we can help increase traffic to your site with a view to bringing you more business, please just get in touch with one of the team at the office by calling 0116 237 4603.