Web Analytics

Fighting Referrer Spam in Google Analytics

Referrer spam is becoming more and more of a problem in Google Analytics.  Referrer spam, sometimes known as referrer bombing, is a technique that exploits the way Google Analytics gathers data to insert fake traffic from spam websites into your Referral reports. It corrupts your web analytics data and wastes your time.  This blog post will guide you through some recommended steps you can take to remove referrer spam from your Google Analytics reports.

Before proceeding, you should remember the first rule of referrer spam: Do Not Click It! Visiting spam referrers can trigger further attacks on your site or can download malware onto your computer.  Google any strange domains you find in your Referral reports instead of visiting them directly.

1. Create a filtered view to include only legitimate traffic.

In the following steps you will create one filter that will eliminate most so-called “ghost referrers”, which send spam data directly to Google Analytics without ever visiting your site.  Then you will also create a second filter to exclude the spambots that get past the first filter.

  1. Create a new View.  You should always keep one View in your account that has no filters at all.  Filters are irreversible: once you apply them any data you exclude or change is gone/changed forever.
Create a new View in Google Analytics Admin
  1. Create a hostname filter.  This filter should use the following settings:
  • Filter Type: Custom
  • Include
  • Filter Field: Hostname
  • Filter Pattern: Use a regular expression that matches every domain that you track in this account.  Do not forget any third-party payment processing, shopping carts, or other domains you might be tracking.

 

Create a custom hostname filter in Google Analytics Admin

 

  1. Create a campaign source filter.  This filter should use the following settings:
  • Filter Type: Custom
  • Exclude
  • Filter Field: Campaign Source
  • Filter Pattern: .*(darodar\.com|buttons\-for\-website\.com| social\-buttons\.com|7makemoneyonline\.com|blackhatworth\.com|priceg\.com| o-o-6-o-o\.com| megamozg\.ru)

 

Add any spam referrers that come up in your reports to this Filter Pattern regular expression (see Google support for help regular expressions).

Filters only apply to traffic from the moment they are created, not to past traffic.  We recommend also creating an advanced segment to use for a clean view of your past traffic as well, which the next step demonstrates.

2. Create a segment to show only non-spam traffic.

Creating a “No Spam” segment will allow you to view your Google Analytics reports without the distortions created by referrer spam traffic.  To create a segment click ‘+Add Segment’, then ‘+New Segment’ in any report in Google Analytics. The segment should use the following settings:

  • Advanced: Conditions
  • Filter Sessions Include: Hostname matches regex: Here you should use the same expression you created for the Hostname filter, as described above.
  • Click Add Filter
  • Filter Sessions Exclude: Source matches regex: Here you should use the same expression you created for the Campaign Source filter, as described above.
Google Analytics Example Spam Filter

3. Update your campaign source filter and “No Spam” segment with new referrer spammers as you discover them.

While this requires continuous manual updates, it is effective.

4. Use Google Analytics’ built in bots and spiders exclusion.

In the Admin section of Google Analytics, the View Settings include an option to “Exclude all hits from known bots and spiders”.  Check this box to allow Google Analytics to filter out bots that it has already identified.

Google Analytics bot filtering option

This is not the only way to deal with referrer spam. One alternative strategy suggested by Lunametrics is to use cookies to set a Universal Analytics custom dimension, then filter for only sessions that have that custom dimension set.

The process described here is a well-tested process that you can do from the comfort of the Google Analytics interface.

Below is a list of known referrer spammers.

Known Referrer Spam Domains: (Do Not Visit!)

social-buttons.com

buttons-for-website.com

o-o-6-o-o.com

blackhatworth.com

megamozg.ru

darodar.com

humanorightswatch.org

hulfingtonpost.com

priceg.com

makemoneyonline.com

bestwebsiteawards.com

iloveitaly.com