How to get rid of referral spam

on Tuesday 22 November 2016
Unfortunately, there’s no way to get information OUT of Google Analytics once it’s in there. However, there are ways to keep this kind of spam out in the future, and to remove it from the reports on existing data.

How to block referral spam in Google Analytics

As the name suggests, we usually see this kind of spam in the referral-section of Google Analytics. If Analytics isn’t properly set up (that’s by far in most of the cases), you can see suspicious referrals (under Acquisition > Referrals), such as:

  • Etc.
In the case of the Vote for Trump referral spam, the information is located in the language-tag (under Audience > Geo > Language).

To effectively block referral spam, do the following in Google Analytics:

  1.     Go to ADMIN > All Filters
  2.     Click on “ADD FILTER”
  3.     Give the filter a name (e.g. “include host only”)
  4.     Click on Filter Type “Custom”
  5.     Click “Include”
  6.     Click “Select Field” and select “Hostname”
  7.     Under “Filter Pattern”, add the domain name of your website (e.g. “”)
  8.     Apply the filter to any of your profiles.

This will ensure that only Analytics requests from your own domain will be counted in Google Analytics. Automated , external requests from other domains will not be included in the data.

How to remove referral spam from Analytics reports

In order to remove referral spam from reports, add a similar filter to the reports. In the case of the Donald Trump referral spam, do the following to filter the referrer spam out of any Analytics report or Data View:
  1. Create a new Report or Segment
  2. Click on “Traffic Sources”
  3. Under “Source”, type the domain of the spammer you’d like to exclude (e.g. “” 
  4. If you have multiple spammers, choose “matches RegEx” and add a list of spammer domains, separated by a pipe sign and with a backslash before the dot (e.g. “webmonetizer\.net|wmasterlead\.com”. Feel free to omit the top domain levels (e.g. “.com” or “.ru”) altogether.
  5. Save your report or segment.