To improve the script's performance, Google decided to load it asynchronously. "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."
Here's the new code for basic tracking, which uses some ideas from Steve Souders:
The new tracking snippet offers the following benefits:
* Faster tracking code load times for your web pages due to improved browser execution
* Enhanced data collection and accuracy