The truth about Google Analytics bounce rate and how to change it with and without Google Tag Manager
HOW DOES GOOGLE ANALYTICS CALCULATE BOUNCE RATE?
The most common and simplistic definition of bounce rate is as follows: the percentage of visits/sessions with a single page view. This definition, not being completely false, is not very nuanced. A more precise definition would be the percentage of visits/sessions with a single interaction. The difference between an interaction and a page view is that an interaction can be:
• A page view
• An event (unless you configure it as “non-interactive”)
• A hit from a social media plug-in
• An online commercial transaction
• A virtual page view
So, when a session/visit generates a single interaction (which is usually a page view), this session will be counted in the calculation of the bounce rate. And if a session generates 2 or more interactions, it will not be taken into account. This is why blog pages tend to have a high bounce rate: many visitors will just read a single blog post and then leave. Ditto for landing pages. The bounce rate is often high because these pages are rarely linked to other pages on a site, which means that only one interaction will be sent to GA. To summarize, here are scenarios for which a rebound would be recorded by GA :
• A person visits your site and leaves immediately.
• Someone lands on your blog post, spends 20 minutes reading it, and leaves your site.
• A person lands on an article on your blog, spends 2 hours reading it, and continues browsing other pages on your site. (This case is explained by the fact that a session on GA expires after 30 minutes of inactivity. In this case, therefore, there would be 2 sessions; the first session that expired after 30 minutes of reading would record a bounce).
• Someone lands on your site, prints out the landing page, and clicks on an untracked “mailto” link to email you.
• A person lands on a landing page or your “contact us” page, dials your phone number, and leaves the site.
• A person lands on your homepage, watches a 5-minute YouTube video embedded there, and then leaves the site.
• You have a beautiful new website with a single page ( see example ) – it's a bit of a trend lately. Your visitors land there, click on links that scroll the page to the right level without reloading the URL. Since the page does not reload unless it triggers virtual page views or events when the page scrolls down or up, GA is not going to count those scrolls as interactions and will record a bounce rate if visitors leave your site without generating further interactions recognized by GA. If you have such a site, don't be surprised if your average bounce rate for the whole site is high!
Now let's look at scenarios where a bounce rate would not be recorded . As mentioned at the beginning of the article, a session/visit will not generate a bounce as long as it has two or more interactions:
• A person lands on a page on your site and clicks a “Follow on Facebook” button a minute later, where an GA event has been added.
• A person lands on your homepage and watches a YouTube video embedded there, where a GA event is sent when the “Play” button is clicked.
• A person arrives on a landing page and sees a few seconds later a lightbox, which is measured in GA with a virtual page view, asking him to subscribe to the newsletter.
• Someone lands on your blog post and clicks the “Tweet” button on a social media plug-in that's integrated with your GA account.
HOW TO CHANGE THE CALCULATION OF THE BOUNCE RATE AND THE AVERAGE TIME SPENT ON A PAGE?
Above, I described several situations where a bounce rate would be recorded. In some of these cases, you might want to change the way GA calculates bounce rate. So I will give you two methods to modify the bounce rate. The first method is applicable if your GA script is implemented directly in the source codes of your site without Google Tag Manager (GTM). The second method is applicable if you are using GTM for your GA tags. With these two methods, we will trigger a GA event automatically every minute. You are free to trigger it every 15s, 30s, 45s, 2mins, or 5mins, depending on your unique needs, with some modifications.
FIRST METHOD (WITHOUT GTM)
If you haven't yet switched to Universal Analytics and are still using the asynchronous GA code , just add the line of code in red like this:
<script type=”text/javascript”>
var _gaq = _gaq || [];
_gaq.push(['_setAccount', 'UA-XXXXXXX-1']);
_gaq.push(['_trackPageview']);
setTimeout(“_gaq.push(['_trackEvent', 'Time spent on page', '1 Minute'])”,60000);
(function() {
var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
ga.src = ('https:' == document.location.protocol? 'https://ssl': 'http://www') + '.google-analytics.com/ga.js';
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore (ga, s);
})();
</script>
This code will send a GA event every minute automatically on all the pages it is on, and without requiring a click from your visitors. Note that in this event, I omitted to include an event label. There is just one category (Time spent on page) and one activity (1 minute). You can add a label if you wish. If you want to trigger this event every 15 seconds or 30 seconds, just replace "60000" with "15000" or "30000" respectively. The time must be in milliseconds, hence the need to add 3 zeros to the end of the number of seconds you want to schedule for this event.
If your site has already switched to Universal Analytics , here is the line of code to add in red:
<script>
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q= i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
m=s.getElementsByTagName(o)[ 0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
})(window,document,'script','//www.google-analytics.com/analytics.js ','ga');
ga('create', 'UA-XXXXXX-X', 'auto');
ga('send', 'pageview');
setTimeout(“ga('send','event','Time spent on page','1 Minute')”,60000);
</script>
SECOND METHOD (WITH GTM)
If you use Google Tag Manager for all your GA tags, you can also trigger an automatic GA event every minute, by following these steps:
1) Click on the “Create New Tag” button and name it “Timer Listener”
2) Select “Event Listener” under Tag Type, then “Timer Listener”
3) In the "Interval" box, enter "60000" (60,000 milliseconds = 1 minute) and in the "Limit" box, enter "60" to limit the execution of this tag to 1 hour (60 min).
4) Add a rule so that GTM knows when to trigger this tag. To simplify this example, select the "All Pages" rule. You can choose a specific page if you want (your blog pages, for example).
5) Click “Save” to save this tag.
6) Create a new macro that you name "Timer Event Number", or whatever, to capture the number of times the Timer Listener is triggered by GTM. Don't forget to click “Save”.
7) Create a second new macro of the "Lookup Table" type to translate the number of times the Timer Listener is triggered by GTM, so that the report of this event in GA is more comprehensive. It should look like the image below; notice that the macro created in step 6 is framed in red. Don't forget to click “Save”.
8) Click on the “Create New Tag” button and name it “Time Counter”, or whatever.
9) Select “Universal Analytics” or “Classic Google Analytics” under Tag Type depending on whether you have upgraded to Universal Analytics or not.
10) Enter your Tracking ID and select “Event” under the Track Type menu.
11) Under the Event Tracking Parameters section, enter "Time spent on page" under Category (you can name the category something else), and the name of the macro created in step 7 (in our example it would be "NB of 1 min passed on page”) under Action. The Label and Value boxes are optional, you can leave it empty if you prefer.
Tag of a GA event in GTM (click to enlarge)
AVERAGE TIME SPENT ON A PAGE
These two methods of modifying the calculation of the bounce rate will also affect how GA calculates the average time spent on a page. The reason is that GA needs at least 2 interactions to know how long a user stayed on a page. To use one of my examples, if a user lands on one of your landing pages and leaves it after 5 min without any further interaction, the time spent on this page will be 0 seconds for this user. But by implementing one of the two methods above, GA will be able to calculate the time spent on the page with more precision (as long as the user has stayed at least 1 minute on the page, of course).
THE FINAL WORD
Now you know how Google Analytics calculates bounce rate and time spent on a page, and how to change them. I have given you a few examples where a bounce would be recorded. Take enough time to analyze your web properties and GA reports to determine whether you need to add automatic events or not. If you decide to add these automatic events, I advise you to do it with GTM. This will allow you to make the time spent on the page more compressive (review step #7 of the second method with GTM for more details). It's your turn! Have you ever tried either of these two methods? Have you developed other methods to modify the calculation of the bounce rate or the time spent on a page? Do you have any particular situations where you wonder if a rebound would register or not? Share them in the comments below.