Dana gave a talk at WordCamp Edmonton on site speed in 2012, and even though many seasons have passed since then, this piece of code will still work well for you. This is a custom dashboard for Google Analytics that gives you an at-a-glance view of your site performance.
To add the dashboard to your account, make sure that you’re signed into your Google Analytics account and click here to access it, then choose what profile you want to add it to. You’ll then see it under Home, then Dashboards (on the left).
UPDATE: We strongly recommend adding the following piece of code to your Google Analytics tracking so that you can track a larger sample of visits. If you get less than 10,000 pageviews a month, than we recommend setting this parameter to 100, to sample all the visits. Otherwise, 20% or 5% of your visits should be fine.
Here are the widgets:
- Average Server Response Time: How long it takes, on average, for your server to respond to a request by a visitor. This includes the network time from where the visitor is to your server. If you have a lot of international visitors, you may want to break this down more and look at server response time by country.
- Average Domain Lookup Time: How long the DNS lookup took for this page. This should be tiny. If it’s big, you have some weird DNS issues going on. If you don’t know what DNS is, here’s a one sentence explanation: DNS is the system that turns named URLs (like kickpoint.ca) into the IP address where the site is kept (like 220.127.116.11).
- Average Page Load Time: How long it takes, on average, for any page on your site to load. There’s a lot of variability in these numbers so we’ve broken it down in a few charts as well.
- Visitor Caching Info: A comparison of load times for new visitors versus returning visitors. Returning visitors should have a slower load time, in theory, as their computer may have already cached important pages.
- Load Time for Popular Pages: Load times for your top 10 pages by visitor count. This is a good place to start seeing what’s slowest and figuring out what’s on that page that’s making it so much slower than the others.
- Load Time by Browser: This can help you identify any browser-specific quirks that can cause loading speed differences between browsers.
- Mobile Load Time: Average load time for mobile devices only. This likely won’t show a lot of data unless you’ve increased the sample size as noted above.
- Mobile Device Usage: No speed data (as per anearlier note) but it will tell you the top 5 mobile devices visiting your site and give you a starting point for further testing.
Google also has a nice chart outlining exactly what happens between the time when a visitor requests a page and the page actually showing up in their web browser:
We hope you find this dashboard useful!