How to block referral spam on Google Analytics?

by Alice Woods - -


Issue: How to block referral spam on Google Analytics?

How can I block referral spam on Google Analytics? referral continuously shows up on the stats. Please help!

Solved Answer


Google Analytics referral spam is considered to be a relatively new phenomenon. However, after initiating a research on this type of spam, we have found out that some of the fake referrals have been circulating on Google Analytics reports since the end of the 2015. One of the first referral spam examples detected is Despite being an old-timer fake referral domain, fake URL has maintained its position and keeps polluting Google Analytics stats thus far. In general, referral spamming is also known as “Ghost Traffic” because it targets Google Analytics accounts directly, meaning that no real visitors have been landing on the website. For this purpose, spammers render Measurement Protocol or spamdexing technique, which injects bogus traffic indications, such as referrals, keywords, fake pages, bounce rate, duration, unique visitors, etc. to attract users’ attention. Therefore, if you have noticed that your website has been visited via in a very unusual way, for example, that the number of visitors from this fake referrer increased from zero to several hundred or more, it’s then clear that your Google Analytics account has become a victim of spammers. It has been noticed that referral spam is spread with a modified URL name, for instance, the name may include various word combinations including words like free, social, traffic, floating, button, and similar. Nevertheless, if the user of spammed Google Analytics account copies the name of this fake URL and enters it in the URL address, will open as a destination site.

Referral spam is not considered to be a crime as it does not affect the website or its position on Google search results. The spammers who spread fake URL seek to drive traffic to their website or affiliates. However, security experts warn that domain might not be safe to visit as its script may contain a malicious code, which may attract malware on your website. If the code gets inserted into the website, the hacker might get access to the victim’s social media account details, record usernames, passwords, and similar personal information. Thus, it’s very important NOT TO ADD SHARE BUTTON provided on referral spam domain. In case you have already visited this URL and doubt about the content that you’ve downloaded on it, initiate a full scan with a professional anti-malware. For this purpose, use Reimage.  Once done, sort out referral domain from your Google Analytics stats by performing the steps given below:

How to block referral spam from Google Analytics?

Step 1. Change Filter Pattern

  1. Go to Admin -> All Filters. Then go to New Filter and type in the Filter Name box.
  2. Select Custom Filter Type, then choose Campaign Source from the drop-down Filter Field menu.
  3. Eventually, in the Filter Pattern field, enter and click Save.

Step 2. Alter HTTP settings

  1. Sign in to cPanel account, navigate to File Manager section and click on the checkbox called Document Root for -> your website.
  2. Click on Show Hidden Files and click Go. Once you locate the .htacess file, right-click on it and choose Code Edit. Enter the following text ant click Save Changes.

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

Step 3. Modify Language filter

  1. In your Analytics account, go to Admin Tab.
  2. Click VIEW, select Filters and then hit +Add Filter.
  3. In the Filter Name box, type: Language Spam.
  4. In the Filter Pattern box, type in: \s[^\s]*\s|.{15,}|\.|,
  5. Click on Verify this Filter, then Save.

You can apply the same steps for any referral domains that look suspicious to you. Hopefully, you have successfully terminated spam from your Google Account and now can see a clear stats.

We might be affiliated with any product we recommend on the site. Full disclosure in our Agreement of Use.
By Downloading any provided software you agree to our privacy policy and agreement of use.
do it now!
computer optimizer Happiness
do it now!
computer optimizer Happiness
Compatible with Microsoft Windows Compatible with OS X
Alternate Software
Plumbytes Anti-Malware

What you can add more about the problem: "How to block referral spam on Google Analytics?"

now online
Like us on Facebook