How to measure website speed (Part 1: Google analytics)

A quality website should always keep track of the its loading time. A slow loading landing page not only impacts your conversion rate, but can also impact AdWords landing page quality and ranking in Google search. To improve the performance of your site, you first have to diagnose and measure the speed of it. After measuring your site’s speed, it is critical to take the necessary actions to improve it, which can be a challenging task. This article presents some of the tools you can use to measure your website’s speed and also keep track of its performance.

Google Analytics

The new version Google analytics which is currently still in beta supports the measuring of your website’s speed. The Site Speed report has been added in the standard reporting tools available in the Google analytics reporting options. You can access it by going to the reports tab in the Content report group, by clicking “Site speed”. The report looks like the following snapshot:

Analytics site speed report

Analytics site speed report

In order to activate the new feature you just have to make small change in you Google analytics’ tagging code because the speed tracking is turned off by default. The necessary change in source code is the addition of an extra line:


After this change your default tracking code should look like the following:

Asynchronous tagging source code

<script type="text/javascript"><!--mce:0--></script>
var _gaq = _gaq || [];
_gaq.push(['_setAccount', 'UA-XXXXX-X']);
(function() {
var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '';
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);

Traditional tagging (old version)

<script type="text/javascript"><!--mce:1--></script>
var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
document.write(unescape("%3Cscript src='" + gaJsHost + "' type='text/javascript'%3E%3C/script%3E"));

<script type="text/javascript">
var pageTracker = _gat._getTracker("UA-xxxxxx-x");
} catch(err) {}

Once the tracking code has been updated a sample of pageviews is used to calculate the average loading speed of your website. You can also analyze your overall site speed along other important dimensions in order to learn how your site speed relates to a variety of factors. For example, you can view your site speed across the following categories:

  • Content—which landing pages are slowest?
  • Traffic sources—which campaigns correspond to faster page loads overall?
  • Visitor—how does latency compare by visitor type or geographic region?
  • Technology—does browser, operating system or screen resolution impact latency metrics?

Google has  also prepared a custom report that takes advantage of Site Speed statistics. If you click on this link, that report will be set up for the currently active site in your Analytics account.

Written By

Panagiotis (pronounced Panayotis) is a passionate G(r)eek with experience in digital analytics projects and website implementation. Fan of clear and effective processes, automation of tasks and problem-solving technical hacks. Hands-on experience with projects ranging from small to enterprise-level companies, starting from the communication with the customers and ending with the transformation of business requirements to the final deliverable.