Figure 14-1: You can check out your site speed in Google Analytics.
Tracking Page Load Times
Few things annoy website visitors more than a page that loads slowly. In general, you have only a few seconds to keep someone’s attention — do you really want to waste that precious time with slow page loads and lose your visitor altogether?
You can track page load times in a variety of ways:
You can now configure the Google Analytics plug-ins to track page load times. You just have to add the line of code to your theme (if you’re using WordPress or Drupal) or website.
Extensions and add-ons for Firefox and Chrome track page load times for you. Page Speed Test is one of many extensions for Chrome, and Firebug is a popular add-on with plenty of options for Firefox. You can find many more add-ons just by browsing the Chrome and Firefox archives for the one that’s right for you.
By far the most effective way to track page load times is to use Google’s page speed API:
1. Add this line of code to the pages you want to track for load times:
_gaq.push ([‘trackPageLoadtime’]);
2. Go into the new Google Analytics and flip the Site Speed Report to On (see Figure 14-1).
3. By default, adding ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access