Comment on Ask HN: How can I trust Google Analytics?parentComments−lpsz11yWhy 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; } }); } <a href="#" onclick="outboundLink('https://www.foo.com'); return false;">Foo</a> See: https://developers.google.com/analytics/devguides/collection...−dudus11yYou 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.−NathanKP11yAnd now you have a website that feels slow to respond to link clicks.
Comments
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...
See: https://developers.google.com/analytics/devguides/collection...You can also do
This will work even after you redirect to another page but only if the browser supports navigator.sendBeacon(). Currently not IE or Safari.And now you have a website that feels slow to respond to link clicks.