Posts Tagged ‘Reduce Google Analytics bounce rate dramatically now’

If you have Google Analytics installed then you must read this

If-you-have-Google-Analytics-installed-than-you-must-read-thisHello and Assalamo Alaikum,

It’s been almost a year I implemented this but unfortunately I forgot to share with you guys. However, today Elliot Silver shared stats mentioning the bounce rate of blog which is 78.43% and I was quite surprised because the quality of content on DomainInvesting makes the visitors to engage on blog for very long period which the bounce rate doesn’t agree. This shows there is major flaw is Google Analytics bounce rate tracking.

This reminded me a tip which I would like to share for every one who has Google Analytics installed and is interested in reducing the bounce rate. This trick will dramatically reduce your bounce rate even in single digits. Until I changed the coding my bounce rate was similar to other sites but thanks to DnMedia.com who shared the tip which will change the bounce rate noticeably. Today my bounce rate for this blog is 14.39% which is really good as compare to last year when it was ranging between 60-65%.

Right now Google Analytics measure your visitors like this; Let’s say person A visits your website and spend 10 minutes on your website reading your article with no more interaction and leaves. Now GA actually measures the time person A spent on your website as the difference between the time he opened your website and the last page view. So altogether Google will calculate the difference as 0 and call it bounce when it was actually a visitor who visited other page and spent long time on your website. But no worries you bounce rate will be sorted today.

So normally your Google Analytics code looks something like this:

<script type="text/javascript">

var _gaq = _gaq || [];
_gaq.push(['_setAccount', 'UA-963333-23']);
_gaq.push(['_trackPageview']);

(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>

But after changing to the new one which looks like this:

<script type="text/javascript">

  var _gaq = _gaq || [];
  _gaq.push(['_setAccount', 'UA-963333-23']);
  _gaq.push(['_trackPageview']);

  (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);
  })();
(function (tos) {
  window.setInterval(function () {
    tos = (function (t) {
      return t[0] == 50 ? (parseInt(t[1]) + 1) + ':00' : (t[1] || '0') + ':' + (parseInt(t[0]) + 10);
    })(tos.split(':').reverse());
    window.pageTracker ? pageTracker._trackEvent('Time', 'Log', tos) : _gaq.push(['_trackEvent', 'Time', 'Log', tos]);
  }, 5000);
})('00');
</script>

The bold code above is what was added. If you see in above code I have made 5000 which makes the visitor time count from 5 seconds after he entered the website. You can make it to whatever you feel is comfortable at your end. However, if you are having any issues just let me know as I will try my best to help you but can’t promise because I am not a techie guy 😉 You can even comment in the above website from where I got the updated code or the original author of this code if I fails to fix your issue.

Make sure to make backups before playing with your coding. Also scroll the bar from right to left to get full code.

Your comments are welcome. Feel free to shoot one no matter how good or good they are 😉