Google Analytics – Site Performance Optimizations

July 2nd, 2010 Leave a comment
Like the article?
Google Analytics

Google Analytics (GA) has changed the game for enterprise level analytics by offering a complete feature set without any licensing, seat or setup fees for most users. As a result, implementing conversion funnels, click tracking, path analysis and user segmentation is more accessible to a wider variety of website publishers. When it comes to gaining visibility into the behavior of your traffic, the tool has rapidly evolved to approach levels of performance by A-list analytics vendors.

While the rich feature-set of Google Analytics makes it an ideal choice for analysts, the development side of the equation requires insights into load times, cookies and data tracking. In order to seamlessly integrate enterprise-level tracking into your website without slowing down users or losing data, this guide will help ensure you understand both the technical and operational aspects of analytics data collection. Making minor tweaks to your Analytics configuration can pay great dividends in terms of load times, user insights and data validity. While it is important to evaluate these updates relative to your site and server structure, this guide provides a high level view of potential ways to improve the efficiency of your installation.

Upgrade your Installation to Benefit from New Performance Features

While previous versions of GA (under the previous version of Urchin) often have code-intensive slow Javascript calls, the most recent version of the software (released in late 2009) has streamlined the cookie and data collection process. With the new coding structure GA utilizes API calls to populate an array through GAQ objects which are independent of the entire page loading – improving both on-site performance and data collection:

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

The most impressive performance upgrade comes where the tracking code is loaded along with any other scripts, which is fully compatible with HTML 5 standards and improves the user’s overall load time:

ga.setAttribute('async', 'true');

Centralize Tracking through Google Analytics

You should start by evaluating which questions or problems you want to solve with data – combining Analytics with other Google tools such as Website Optimizer (which allows for integrated multi-variation and A/B testing) can streamline your approach to data collection. Limiting the objects on a given page can mean a few seconds less of load time, which can make a noticeable difference to your users over time. While a full analysis of the configuration for GA is beyond the scope of this article, we will cover how to extend your Analytics installation to a network of related sites to improve overall performance.

GA integrates tracking with a basic Javascript snippet that looks generically like the one below, where NNNNN-N refers to your unique Google Analytics tracking number.

var pageTracker = _gat._getTracker("UA-NNNNN-N");

Since your profile is setup for a single domain by default you can extend the tracking to multiple (authorized) domains by adding a few lines of code – this can streamline data collection across a network of properties, especially where you have promotional micro-sites linked to your main site by adding the following lines of code:


In order to ensure continuous tracking you will need to append any intra-network links between sites with on-click tracking so you can follow the visitors path with the code:

onclick="pageTracker._link(this.href); return false;"

Many site publishers use a variety of 3rd-party tools in order to track conversions from their sites including click-mapping, conversion event tracking and multi-site analysis. As the feature set of Google Analytics has improved, you can find these tools natively within the tool – therefore you can improve the load times of your pages by integrating the GA-tracking code within your site wide footer for improved results. Rather than independently loading multiple Javascript calls from different providers, the basic GA code with some back-end configuration can solve nearly any of your Analytics issues.

Help us spread the word!
  • Twitter
  • Facebook
  • LinkedIn
  • Pinterest
  • Delicious
  • DZone
  • Reddit
  • Sphinn
  • StumbleUpon
  • Google Plus
  • RSS
  • Email
  • Print
Don't miss another post! Receive updates via email!