Adjusting Google Analytics Code to Fix Bounce Rate

Share This Post

The issue of bounce rate is one that has been widely talked about with little explanation of the parameters that control the equation. Google uses bounce rate as a measure of the quality of your web traffic. When a visitor leaves your site from the first page or landing page without going to any other page, such traffic is considered as “Bounce”.

As I discussed on “Reduce your site’s bounce rate with SimpleReach Slide”, bounce rate is simply an indication of how much time people spend on your site. A high bounce rate means people easily leave your site almost the same time they landed and Google uses this to interpret the relevance of your keyword to your content as against your competitors and rank you on their search engine. A high bounce rate is simply an indication of less relevance and this will lower your search engine ranking.

Adjusting Google Analytics Code to Fix Bounce Rate

Adjusting Google Analytics Code to Fix Bounce Rate

<br />&lt;script type="text/javascript"&gt;<br /><br />var _gaq = _gaq || [];<br /><%%KEEPWHITESPACE%%> _gaq.push(['_setAccount', 'UA-XXXXXXXX-1']);<br /><%%KEEPWHITESPACE%%> _gaq.push(['_trackPageview']);<br /><br />(function() {<br /><%%KEEPWHITESPACE%%> var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;<br /><%%KEEPWHITESPACE%%> ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';<br /><%%KEEPWHITESPACE%%> var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);<br /><%%KEEPWHITESPACE%%> })();<br /><br />&lt;/script&gt;<br />

But a study of the Google Analytics code shows that Google’s main parameter is the trackPageview function, Google expects your visitor to visit at least more than a page on your site before leaving else they’ll term it a bounce visit.

But such is not always applicable, in a case whereby a visitor landed on a product description page or about us page of a company and gets all the information he is looking for on that page before leaving without having to visit any other page, such page has met the expectation of the visitor, should such visit be included as a bounce visit?

So according to Google analytics code, even if a visitor spends hours on your blog reading just one post without having to visit any other page of your site, Google will record it as a bounce visit. Adjusting Google analytics code can take care of this, you can tweak the code to execute an event when a user spends a certain amount of time on your site.

So even if a visitor does not visit any other page on your site but triggers the event stipulated on the adjusted analytics code, such a visitor will not be regarded as bounce.

<br />&lt;script type="text/javascript"&gt;<br /><br />var _gaq = _gaq || [];<br /><%%KEEPWHITESPACE%%> _gaq.push(['_setAccount', 'UA-XXXXXXXX-1']);<br /><%%KEEPWHITESPACE%%> _gaq.push(['_trackPageview']);<br /><br />setTimeout(function() {<br /><%%KEEPWHITESPACE%%> window.onscroll = function() {<br /><%%KEEPWHITESPACE%%> window.onscroll = null; // Only track the event once<br /><%%KEEPWHITESPACE%%> _gaq.push(['_trackEvent', 'scroll', 'read']);<br /><%%KEEPWHITESPACE%%> }<br /><%%KEEPWHITESPACE%%> }, 5000);<br /><br />(function() {<br /><%%KEEPWHITESPACE%%> var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;<br /><%%KEEPWHITESPACE%%> ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';<br /><%%KEEPWHITESPACE%%> var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);<br /><%%KEEPWHITESPACE%%> })();<br /><br />&lt;/script&gt;<br />

An adjusted Google Analytics code with a new Scroll event means visitors to your site can only generate a bounce if they do not interact with your site in this case at least scroll a page with a 5 seconds delay.

I hope you too will switch to the adjusted analytics code and lower your site’s bounce rate so as to improve your search engine ranking. Send your contributions through the comment.

Enhanced by Zemanta

Comments

  1. says

    Hi Nwosu,
    This is indeed a cool idea and an interesting tutorial but isn’t this more or less like trying to cheat the system or I guess it all boils down to being smart! Hahaha!

  2. says

    Ho Nwosu,

    Clever workaround ;)

    That bounce rate definition per Google is tough.

    What if readers found what they needed on 1 page?

    Would that not be the definition of a satisfied customers and exceptional website?

    It does make one think.

    Thanks for sharing!

  3. says

    Hello Nwosu,

    Google Analytics is such a nice tool to check the performance of our website. According the policies of Google, every website owner wishes the bounce rate of his/her blog to be as low as possible as it will increase the reputation in the eyes of Google. You have selected a very good topic out here. If someone finds all on the landing page, what he needed? Why he will move to another tab? Obviously, one would not like to waste time by visiting the links without any use (just to reduce your blog’s bounce rate :P). I would like to thank you for sharing this cool trick with us. I would like to try it on my webpage too. Keep sharing :-)

  4. says

    Wow.. thanks for this awesome post. Google never does a mistake. If it is … Smart and professionals do it like you. Thanks for sharing.

  5. says

    Nice one, I will like to make the changes, but it’s different from what Google code www.analytics.blogspot.com/2012/07/tracking-adjusted-bounce-rate-in-google.html

  6. says

    Hi Nwosu,

    Thank for sharing this informative and interesting tutorial to Adjusting Google Analytics Code to Fix Bounce Rate.

    Regards,
    Abid Omar @ ABCDBlogging.com

  7. says

    I was actually looking for it…..Thanks for writing about it Nwosu….This will reflect the picture more clearly now…..These conditional tracking options are good addition to the GE tools…..thanks again and keep blogging bro….

  8. says

    Nwosu,

    Amazing trick and there’s no doubt it will reduce the bounce rate drastically.

    But, what confuses me is, after doing this change, are we getting the true value for whatever Google calls it ‘Bounce Rate’. It was supposed to present the number of how many of your visitors did not visit second page in your blog, but doing this change, it simple tampered the analysis, didn’t it?

    If we simply needed to reduce the bounce rate, we can paste the analytics codes two times, Google simply won’t be able to track the bounce. How is it different than changing code?

  9. says

    When a visitor finds all he is looking for in a page a leaves is that visitor’s needs not met? Why then does it have to be recorded as a bounce? basing bounce rate on pageviews alone is flawed. You can read what Google has to say about it here http://www.analytics.blogspot.com/2012/07/tracking-adjusted-bounce-rate-in-google.html

  10. says

    Thanks Nwosu for such stuff. Bounce rate play vital roll in page ranking. i hope this code will help to solve this problem. My point is using of too much codes can reduce your page speed?

  11. says

    Mav, just want to ask one question.

    What part of your site should you place the code.

    Is it anywhere in the header or in the body of the html code.

    Or if we are using control F what should we look for. Giving this explanation should resolve the problem for those of us who are non techy.

    Thanks again for a fab post

  12. says

    Tweaking this code this way is impressive but defeats its very purpose.
    I understand your arguments but if a user gets 100% on the entry page, your site should be good enough to attract him to related pages or a download, order or contact page through call to action buttons.

    It’s not exciting to find out that visitors enter your page and get all the want without a second click. ;)

  13. says

    If a users finds all he is looking for in a page and leaves without necessarily checking out any other page i don’t think such visit should pass as a bounce. Check out what Google has to say about this http://analytics.blogspot.com/2012/07/tracking-adjusted-bounce-rate-in-google.html

  14. says

    have been looking for tips on how to reduce the bounce rate on my site though it’s new… This sounds helpful. Am gonna try it. Thanks for sharing

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>