Site Speed Reports

Site Speed ReportsIn a survey carried out by Radware, 51% of online consumers did not complete their purchase because the ecommerce site loaded too slowly. Also, according to another survey, 47% of visitors expect a site to load in two seconds or less. Moreover, around 40% of users abandon a website that takes more than three seconds to load.

This is why you should never give up on improving the speed of your site.

But, you need data to know what is lacking and where you need to improve. This is where Google Analytics Site Speed reports can help you.

These reports give you the details about how quickly your site visitors are able to see the content on your site’s pages and interact with them. Also, the reports help you understand and identify those areas that could be improved to optimize the site’s speed for both desktop and mobile devices.

How Do You Start Using the Site Speed Reports Effectively?

You can track your site’s speed from your Google Analytics account.

The Classic Analytics method is out of favor and the ga.js serves as a legacy library. If you are using Universal Analytics, which is the latest version of Google Analytics that was released around 2012 (and uses the analytics.js javascript library instead of the old ga.js), you will already have this tracking functionality implemented.

To properly account for any existing implementations, it is necessary that you migrate from ga.js to analytics.js. This upgrade is important because 100% of GA properties have been transferred to Universal Analytics (UA), and all the new properties will only be UA properties.

The data regarding your site’s speed is shared with you along with the page view hits. Also, you do not need to add any Google Analytics code to view the related statistics for site speed. However, Universal Analytics considers a page load sample of about 1% of your site’s page views, when showing your site speed data.

Yet, many site owners want to see the speed details for a larger pool of page views, instead of the default 1%. You too might wish to increase the sample default rate. For this purpose, you can simply alter the code mentioned below:

ga(‘create’, ‘UA-XXXX-1’, ‘auto’, {‘siteSpeedSampleRate’: 50});

The permissible values in place of “50” can be any number from 0 to 100. Developers can help your site achieve this by referring to the technical process laid out by Google to change this site speed sample rate.

What Do the Site Speed Reports Do?

The Site Speed reports give you an overview of how well your site is performing.

You can check out the reports from the “Reporting” tab of your Google Analytics dashboard. Once you are in this tab, you can check the left-hand side of your page and go to this exact path: Behavior -> Behavior Flow -> Site Speed. site-speed-reports-1You can then look at the different site metrics displayed in the Site Speed Overview reports, the Page Timings reports, the Speed Suggestions reports or the User Timings reports. site-speed-reports-2

The most critical metrics measured by these Site Speed reports in terms of latency are:

  • The average page load time: This indicates the actual time it takes for a sample page to load from the moment that the page link is clicked, resulting in a pageview initiation, till the completion of the load in the internet browser. This information can be viewed in the Page Timings report across various dimensions, such as based on the different countries or different browsers.site-speed-reports-3
  • Average document interactive time: This indicates the time it takes the browser to parse the document and make it available for interaction with the visitor or user. This metric is visible under the “DOM Timings” subtab of the Page Timings report.
  • Average user timing: This indicates the load time taken by any discrete event, hit or user interaction that you specifically wish to keep track of. For example, you may want to track the time it takes for certain images to load. This information is available in the User Timings report.

You need to make use of the ‘_trackTiming’ method mentioned below that collects and sends the user timing data to GA.

_gaq.push([‘_trackTiming’, category, variable, time, opt_label, opt_sample]);

Here, you need to fill the ‘time’ parameter with the time taken to load in milliseconds (for jQuery library). You can capture this information for the utility function loadJS that loads various resources and looks like the sample code below:

var startTime;

function loadJs(url, callback) {

 var js = document.createElement('script');

 js.async = true;

 js.src = url;

 var s = document.getElementsByTagName('script')[0];

js.onload = callback;

 startTime = new Date().getTime();

 s.parentNode.insertBefore(js, s);

}

function myCallback(event) {

 var endTime = new Date().getTime();

 var timeSpent = endTime - startTime;

 _gaq.push(['_trackTiming', 'jQuery', 'Load Library', timeSpent, 'Google CDN']);
};

Here, the beginning timestamp is stored in ‘startTime’, while the end timestamp is stored in ‘endTime’. Once the resource (for example, image) is loaded, it triggers the execution of the callback function that helps to retrieve the end timestamp which is used to calculate the time spent to load the resource.

Finally, this is the time value that is shared with GA using the _trackTiming method discussed above.

The Speed Suggestions report further displays page speed optimization tips for your site and you may implement them for better results.site-speed-reports-4

Comparison of Site Speed Metrics

The best part of the Site Speed reports is that they give you the opportunity to compare different metrics of your site with graphics.

For example, if you want to compare the average page load time metric with the average document interactive time metric, you can do so under the Page Timings report, as shown below:site-speed-reports-5If your average page load time is shown as seven seconds, but your average document interactive time is only three seconds, your site visitors would be able to start interacting with your site even though the page has not fully loaded.

So, they could already start reading some content or clicking on hyperlinks, while waiting for all the images or third-party plugins to load.

Such a scenario would give a better perceived experience to your site visitors than if your average page load time was six seconds and your average document interactive time was six seconds. This is because, in the latter case, the visitors would have to wait for the whole six seconds, before they could interact with the content on your site.

So, do you have any prior experience in using the Site Speed reports for your websites? If so, please share your invaluable experience in the comments section below.

If you like my articles,