This seems to have gone fairly unnoticed, but Google has started including site speed metrics in Google Analytics. For web professionals like us, this is awesome, because Analytics is easy to gain and share access for reports and planning.  So this cool new feature comes with a very small bit of work…. You have to add the tracking snip.

For the old GA you will add pageTracker._trackPageLoadTime(); like this
<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'
 type='text/javascript'%3E%3C/script%3E"));
</script>

<script type="text/javascript">
try{
 var pageTracker = _gat._getTracker("UA-xxxxxx-x");
 pageTracker._trackPageview();
 pageTracker._trackPageLoadTime();
} catch(err) {}
</script>
For the new Asynchronous code you will add  _gaq.push([‘_trackPageLoadTime’]); like this
<script type="text/javascript">
 var _gaq = _gaq || [];
 _gaq.push(['_setAccount', 'UA-XXXXX-X']);
 _gaq.push(['_trackPageview']);
 _gaq.push(['_trackPageLoadTime']);

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

 

Nice indeed. Once you set this up in about 24 hours you will begin to see data trickling in the content >> site speed report area of your Analytics dash. Google notes that probably should only tag a few pages, but the whole damn web is dynamic and so is my solution. Tag them all and let Google sort them out!

I really like the default selections of metrics for the new site speed report. They are all related relevant and insightful. Probably will even keep me from needing a custom speed report for a few months.

The default view of the Site Speed report shows Pages (your website pages) as the primary dimension. It lists your pages in order from those with the highest latency to those with the lowest. In this view, you get the following metrics in the report table:

  • Avg Page Load Time—the average amount of time (in seconds) it takes that page to load, from initiation of the pageview (e.g. click on a page link) to load completion in the browser.
  • Pageviews—The actual number of times the page was viewed for the selected date range.
  • Page Load Sample—The actual number of pageviews that were sampled to calculate the average page load time.
  • Bounce Rate—As for Pages report, the percentage of views to this page in which this page was the only one viewed for the session.
  • %