4 votes

Google Analytics - Asynchronous

Google just an update to their Analytics tracking code. As their website states, "Asynchronous Tracking is an alternative way track website visitors with Google Analytics. Unlike a traditional installation, asynchronous tracking optimizes how browsers load 

ga.js so its impact on user experience is minimized. It also allows you to put your Analytics snippet higher in the page without delaying subsequent content from rendering. The Asynchronous Tracking requires a different Analytics snippet and a different syntax for making tracking API calls."

The code is an XSLT rendering and a Macro. The Macro has two parameters, the Account Number and a Display Google Analytics Code checkbox. The checkbox allows you to deactivate the Google Analytics code in your staging environment and then to easily activate it once you push up to production.

Unlike the old Google code, this code should be placed inbetween the <head></head> tags instead of at the bottom of the page.

Archived files

Documentation

Source code

Package owner

Chad Rosenthal

Chad Rosenthal

Chad has 474 karma points

Package Compatibility

This package is compatible with the following versions as reported by community members who have downloaded this package:
Untested or doesn't work on Umbraco Cloud
Version 8.18.x (untested)

You must login before you can report on package compatibility.

Previously reported to work on versions:

Package Information

  • Package owner: Chad Rosenthal
  • Created: 02/12/2009
  • Current version .9
  • License MIT
  • Downloads on Our: 1.5K