Single Blog Title

This is a single blog caption

How to Fix Google Analytics Spam Traffic

If you’ve been paying close attention to your Google Analytics (GA) reports over 2015, you’ve likely noticed a sharp uptick in the amount of spam referral visits that are being recorded to your web site(s). Or worse, you haven’t noticed, and are basking in the growth of your web traffic. Sadly, most GA data sets have been compromised, and need work in order to be accurate. (This was true even before the 2015 spam referral issue came up, but let’s focus on one thing at a time).

How can I tell if my Analytics have been affected by referral spam?

This one is pretty easy. Looking at Referral Traffic reporting under the Acquisition >> Sources menu items in Google Analytics, you’ll see the following sites listed in the report (here’s a hint: they didn’t actually link to your site).

google-analytics-spam

So how do I fix Google Analytics referral spam?

Block the traffic with your .htaccess file

There are two sides to fixing this problem – first there’s shutting off the spam traffic so it can’t hit your server. If you’re running on a Linux web host, have someone on your IT staff make an alteration to the .htaccess file to block referrals from the domains in question. Here’s a starting point for the .htaccess file: You may have to add some domains (and please be careful when editing your .htaccess files. An errant slip in formatting can take down your site).

# Block Russian Referrer Spam
RewriteEngine on
RewriteCond %{HTTP_REFERER} ^http://.*buttons\-for\-website\.com/ [NC,OR]
RewriteCond %{HTTP_REFERER} ^http://.*darodar\.com/ [NC,OR]
RewriteCond %{HTTP_REFERER} ^http://.*success\-seo\.com/ [NC,OR]
RewriteCond %{HTTP_REFERER} ^http://.*videos\-for\-your\-business\.com/ [NC,OR]
RewriteCond %{HTTP_REFERER} ^http://.*video\-production\.com/ [NC,OR]
RewriteCond %{HTTP_REFERER} ^http://.*sitevaluation\.org/ [NC,OR]
RewriteCond %{HTTP_REFERER} ^http://.*4webmasters\.org/ [NC,OR]
RewriteCond %{HTTP_REFERER} ^http://.*economy\.co/ [NC,OR]
RewriteCond %{HTTP_REFERER} ^http://.*traffic2money\.com/ [NC,OR]
RewriteCond %{HTTP_REFERER} ^http://.*trafficmonetizer\.org/ [NC,OR]
RewriteCond %{HTTP_REFERER} ^http://.*100dollars\-seo\.com/ [NC,OR]
RewriteCond %{HTTP_REFERER} ^http://.*make\-money\-online\.com/ [NC,OR]
RewriteCond %{HTTP_REFERER} ^http://.*anticrawler\.org/ [NC,OR]
RewriteCond %{HTTP_REFERER} ^http://.*trafficmonetizer\.org/ [NC,OR]
RewriteCond %{HTTP_REFERER} ^http://.*trafficmonetizer\.org/ [NC,OR]
RewriteCond %{HTTP_REFERER} ^http://.*ilovevitaly\.com/ [NC,OR]
RewriteCond %{HTTP_REFERER} ^http://.*ilovevitaly.\.ru/ [NC,OR]
RewriteCond %{HTTP_REFERER} ^http://.*ilovevitaly\.org/ [NC,OR]
RewriteCond %{HTTP_REFERER} ^http://.*ilovevitaly\.info/ [NC,OR]
RewriteCond %{HTTP_REFERER} ^http://.*iloveitaly\.ru/ [NC,OR]
RewriteCond %{HTTP_REFERER} ^http://.*econom\.co/ [NC,OR]
RewriteCond %{HTTP_REFERER} ^http://.*savetubevideo\.com/ [NC,OR]
RewriteCond %{HTTP_REFERER} ^http://.*kambasoft\.com/ [NC,OR]
RewriteCond %{HTTP_REFERER} ^http://.*semalt\.com/ [NC]
RewriteRule ^(.*)$ – [F,L]

Remove spam referral traffic from Google Analytics with Filtered View

If you’re not able, or don’t feel comfortable accessing your site’s .htaccess file, you can proactively filter out referral spam using a Filtered View in your Google Analytics account. First and foremost, you should always have an unfiltered view for data testing purposes, so if you haven’t already, create a new view:

Create-Analytics-View

Once you’ve created the new view, you need to set up the filter. There are two filters that can assist in filtering spam traffic proactively. The first is a hostname filter, which delimits all traffic that doesn’t access your website at yourdomain.com.

Creating a Hostname Filter to remove “ghost” spam traffic

  1. Go to the “Admin” Section in Analytics
  2. Create a new “View”, if you don’t have a separate one already.
  3. Click “Filters” under the view section on the right (be sure you’ve selected the View you would like to Filter)
  4. Click “+New Filter”
  5. Create a Filter with the following settings

This solution is great if you have a single domain scenario. Remember, if you have multiple domains, or perhaps marketing automation software that serves your web site on an alternate domain, you may have to create a filter that includes that hostname also. You can also create a custom filter type that utilizes a regular expression to list multiple host names. Check out this megalytic article which has more information on that.

Create a Referral Filter in Google Analytics

Now that we’ve reduced the ghost spam, you also need to create a filter pattern for the spam sites that are junking your data. Same exercise as before, but this time we’re delimiting the referral source, instead of the hostname:

  1. Go to the “Admin” Section in Analytics
  2. Create a new View, if you don’t have a separate one already.
  3. Click “Filters” under the view section on the right (be sure you’ve selected the View you would like to Filter)
  4. Click “+New Filter”
  5. Create a Filter with the following settings – they’re split into 3 lines, as you have a hard limit of 255 characters per filter construction (Read: You’ll have to create three similar filters using the below plus any additional referral sources that you’re seeing in your data)
    1. buttons-for-website\.com|darodar\.com|success\-seo\.com|videos\-for\-your\-business\.com|video\-production\.com| sitevaluation\.org| 4webmasters\.org|economy\.co
    2. traffic2money\.com|trafficmonetizer\.org|100dollars\-seo\.com|make\-money\-online\.com|anticrawler\.org|trafficmonetizer\.org|trafficmonetizer\.org|ilovevitaly\.com|ilovevitaly.\.ru|iloveitaly\.org
    3. iloveitaly\.info|iloveitaly\.ru|econom\.co|savetubevideo\.com|kambasoft\.com|semalt\.com

 

Google-Analytics-Hostname-Filter

Remove spam referral traffic from Google Analytics with Advanced Segment

Once you’ve shut the spigot into your site, now there’s the problem of retroactively fixing your Google Analytics reports. An advanced segment that delimits the list of spam referrals is your best bet.

I’ve created an advanced segment that covers the majority of the spam sites I’ve seen, but you may need to add others with the same “OR” Boolean construction.

If you’ve gotten this far, and need some additional reading material, there are a few good resources out there that are more detailed than this post. Good luck!

 

Need additional help with your analytics setup? Give us a call!