The new Google Universal Analytics provides the opportunity for own measurement values and dimensions and allow you to track usage across platforms. Universal Analytics introduces a set of features that change the way data is collected and organized in your Google Analytics account, so you can get a better understanding of how visitors interact with your online content.

Updating Code

Unless you’re using advanced features the upgrade process for most people will be pretty easy. Find where your code is installed on your website and replace…

<script type="text/javascript">

  var _gaq = _gaq || [];
  _gaq.push(['_setAccount', 'UA-XXXXX-X']);

  (function() {
    var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
    ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '';
    var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);


…With the Universal Analytics code (adding your Analytics ID to the code)…

<!-- Google Analytics -->
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),

ga('create', 'UA-XXXX-Y', 'auto');
ga('send', 'pageview');

<!-- End Google Analytics -->

Save it and upload, then login to Google Analytics and upgrade your account there to start recieving your analytics.

Upgrade to Universal Analytics

If you’re using more advanced analytics Google has put together a pretty useful guide to upgrading your code from ga.js to analytics.js. The Universal Analytics Upgrade is a two step process you can follow to turn all of your classic Analytics properties into Universal Analytics properties and implement a Universal Analytics tracking code.