How to Make Google Analytics Load Faster on Your Website

Google, Web Talk, WebmasterComments Off on How to Make Google Analytics Load Faster on Your Website

Bookmark and Share


As stated by Google, on 2010 websites and blogs’ speed will be an important evaluation factor as far as ranking is concerned.  Google Analytics is important to know what is happening on your website  in order to know who and how many times your website is visited. However, its tracking  code slows the  page dowloading time a lot. Recently, Google has released a new tracking code (Asynchronous Tracking)  meant to solve this issue.

Asynchronous Tracking is a new fast tracking code. Reading from Google Code: “Asynchronous Tracking is an alternative way to 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.”

What follows is the new code:

<script type=”text/javascript”>

var _gaq = _gaq || [];
_gaq.push([‘_setAccount’, ‘UA-XXXXX-X’]);

(function() {
var ga = document.createElement(‘script’); ga.type = ‘text/javascript’; ga.async = true;
ga.src = (‘https:’ == document.location.protocol ? ‘https://ssl’ : ‘http://www’) + ‘.google-analytics.com/ga.js’;
(document.getElementsByTagName(‘head’)[0] || document.getElementsByTagName(‘body’)[0]).appendChild(ga);


To start using it, simply remove the old code and place this new code right before </head> in your pages. Of course you have to change the UA-XXXXX-X with your own Google Analytics ID and that’s it!

If you want to know more, if you are looking for detailed instruction, read this guide.

Related Articles Latest Articles

Comments are closed.

Copyright © 2007-2017 | Sitemap | Privacy | Back To Top
Best screen resolution 1280x800 or higher.
Web Talk is best viewed in Firefox.