Live data from Hacker News

Ask HN: How can I trust Google Analytics?

news.ycombinator.com

21–30 of 46 posts

Re: Ask HN: How can I trust Google Analytics?

#23
post #20
post #8

We 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...

And now you have a website that feels slow to respond to link clicks.

Re: Ask HN: How can I trust Google Analytics?

#24
post #6

Earlier quoted context omitted.

Is there any other reliable tool I can use instead?

You could use Piwik, it's Open Source and you can self-host it. http://piwik.org/

This is what I do, and I've been really happy with it so far.

Re: Ask HN: How can I trust Google Analytics?

#25
I do marketing ops consulting and see this stuff all the time. First, let's get two things out of the way:

1. 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?

#26
post #20
post #8

We 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...

You can also do

    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?

#27
Update your javascript tracking code to include a nonce generated serverside. Send the nonce along with the rest of the report to the tracking server. Filter out reports with duplicate or missing nonces. Dunno if you can do it with GA, you might have to hack it into Piwik.

Re: Ask HN: How can I trust Google Analytics?

#28
post #5

Nice 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?

Nope. Can't trust SEO consultant, its also hard to trust company/product that uses SEO consultant's services. If somebody have good/reliable products or services, they don't need any phony SEO tricks.

Re: Ask HN: How can I trust Google Analytics?

#29
Taking 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.

Re: Ask HN: How can I trust Google Analytics?

#30
post #29

Taking 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.

> 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.

Post reply on HN