Vince Scordino Team : Web Development Tags : Web Development Google Analytics

A Developer's Guide to Upgrading to Google Universal Analytics

Vince Scordino Team : Web Development Tags : Web Development Google Analytics

So, why Universal Analytics? Universal Analytics is the new operating standard for Google Analytics. After an upgrade, you’ll receive the benefits of Universal Analytics which include the new collection methods and reporting tools. When deciding to upgrade, one must also be aware that the classic Google Analytics collection methods will be deprecated when Universal Analytics is fully integrated as the new operating standard. If you continue to use a classic collection method after this time, your data will not be processed.

How do I know if I’m using Classic or Universal Analytics on my website? The easiest way to find out is to check the JavaScript library your tracking code is referencing – Classic Google Analytics will reference ga.js, while Universal Analytics will reference analytics.js.

Updating the Tracking Code

When upgrading to the Universal Analytics tracking code, it’s a simple find and replace. Locate your JavaScript tracking code and replace with the following:

Old:

New:

Updating Page View Calls

Page tracking allows you to measure the number of views you had of a particular page. If you implement page views on your website, then the following is an important upgrade to your page view calls:

Old:

New:

Reference: https://developers.google.com/analytics/devguides/collection/analyticsjs/pages

Updating Event Calls

Event tracking allows you to measure how users interact with the content of your website. If you implement events on your website, then the following is an important upgrade to your event calls:

Old:

New:

Reference: https://developers.google.com/analytics/devguides/collection/analyticsjs/events

So there you have the basics to get your website migrated over to Universal Analytics. For a more comprehensive guide on other features, dimensions/metrics and tracking, visit: https://developers.google.com/analytics/devguides/collection/analyticsjs/