For anyone still battling with referral spam in G Analytics

Another thing worth considering. If you have a big site that's getting traffic in the millions, and you're already dealing with GA traffic data sampling issues, the last thing you need is crap traffic still hitting your site, still firing GA codes, still affecting your sampling. In that sort of case, maybe consider server side redirects or other HTTP status codes based on specific referrers you want to block (for example, serve a 406 or 302 to Google.com or somewhere else non-vital and off your site).

Also, another option you might be able to make work. Serve your analytics tags with Google Tag Manager, and you might be able to come up with some custom Triggers and/or Variables that will prevent your GA tag from firing on referral hits from specific referrers. I haven't used this method myself, but it's theoretically possible I believe, especially considering there's a Referrer URL variable available by default in GTM.
 
They actually go into blocking via htaccess and other solutions in quite some detail.

::emp::
 
Back