How to Find and Remove Ghost Spam in Google Analytics
Spam is still a serious problem for website owners. Junk traffic from various sources is still being tracked by Google Analytics, making it difficult for site owners like you to understand the real performance of a website. For some sites, junk traffic can even account for more than 70% of the tracked traffic.
There are simple ways to filter ghost spam in Google Analytics. Before we talk about how you can remove ghost spam, however, let’s take a closer look at the junk traffic and why it is important to filter it out.
What is ghost spam?
Ghost spam is often called junk traffic because it is not doing anything on your website. Junk traffic can come from various sources, including social buttons, porn sites and bots. They are noises that will prevent you from understanding the actual stats and the insights behind them.
Most of the time, ghost spam counted as a visit is not a visit at all. They send data directly through the measurement protocol. In other cases, spammers simply use bots to access a URL for just a few seconds, without knowing what websites they are hitting.
How NOT to Eliminate the Noise
There are many ways you can filter ghost spam and have a clearer insight from Google Analytics. Unfortunately, a lot of site owners still make the mistake of using the wrong methods. Blocking ghost spam using .htaccess, for instance, can potentially block legitimate traffic and crawlers without actually solving the problem.
The same can be said for using referrals to exclude certain types of traffic. This is also an ineffective approach to use, because ghost spam hits don’t always come from a referring URL. More importantly, you can easily break the functionalities of your site that relies on referrals, such as payment processing and newsletter subscription.
So, how can we block ghost spam?
As mentioned before, ghost spam doesn’t really visit your site. It uses measurement protocols to create the illusion of a visit. Instead of using complicated filters and methods to block the noise, you can actually use a simple Valid Hostname filter to do the job.
Select View > Filters and add a new filter. Select a custom filter type and name the filter accordingly. You can then search for Hostname under the Include > Filter Field dropdown, and then enter your valid hostname to include.
If you’re using a VPS server, finding a hostname should not be a problem. You would’ve set up the hostname yourself, or you can use the “who am I” command through SSH to get the details you need. On a shared hosting account, the hostname for your account is usually displayed on the administrative panel. For cPanel, a hostname is usually displayed on the right table near the bottom.
Yes, it is really that simple. Test the filter and you’ll see every ghost spam removed from the Google Analytics measurement. You can also activate and deactivate the filter at will, depending on how you want to analyse your data. Now that you have eliminated the noise, you can track the growth of your site and gain many more insights effectively through Google Analytics.