How to filter referral spam in Google Analytics

In your Google Analytics reports, you might have came across with traffic coming from sources such as semalt.com, darodar.com or social-buttons.com. Such traffic is commonly know as “referral spam”. Recently, the amount of referral spam in Google Analytics has significantly increased. It might seem your site has a lot of visitors, but in reality none of such visits is real. Although referral spam does not pose a serious threat to your site (except bursts of workload of your server) it might seriously distort your web analytics data, especially when your site does not have tens of thousands visits per month.

Luckily, the solution is quite simple, you just need to define a filter on your view (make sure you have at least one view where unfiltered data are available).

screenshot-www.google.com 2015-04-08 09-42-40 (1)Simply go to “Admin” section of Google Analytics and select a view on which you want to apply the filter. Then select a “Custom” filter type that exclude filter field “Referral”. Set a filter pattern on following regular expression:

 

.*(semalt\.com|social\-buttons|darodar\.com|makemoneyonline|googlsucks|best\-seo\-solution|best\-seo\-offer|.*share\-buttons|buttons\-.*\-website|guardlan|buy\-cheap\-online|seo\-success).*

It filters out the referral spam from following domains :

  • semalt.com
  • social-buttons.com
  • darodar.com
  • buttons-for-website.com
  • makemoneyonline.com
  • googlsucks.com
  • best-seo-solutions.com
  • best-seo-offer.com
  • free-share-buttons.com
  • buttons-for-your-website.com
  • guardlan.com
  • buy-cheap-online.info
  • success-seo.com

Make sure you include “.*” on both beginning and end of your expression since Google Analytics always compare the expression to full referral path. There is a great tool called Rubular, which you can use for testing your regular expressions. In case you came across with other spam referrals, simply add the to your regular expression. You can find a full list of referrals used by spammers here.