0131 560 1790 0131 560 1790

Google Release New Improved Analytics Tracking Code

I was going through a setup on Google analytics and noticed that Google is now supplying a different tracking code to use for your Google analytics data.

It seems that Google have kept pretty quiet about this new code. Why the change?  The new code named asynchronous tracking code is being billed as an improved way to track website visitors with Google analytics.

This new tracking system has been created to optimise how browsers load ga,js so to have less impact on the user experience of the website. What I think this means is that it will load faster. Also with this new code you no longer need to place it at the end of the <body> tag.  You can place it higher up the page without it delaying other elements on the page rendering. Google also says that this new code is more flexable than the exsiting code snippet. See below for an example of how the new tracking code looks.

<script type="text/javascript">

  var _gaq = _gaq || [];
  _gaq.push(['_setAccount', 'UA-XXXXX-X']);
  _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';
    (document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(ga);
  })();

</script>

If you would like to use this new code snippet for your analytics all you need to is replace UA-XXXXX-X with your own tracking id. We will keep you up to date on what differences this new code has once we have completed more testing. For more information on the new analytics tracking code visit Google.Are you already using this new code? We would love to hear your thoughts below.

About Graham Lyons

Graham is the SEO and Social Media Marketing Manager at Cozy Digital and the editor of the Cozy Digital Blog as well as contributing content for most of our social outlets like Facebook, Twitter and G+. Graham has been working in, and writing for the SEO / SMM industry since 2001 and is still as dedicated and passionate today as he was when he opened his first Website Design, Ecommerce and SEO company in 2004. You can connect with Graham and Cozy Digital via the social media links below:



You may also be interested in:

  1. Installing Ecommerce Tracking for Your Website A complete step by step guide to installing and configuring ecommerce tracking for your website with Google Analytics. ...
  2. Web Analytics TV #9 Review – Back to the Future Review of Google's latest analytics TV show. Learn how to track visits from pigs. ...
  3. We Love Web Analytics TV – Episode 14 Check out another top video from our favourite analytical gurus at Google. ...
  4. Google Analytics Wanted by the Fed’s The Google Analytics application has been on the radar of the US Federal General Services Administration for some time, but...
  5. What Useful New Features Does Analytics Have to Offer? New features for Google Analytics are set to go live this week with an array of advancements on current features....

You can follow any responses to this entry through the RSS 2.0 feed.