Google analytics "referral" spam is a common problem with webmasters – often seeing 100's of visitors from various sources, only to realize the major of them are either fake or illegal.

Whilst it's difficult to "block" this traffic through your website (and you've need to do this through your web hosting software), it's simply simple to get rid of it from your Google Analytics reports.

To do this, there are two features you need to use. The first is the "Filters" feature of GA. This allows you to remove any future fake referral traffic from your reports. The second is the "Segments" feature – which basically allows you to remove the various "fake" spam visitors from your current reports.

The following will explain how to do this properly …


The majority of "SPAM" traffic comes from bots. These are well-documented (they're known as referral spam, log spam or referrer bombing) – and basically work by the spammer sending fake requests to a website in the hope that their referral information (typically including some sort of advertising message) will be republished by the target website. The practice is commonly associated with spam farms and fake virus creators. Unfortunately, it's particularly prevalent with Google Analytics users (where the spammer may not even access the target site).


1. Filters

The first step is to use the "Filters" feature to remove future referral spam from your analytics profile. This is only available if you're using the new "gtag.js" Javascript widget (as opposed to the older "analytics.js" widget).

The setup of "filters" is simple:

  • Click on "Admin" (left) icon (it's a small "cog" icon at the bottom left of the screen)
  • On the screen which shows, click "All Filters" from the left-most column
  • When the filters show, you'll be able to add the ones you need

You need to add several filters – firstly to ensure that any extra "spam" sites are not sending random referral traffic to your sites; secondly, to target specific sites which may be sending referral spam …

  1. Click "+ Add Filter"
  2. Add the domain name that's sending the fake traffic to the "name" box
  3. For "Filter Type", select "Custom"
  4. From the bullet-points, select "Exclude"
  5. Select "Campaign Source" and then type the domain that's sending fake traffic into the box provided
  6. Apply it to as many views as you need (we just add it to all views)
  7. Click "Save"

This will remove the fake traffic from the specific domains listed in your filter.

However, you also need to add a number of other filters to get rid of the swathes of fake traffic permeating the net.

These are from "standardized" fake websites, which means you'll need to add several of them in order to get rid of the major of fake traffic from your future reports:

  • Click "+ Add Filter"
  • Add the name "Spam1" to the "name" box
  • Select "Custom" from the options box and from the "Filter Field", select "Campaign Source"
  • Into the input box, type the following:
  • dailyrank | 100dollars-seo | semalt | anticrawler | sitevaluation | buttons-for-website | buttons-for-your-website | -musicas * -gratis | best-SEO-offer | best-SEO-solution | savetubevideo | bycontext | 7makemoneyonline | kambasoft | medispainstitute

This removes the largest number of "fake" websites that typically flood the "referrals" reports on Analytics. Whilst not essential, it will ensure that your reports remain as honest as possible.

2. Segments

The second step is to add a "No Spam" segment to your views.

Whilst this does not remove the various reports from your system, it does ensure that you're not seeing the various spam websites in your traffic reports.

Doing this is simple:

  • Click on any "property" for which you're tracking traffic etc
  • At the top, you'll see a horizontal list of "segments" (which are used to determine exactly which type of visitors you wish to see)
  • From the list, select the "All Users" (or whichever one is selected) segment
  • The "segment" management panel will load
  • Click "+ New Segment"

This will bring up a panel from which you're able to filter the present data within your Analytics account.

To set it up properly, you need to choose the following:

  • Give the segment a name (we use "No Spam")
  • From the left menu, select "Advanced / Conditions"
  • This will bring up a panel from which you're able to add the different traffic sources to block
  • From here, select the following:
  • Sessions> Exclude (this excludes any matched data from your reports)
  • Source> matches regex (this allows you to define one – or multiple – domains to block
  • Add the domain that's sending fake traffic into the input box: ""

If you need extra sites blocked, just click "OR" from the bottom right of that little box, and add another "Source" (as listed above).

This should remove that type of traffic from your reports. It's also able to be added to all your sites / views, making it very simple to change it all from a single panel.

Doing this will remove firstly any fake traffic from your account – but also remove any existing traffic at the same time.

We've found that the rise of bots has become prolific. Whilst it's simply simple to resolve, you need to be sure that you're able to correctly cleanse your data of the ghost traffic. The above does that.

Leave a Reply

Your email address will not be published. Required fields are marked *