Tag Archives: analytics site speed

Analytics now Tracking Site Speed

On Wenesday Google announces on their Analytics Blog that you can now view a report of your sites’ speed.

This could become one of the most useful reports for optimisation especially since Google announced they are now considering site speed a ranking factor. However the results received must be taken with a pinch of salt, as only a small sample of page views are used to create an average which is displayed in the report.

As long as outliers or any type of extreme page views (eg. dial up internet) aren’t chosen for the report the results will be¬†extremely¬†informative and useful.

The report is only available in the new version of analytics, probably to create more incentive for users to convert.

To use this new feature you need to add the bold text into the currently existing Google Analytics tracking code;

For Asynchronous Code (This is usually the default) :

<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') +
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);

For Traditional Snippet:

<script type="text/javascript">
var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js'

<script type="text/javascript">
var pageTracker = _gat._getTracker("UA-xxxxxx-x");
} catch(err) {}

If installed correctly site speed data should start showing up a few hours after the new code is uploaded.

More information about Installing the Site Speed Report.