joined:Nov 5, 2013
Sorry, forgot to check this thread and notifications are turned off. Do you use Gmail? Do you wonder why it does such a great job at spam filtering? Part of it's algorithm relies on crowd sourcing. If webmasters were able to mark a referral as spam and Google actively filtered entries out, referral spam would go away completely.
Part of the reason that referral spam has gotten so far out of hand is that you can quickly and easily write a bot to crawl around and find Google Analytics IDs. Hopefully Google will deal with it at some point. For now, I've come up with a concrete way to kill off referral spam:
1) Create and delete a few properties to increment your property id. The more the merrier. After you do this a few times, keep one of those properties. The property id is the number after the last dash (-).
2) Remove all instances of Google Analytics from your page, sign up for Google Tag Manager and use that. If you don't want to sign up for Google tag manager, the other option is to encode your analytics id using btoa
it when your page loads. For example, if your property id is UA-11111111-9, then it becomes VUEtMTExMTExMTEtOQ==
Example analytics code:
var trackingCode = atob("VUEtMTExMTExMTEtOQ==");
ga('create', trackingCode, 'auto');
Note that I didn't check the above code for typos. The only way they could possibly spam you at that point would be either to a) guess your property id or b) Run their code within the context of your page.