How to block Google Analytics referral spam

How to block Google Analytics referral spam - Famdirksen

How to block Google Analytics referral spam

Robin Dirksen 22 Mar 2019 08:50

The last few days our customers experienced some referral traffic spam in Google Analytics from a website called They asked us: 'How to block in Google Analytics?'

How to block Google Analytics spam from

To block as a referral you have to follow the next steps:

  1. 1. Open in Google Analytics the "Admin" section, go to "View" (the right column) and select "Filters".
  2. 2. Click on the "+ ADD FILTER" button to exclude the results.
  3. 3. Enter a filter name that you can remember, something like "block".
  4. 4. By the "Filter Type" you have to select the "Custom" option.
  5. 5. Select the "Exclude" radio option. Then the "Filter Field" will popup where you can select "Campaign Source". As the "Filter Pattern" you have to enter the domain, the will look like "".
  6. 5.1. It's also possible to filter multiple domains at the same time, this can be done by adding a "|" between the domains. Then the "Filter Pattern" will look something like this: "||".
  7. 6. To save this filter, scroll down and click the "Save" button.

The filter will be applied on all data that's captured by Google Analytics. To verify that your filter is working you can click the "Verify this filter" link when you create or edit the filter.

How to block spam from Google Analytics

Allow only a valid hostname as a filter in Google Analytics

It's also possible to only "include" a specific hostname to your Google Analytics data. This can be done by creating a filter that uses a regex to check if the domain is valid.

Google Search trends: Google Analytics Spam vs.

Here you can see what the current Google Search Trend is for the past 7 days for the search terms: "Google Analytics Spam" and "". We use the worldwide search data from Google Trends for displaying this chart.

Related spam domains