10 Google Analytics Site Speed Tips

Google Analytics has a set of ‘speed’ reports, found under the the ‘Content’ left-hand navigation item. Here are 10 very quick “Google Analytics Site Speed” tips, collected together for ease of reading:

  1. All of the load speed data in Google Analytics is taken from users’ browsers themselves, so is fairly accurate.
  2. The browser stores all this speed data; Google Analytics then pulls that data at the point the code fires.
  3. Some browsers don’t support page load speed recording (notably Safari) so be very careful on ‘mobile’ speed.
  4. It’s tempting to pay attention to the top level “Avg. Page Load Time (sec)” metric that Google Analytics gives you. Slightly more useful than that: The ‘Distribution‘ report is tucked away behind a tab in the ‘Page Timings’ report. The distribution report is very useful, as you can see ‘% of pages loaded in less than X seconds’.
  5. ‘DOM Timings’ reports were added long after the main speed reports. They’re found in a similar area to the ‘distribution’ report, and are useful as they show how long it takes for your pages to become usable. (giving you ‘Avg. Document Interactive Time (sec)’ and ‘Avg. Document Content Loaded Time (sec)’ for each page).
  6. A big caveat: Google Analytics only tracks ‘page load speed’ for between 1-5% of pageviews as standard. You can fix that (see point 8).
  7. Because the sample size is so low, remember that ‘average’ page load speed is therefore affected if the speed of a page has only been recorded a few times.
  8. To improve the sample rate issue, you can add some extra code to your Google Analytics implementation. This essentially tells Google Analytics ‘try and collect page load speed data for 100% of page views’. Based on the earlier caveat that not all browsers support it, and the caveat that Google cap the total number of sessions they will record this for, you will never see a 100% sample rate, but if you are below that cap, this will increase it significantly. I have known sites achieve site speed data for 30% or more of pageviews, vs the default 1%. The code required to do this is as follows:
    • For older versions of Google Analytics (these will appear in your code as ‘ga.js’ or ‘dc.js’): _gaq.push([‘_setSiteSpeedSampleRate’, 100]); // this should go above the ‘trackpageview’ line in your Google Analytics code to improve accuracy
    • For newer versions of Google Analytics (these will appear in your code as ‘analytics.js’): ga(‘create’, ‘UA-XXXX-Y’, {‘siteSpeedSampleRate’: 100});
  9. If you’re looking for a good KPI on site speed, ‘% of pages loaded in less than 3 secs’ is a safe bet. (and ‘less than 7 seconds’ as a secondary).
  10. You may want to isolate that KPI further: ‘UK Only: % pages loaded in under 3 secs’ split by new vs return, for example.

I’ve done quite a bit of work with ‘Google Analytics Page Speed’ reports & have found them really useful, but with plenty of hidden caveats in the data. Feel free to ask any questions if I can help, & do share this with others if you think it would be useful.