Hacker News new | ask | show | jobs
by dudus 3996 days ago
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.