Using Events to Improve Bounce Rate in Google Analytics

By  on  

The bounce rate cited by Google Analytics for this blog has always been high and it's been discouraging.  Having a high bounce rate is bad, right?  Or does that mean someone found what they needed and left, which would be a win?  I'm not sure, but I was recently told that some people use event tracking to find a truer bounce rate.  If a user scrolls or clicks on something, that shouldn't be a bounce, right?  They're certainly interacting with the page!  With my redesign, I implemented this:

function removeEvents() {
	document.body.removeEventListener('click', sendInteractionEvent);
	window.removeEventListener('scroll', sendInteractionEvent);
}

function sendInteractionEvent() {
	ga('send', 'event', 'Page Interaction');
	removeEvents();
}

document.body.addEventListener('click', sendInteractionEvent);
window.addEventListener('scroll', sendInteractionEvent);

After adding this code, my bounce rate went down dramatically.  Tracking an event isn't gaming the system so I find this situation a bit odd.  Why does tracking an event, not firing a pageview, affect the bounce rate so much?  I'm not sure, maybe you can tell me!

Preventing Events from Affecting Bounce Rate

Let's say you don't want events to affect your bounce rate; you can use the following to do so:

ga('set', 'nonInteraction', true);

It's odd to me that an event would effect bounce rate, if the definition of a bounce rate is a user going to your site and immediately leaving. A pageview is not an event so....weird!

Recent Features

  • By
    CSS vs. JS Animation: Which is Faster?

    How is it possible that JavaScript-based animation has secretly always been as fast — or faster — than CSS transitions? And, how is it possible that Adobe and Google consistently release media-rich mobile sites that rival the performance of native apps? This article serves as a point-by-point...

  • By
    5 HTML5 APIs You Didn’t Know Existed

    When you say or read "HTML5", you half expect exotic dancers and unicorns to walk into the room to the tune of "I'm Sexy and I Know It."  Can you blame us though?  We watched the fundamental APIs stagnate for so long that a basic feature...

Incredible Demos

Discussion

  1. This is nice. I recently found this jQuery plugin (yeah, one likes mootools more ^^) http://scrolldepth.parsnip.io/ wich is firing every 25% of pagescroll.

    This way it’s more comfortable to tell if the quality is good. More Events = better content.

  2. Bounce rate depends on presence/absence of interaction. Navigating from one page of your blog to another counts as an interaction; scrolling, navigating to another website, playing a video on your website, etc does not count as interaction. You track such actions via events; and while doing so, you can choose if the event should be counted as an interaction or not.

  3. Joey

    Yes, but how/where is the code implemented? Do I just paste it anywhere in the site? Thanks.

  4. Leo

    Salman’s got it right.

    Google calculates a users time spent on a site by measuring the time between the first “hit” and last “hit”. The first “hit” happens when you load a page.

  5. Hi,
    The bounce rate is a nightmare for the webmasters, if it is on the higher side. In fact, the Google analytics is a best and free tool to stay informed about your website bounce rate.

    This article has the quality to assist many webmasters to understand the pros and cons of the bounce rate.

    Thanks for sharing a quality.
    kumar

  6. I disagree, I want my events to effect my bounce rate. I have a single page marketing site. So I register events on the menu items that are clicked to scroll to the next section. These are not bounces.

Wrap your code in <pre class="{language}"></pre> tags, link to a GitHub gist, JSFiddle fiddle, or CodePen pen to embed!