what blows my mind is that they aren't doing more to fight the referral / event tracking spam. it's totally out of control.
Ask HN: How can I trust Google Analytics?
21–30 of 46 posts
Re: Ask HN: How can I trust Google Analytics?
#22Re: Ask HN: How can I trust Google Analytics?
#23We just ran into a problem with Google Analytics trying to track opening clicks by sending an event to GA. Turns out when you click a link to open it, the browser page would load before the event to GA could be sent. Screwed up a huge amount of our click tracking data on GA.
Why not just use an event handler which sends the event to GA, and after that, follows your link? They provide a callback and everything... var outboundLink = function(url) { ga('send', 'event', 'button', 'click', {'hitCallback': function () { document.location = url; } }); } Foo See: https://developers.google.com/analytics/devguides/collection...
Re: Ask HN: How can I trust Google Analytics?
#24Re: Ask HN: How can I trust Google Analytics?
#251. Yes, Google Analytics can be quite useless if you keep default settings with no configuration.
2. That doesn't mean you should jump straight to a self-hosted solution, or a paid solution, or throw up your hands and say "it'll never be accurate."
For most use cases, GA is more than good enough to measure effectiveness of online marketing efforts. Dismissing it outright in favor of a paid or self-hosted option just because you didn't google "how to prevent analytics hijacking" is bad decision-making.
/rant
Now on to the fix...
You can create a filter in your GA view settings to ignore tracking calls from any hostname other than your own. See here: https://support.google.com/analytics/answer/1033162?hl=en
PS - No client-side analytics will ever be 100% accurate, certainly not GA. But for the purposes of measuring marketing efforts and results, you can have greater tolerances. It's a tool for marketing, not logging.
Re: Ask HN: How can I trust Google Analytics?
#26We just ran into a problem with Google Analytics trying to track opening clicks by sending an event to GA. Turns out when you click a link to open it, the browser page would load before the event to GA could be sent. Screwed up a huge amount of our click tracking data on GA.
Why not just use an event handler which sends the event to GA, and after that, follows your link? They provide a callback and everything... var outboundLink = function(url) { ga('send', 'event', 'button', 'click', {'hitCallback': function () { document.location = url; } }); } Foo See: https://developers.google.com/analytics/devguides/collection...
ga('send', 'event', 'button', 'click', {transport: 'beacon'});
This will work even after you redirect to another page but only if the browser supports navigator.sendBeacon(). Currently not IE or Safari.Re: Ask HN: How can I trust Google Analytics?
#27Re: Ask HN: How can I trust Google Analytics?
#28Nice experiment! Link for the lazy: https://github.com/goferito/gapoc I guess SEO people already know this, the question is: can you trust a SEO consultant?
Re: Ask HN: How can I trust Google Analytics?
#29GA is really not a product you want to trust your business with. Best approach is to consider self-hosted analytics solutions.
I built my own for my needs which also include combined features for security analytics to investigate malware attacks. GA is totally useless in this aspect.
Re: Ask HN: How can I trust Google Analytics?
#30Taking advantage of GA deficiencies is widely used to inflate traffic figures during website sales negotiations. GA is really not a product you want to trust your business with. Best approach is to consider self-hosted analytics solutions. I built my own for my needs which also include combined features for security analytics to investigate malware attacks. GA is totally useless in this aspect.
Of course it is, it's a marketing analytics tool. It's totally useless for many things that aren't related to marketing.