Google Analytics launches Asynchronous Tracking
Steve Souders dissects the new code, which uses HTML5’s async flag to load the analytics JavaScript in parallel with other files:
It’s always hard to find the right spot on the complexibility curve. This async snippet hits it just right. It’s slightly more complex than the old pattern, but not by much. Besides the benefits highlighted here, this new pattern is able to support more advanced usage patterns, including pushing an array of commands and pushing functions.