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
    Creating Scrolling Parallax Effects with CSS

    Introduction For quite a long time now websites with the so called "parallax" effect have been really popular. In case you have not heard of this effect, it basically includes different layers of images that are moving in different directions or with different speed. This leads to a...

  • By
    An Interview with Eric Meyer

    Your early CSS books were instrumental in pushing my love for front end technologies. What was it about CSS that you fell in love with and drove you to write about it? At first blush, it was the simplicity of it as compared to the table-and-spacer...

Incredible Demos

  • By
    CSS 3D Folding Animation

    Google Plus provides loads of inspiration for front-end developers, especially when it comes to the CSS and JavaScript wonders they create. Last year I duplicated their incredible PhotoStack effect with both MooTools and pure CSS; this time I'm going to duplicate...

  • By
    Using Opacity to Show Focus with jQuery

    A few days back I debuted a sweet article that made use of MooTools JavaScript and opacity to show focus on a specified element. Here's how to accomplish that feat using jQuery. The jQuery JavaScript There you have it. Opacity is a very simple but effective...

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!