Update 24/11/2011: Now you don’t need to make the code updates for Site Speed Tracking – it is all controlled simply through _trackPageview(). In fact, now you can also control the sampling rate of site speed by calling _setSiteSpeedSampleRate() before the call to _trackPageview(). See the tracking reference here.
I’m not sure why, but I haven’t seen much coverage (none at all, in fact) about Google Analytics’ new Site Speed report. As you may have read on my blog, I covered Panalysis’ method to track page load times in GA once before and showed how page load times can be factored into insightful reporting. This time it’s different. Google has released an official product that measures page load times and I have to say, it looks great.
How it works
Rather than measuring only part of the picture, as other solutions do, it sounds as though Google measures page load times from the time the page was requested till all elements of the page have finished loading. For example:
- Traditional methods: Document loaded, start tracking time, all objects loaded, stop tracking time
- Google’s method: Page requested, start tracking time, document loaded, all objects loaded, stop tracking time
However, at the same time, it only records a sample of pageviews.
In my experience, the sampling rate is set far too small to be useful for websites with a couple of thousand pageviews per month. Googler, Trevor Claiborne tells me that you can’t adjust the sampling rate of the _trackPageLoadTime() function “yet”… So far, my guess is that it only samples 2% of pageviews, but we’ll have to wait and see as Google releases more documentation. Update: It samples 1 percent of supported browsers by default and the instructions for updating the sample rate are right below.
Why it’s good news
You’ll be able to quickly and easily monitor your site’s performance and how it impacts your website’s metrics. Check out my post on insights from tracking page load times here.
How to install it
This is the best bit – it requires no code. Forget setting up multiple tracking objects, custom variables, 10+ lines of JS code and figuring out how it all works. If you want to set the sample rate, just add the following line of script before _trackPageview:
You can tweak this sample rate to a maximum of 10 percent.
Note that whilst this makes a request for __utm.gif, you won’t always see this, because of the sampling. Regardless, once you’ve accrued several hundred pageviews, you’ll start to get a little data.
This is just one of the exciting new features in GA’s new interface. I’m looking forward to the rest being rolled out. *Cough* Multi-channel funnels *Cough*
Check out Google’s help article here.