Block Google Analytics Spam

Referral spam certainly among the most common nuisances you are likely to come across on the worldwide web. This an especially well known problem of online business owners, website admins and anyone who is in charge of or has to do with the functioning of a website. One of the most recent variants of this type of software is better known as and today we’ll be discussing the exact way this referral spam operates. Furthermore, we will also give you a little bit of history of this internet phenomenon, so that you are better aware of what exactly it does and why. Let’s begin.

What is

The short answer is that is referral spam, more specifically – ghost spam. We say that to distinguish it from its forefather, the so-called classic referral spam. Both types are essentially after the same thing and even pursue it by very similar means, only with one small difference in their technique that is critical in understanding how both types work. The classic referral spam variants would send bots and crawlers to the websites of numerous businesses, vendors or even not for profit organizations and individual website owners. The goal was to generate views or hits for those websites that would show in their statistics. Only the views would typically be very short lived, with near 100% bounce rate. This would in theory prompt the website owners or admins to click back on the said website that appears as the visitor (aka the bots and crawlers). There – mission accomplished. But what happened? – you may ask. Well, you or the whoever the website owner or admin was, generated traffic for the spamming website. It seems like an absurd scheme, but that is essentially what’s happening with referral spam and if you picture it on a much larger scale of say, thousands and hundreds of thousands affected sites, if even a fraction of them would click back on the spammers, this would already be a substantial amount of traffic.

Obviously, the aim here is for the spammers to gain more traffic for their website and thus boost their ranking. However, Google was soon able to clamp down on the unfair practice and was able to start detecting and putting a stop to the classic referral spam as a whole. This is what gave birth to the type fo referral spam you are dealing with now,, and are most likely to ever come across nowadays – ghost spam. Spam like also aims to trick website owners and admins into believing they’ve been visited by some legit website for some legit reason. And just as in the case of the older, more primitive version, they would click back to investigate.

But where’s the difference then? Simple. Instead of relying on the bots as classic referral spam did, ghost spam heads straight over to your Google Analytics stats and affects them, making it only look like you’ve been visited numerous times with a very-very high bounce rate. So, in this sense, it’s even less harmful to you than its predecessor, because it doesn’t affect your actual traffic count. But that’s not to say that it should be tolerated either. As a matter of fact, the longer you allow to keep on doing what it’s been doing thus far, it will keep further and further messing up your statistics. Yes, the longer remains active, the more distorted your stats will become, and will become ever harder for you to be able to keep track of the real data, related to your website’s audience.

What to do?

Below we’ve included a detailed removal guide that will help you remove from your life and stop it from further ruining your life. Please refer to those, once you’re done reading here. We would however, like to recommend that you stay as far away from the Referral Exclusion list for matters like these, because you are likely to make matters far worse otherwise. From now on it would be wise to consider investing in better hosting, which will in turn be able to provide you with better spam blocking mechanisms and filters. If referral spam came knocking on your door with the hosting you’re using now, who’s to say others won’t follow?

Block Google Analytics Spam

STEP 1: In your Analytics account go to Admin —> All Filters.

pic 1(1)

STEP 2: Next, click New Filter and add in the Filter Name value.

STEP 3. Select the Custom Filter Type.  In the Filter Field —> Campaign Source. In the Filter Pattern text box, add and click the Save button at the bottom of the webpage.

Pic 2(1)

Blocking referrer spam through .htaccess

If you know how to access your .htaccess file, you just need to input the following code in there:

RewriteCond %{HTTP_REFERER} [NC,OR]
RewriteCond %{HTTP_REFERER}
RewriteRule .* - [F]

If you don’t know how to access it, do the following:

Login to your cPanel account —> File Manager —> click the check-box “Document Root for—> your website. A side note: click on “Show hidden Files” and then Go. Find the .htacess file, right click it and choose Code Edit. Input the code I gave you and Save Changes. 

Did we help you? A thank you in the comments goes a long way to warm our hearts!

About the author


Violet George

Violet is an active writer with a passion for all things cyber security. She enjoys helping victims of computer virus infections remove them and successfully deal with the aftermath of the attacks. But most importantly, Violet makes it her priority to spend time educating people on privacy issues and maintaining the safety of their computers. It is her firm belief that by spreading this information, she can empower web users to effectively protect their personal data and their devices from hackers and cybercriminals.

Leave a Comment