Accepting selected projects for Q2 2024 Check availability →
SERVER 02SYSTEM ONLINELAST SYNC: 03:17:44RSS 2.0 — ONLINE
HALF ASSEDTECHNICAL NOTES_
EST. 1999ISSUE 04.2BEST VIEWED AT 1024 × 768
TECHNICAL NOTES / TECHNICAL NOTES / PERFORMANCE / RECORD b74df4
[PERFORMANCE]NOTE

Moving to the asynchronous analytics snippet

POSTED: 23.03.2010AUTHOR: ADMIN5 MIN READCOMMENTS: 0

The traditional Google Analytics snippet loads ga.js with a blocking script element, so a slow response from the tracking host delays the page. The asynchronous snippet queues commands in an array and loads the library without blocking rendering.

Replace the include completely

Remove the previous snippet rather than running both; duplicate page views are the usual result of a partial migration. The asynchronous version may be placed in the head, which records visits that end before the bottom of a long page has loaded.

Convert custom tracking calls

Rewrite direct calls on the pageTracker object as commands pushed onto the _gaq queue. Search templates, inline event handlers and content-managed fields for old calls; after the change they fail with a script error because the object no longer exists.

Check links that leave the page

An event recorded as the browser navigates away may not be sent before the page unloads. Test outbound-link and download tracking in each supported browser, and do not delay navigation by an arbitrary interval without agreeing the effect on users.

VERIFICATION

Compare page views and goal completions for a full week before and after release. A change in either is more likely to be a measurement defect than a change in visitor behaviour.