Referral spam showing in google analytics


#1

I have a problem with referral spam on my site on meteor.com

I can mask them in Google analytics, but it would be better to prohibit them hitting the site at all. Anybody has any experience with that? My particular problem is howtostopreferralspam spammer.
Since I have no access to the nginx on the meteor.com the usual tactic is not working of course.

If you don’t know what referral spam is, check http://botcrawl.com/block-referrer-spam/

  • If I have an apache, I would do something like
    RewriteEngine on
    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://.*buttons-for-website.com/ [NC,OR]
    RewriteCond %{HTTP_REFERER} ^http://.*semalt.com/ [NC,OR]
    RewriteCond %{HTTP_REFERER} ^http://.darodar.com/ [NC]
    RewriteRule ^(.
    )$ – [F,L]

#2

answering my own question

Inject.rawHead('loadingScripts', 
'  <link class="inject-loading-container" rel="stylesheet" href="/preload.css">\n' + 
'<SCRIPT type="text/javascript">' +
'var pattern = /howtostopreferralspam|sanjosestartups|ilovevitaly|Get-Free-Traffic-Now/;' +
'if (pattern.test(document.referrer)) {location = "http://google.com"	}' +
'</SCRIPT>'
);