Preventing the Google Analytics referral spam from

block referral spam from Google Analytics

In the last recent days our customers have faced some unusual traffic spamming in Google Analytics from So maybe you are trying to figure out how to actually block the spamming of traffic from This article will tell you how to do that step by step.

How to prevent Google Analytics spam from

Here are the steps to follow for blocking the spam from

  1. Open the “Admin” section in Google Analytics and go to “View” which is on the right column and select “Filters”.
  2. Next click on the “+ADD FILTER” button and you’ll be given a field to add a filter.
  3. Then enter a filter name that you want to block. For Example, to block enter “block 1-99seo”.
  4. Select the “Custom” option from the “Filter Type”.
  5. After that, select the “Exclude” radio option. Then a popup screen will appear which is the “Filter Field” and you can select “Campaign Source” from there. Enter the domain in the “Filter Pattern”. In this case, the domain is “”.
  6. You can also filter multiple domains at the same time. And to do so, just put a “|” between the domains. For example: “||”.
  7. To save this filter simply scroll down and click on the “Save” button.

You’ll find that the filter will be applied for Google Analytics and all the data that has been captured. To verify if your filter is working or not, just click on the “Verify this filter” link when you edit or create the filter.

How to allow only a specific and valid hostname in Google Analytics as a filter

To allow valid hostnames in Google Analytics, you can do that by creating a filter. The filter uses a regex to check the validity of the domain.   

  • Comments are closed