Fighting Referral Spam (

Posted 5 years ago by Dmitry Klymenko

2 Minute(s) to read

referral spam1

Referral spam just evolved.

We all know about Semalt buttons for website and other companies using unethical referral spam. With Google's Measurement Protocol, these guys can totally pollute your account data. We expect Google will definitely do something about these guys soon, in the mean time, we are on our own.

Referral spammers used to just insert their website URL into your GA referral reports by using Measurement Protocol or simply by visiting your website using an automated browser. We used to fight them by filtering them out using Google Analytics filters, deny requests (at a web server level) based on the referring URL and simply removing the data/lines from our reports.

The spammers exist in the hope that you will visit their page and buy their products or click on the advertisement. They also collect IP address(es) of website admins to be used for not-really-legitimate applications.

The new generation of referral spammers don't just insert dummy referrals in your Google Analytics reporting, thanks to the Google Analytics Measurement Protocol they can now push new URLs to your reports, create fake events, insert search terms, emulate (affiliated) transactions, etc.


The screenshot above shows how push data with Event category, action and label containing text links to their website. This website mimics a page from Google Analytics Eventing manually stuffed with Adsense. But that's not it. They also tag your browser with the aliexpress affiliation cookie, so next time you shop there - they get the credited.

Luckily they can easily be filtered out of your GA data, as they still specify their website referral. But what if they did not?

The Internetrix Online Performance team recommends implementing the following filter configuration for Referral SPAM exclusion.

  1. In your Google Analytics account, Click Admin
  2. Choose desired property and working View
  3. Click on Filters
  4. Click on red button +NEW FILTER
  5. Choose filter type to be Custom / Exclude
  6. Select Referral as Filter Field
  7. Enter a Regular Expression matching the bombarding referral spammers domains you see in your data
  8. Save the Filter and apply it to the Testing View
  9. Wait until you are confident the filter works as it should and apply it to every View used for analysis


Internetrix is a certified Google Analytics Partner (GACP) and Google Analytics Premium Reseller. Our proven analytics methodology has been helping clients Win Online since 2000.