Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Prevent GA to report too high of a bounce rate for your "one page at one visit" site (a landing page or a blog)
// Fire an event so that GA doesn't count it as a "bounce"
function readPage() {
ga('send', {
'hitType': 'event',
'eventCategory': 'engagement',
'eventAction': 'read'
var readPageTime = 60 * 1000;
setTimeout(readPage, readPageTime);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.