| Dec 28, 2018 | | 9 min read

Understanding website speed with Google Analytics data

By
Website speed and performance may not sound like an exciting conversation to have with your marketing team, but it should be!

Pinterest increased search engine traffic and sign-ups by 15% when they reduced perceived wait times by 40%. Inversely, The BBC found they lost an additional 10% of users for every additional second their site took to load. (Google)

Performance plays a major role in improving conversion, engagement, retention, SEO, user experience, and can be a key to discovering untapped potential that can be leveraged by your existing efforts.

In this article we will get you up and running with the data you need to understand what the current performance of your site is, and ensure you have the right data collection in place to ensure you can track your progress going forward, all while using a tool you likely already have installed on your site; Google Analytics.

Why Performance Matters

Performance is about improving conversions

User retention is crucial to improving conversions. Slow sites have a negative impact on revenue, and the opposite is also true. Here are some examples of how performance has played a role in making businesses more (or less) profitable:

When AutoAnything reduced page load time by half, they saw a boost of 12-13% in sales. (Google)

Performance is about the user experience

Your experience viewing a website may be vastly different than other visitors. Browser caching, proximity to where the website is hosted, and your own network speed are just a few variables that can skew the big picture of your website’s performance for your visitors.

Data driven insights derived from actual user data provides a wider, neutral spectrum for analysis, and is available natively in Google Analytics. Google Analytics Page Speed Insights gets its site speed page timing data directly from the actual visitors to your site, giving you a clearer picture of what is really happening.

Analyzing Vendasta’s performance.

We set out to benchmark where our current performance was at, and wanted to ensure that we had good data to quantify and monitor the impact of the efforts we were putting toward performance improvements.

Digging into our Google Analytics page speed data we were surprised; the Google Analytics page speed data we had was quite poor. Here are some of our initial values showing page load times that were too high and obviously inaccurate.

We noticed that the amount of page load time samples we had in Google Analytics were a very small sample of our overall traffic, and a few anomalies in these samples were skewing our results drastically. (see above)

Pages which had 1000 page views during the period, only had around 10 page load time samples, and if one of the samples showed a page load speed of say 300 seconds (due to an issue we would later investigate) it would throw the averages way off.

Getting started Google Analytics data

The first step to taking control of the performance of your site is to understand where you are currently; benchmark your website performance, and develop tools to monitor the effectiveness of your optimization efforts in a quantifiable way.

Google Analytics has site speed page timings built in, and can be an effective way to analyze your sites performance, if configured correctly.

If you’re wondering how you can view the amount of load samples in Google Analytics, navigate to Site Speed > Page Timings. Choose the technical view under ‘Explorer’ at the top, and Choose the Data View in the data table. You should see something like this:

As you can see in the data view above, the amount of page load samples were only roughly 1% of our total page views.

After a bit of research we found that Google Analytics by default takes page load samples of only 1% of page views by default, and has a maximum collection of samples of 10,000, meaning there is only a 1/100 chance of Google reporting the page speed of the page view each time someone visits the page by default.

This metric is optimal for sites receiving 1,000,000 page views per day, based on Google Analytics maximum of 10,000 pagespeed samples per day; but much less efficient for sites with lower volumes of traffic.

It is unclear to us why Google Analytics defaults to 1% collection. My best guesses would be that they believe that is enough data for most users, or they want to reduce the amount of data they have to collect by default that may never be used, or lastly and most unlikely, they just think average sites get roughly 1,000,000 page views per day. It is still a mystery to me.

The only information Google provides in the About Site Speed Notes is:

"By default, a fixed 1% sampling of your users make up the data pool from which the page timing metrics are derived. See the Tracking Code Reference for details on customizing the Site Speed sample rate."

While this doesn’t provide us the insight to the question we are asking, it does confirm the conclusion we earlier discovered in our analytics data.

Customizing Data Collection for your Website in Google Analytics

Good news! While the total maximum amount of 10,000 samples can’t be increased, the site speed page load sample rate can be configured and you can tune your analytics settings proportionally by using these formulas:

Total site traffic under 10,000 average pageviews per day

((Average pageviews per day) / 10,000) * 100) = Optimal page load sample rate

Total site traffic greater than 10,000 pageviews per day

((Average pageviews per day) / 10,000) = Optimal page load sample rate

If your page load sample rate value is under 100 using these formulas, then it is up to you to set the threshold, but we chose to keep ours at 100 (or 100%) to ensure we were collecting as much data as possible while we were under 10,000 views per day.

If your site’s page views per day are over a million (lucky you!) then you will probably want to space out your samples throughout the day, thus choosing a lower value is more appropriate. (See calculation above).

Next step is to add your Page Load Sample rate in Google Analytics. Since we use Google Tag Manager to manage our scripts, this was changed by overriding settings in GTM and adding the field siteSpeedSampleRate.

If you are not using Google Tag Manager, you can add the page load sample rate directly to your Google Analytics code:

Asynchronous Code Syntax Example:

<script type="text/javascript">
var _gaq = _gaq || [];
_gaq.push(['_setAccount', 'UA-XXXXX-X']);
_gaq.push(['_setSampleRate', '20']);
_gaq.push(['_trackPageview']);

(function() {
var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
})();
</script>

Traditional Code Syntax Example:

<script type="text/javascript">
var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
</script>
<script type="text/javascript">
try{
var pageTracker = _gat._getTracker("UA-xxxxxx-x");
pageTracker._setSampleRate('20');
pageTracker._trackPageview();
} catch(err) {}
</script>

Our website was, at the time, receiving less than 10,000 page views per day, so keeping the sample at 100 ensured we were going to get the most data possible. This would, of course need to be revisited once we reached a significantly higher page view per day volume.

If your sampling rate needs to be adjusted significantly after following the above directions, it will take some time before you start to see your page speed data level out. For us, it took roughly two weeks to gather a meaningful sample size of data, and start to see more accurate page speed data in Google Analytics; however, the amount of time you will need may be different based on how much traffic you are receiving. Sites with a low amount of traffic may want to use a longer measurement period to develop a larger sample size for a baseline.

Analyzing your new data

With more data coming in to Google Analytics, you can develop a simple dashboard in Google Data Studio to monitor the improvements to performance. The below example dashboard graphs average document content loaded time and average page load time over a configurable period of time.

Both of these metrics are important to consider and improve. Document Content Loaded refers to when the structure and content of your page has been loaded in the browser, including the network time it took to connect to the site, but may not include your stylesheets, images or javascript.

Page load time is when all of the assets of your page have been completely loaded and are ready in your browser. (i.e.: the browser loading icon has stopped). Each of these metrics are equally important for user experience, and should be optimized, but we will not be covering those techniques in depth in this article. Stay tuned for our next article on How to improve your site speed where we will take you through Vendasta’s performance blockers, and how we overcame them.

You can read more information on these metrics In Google Analytics help article.

We also added in page load sample to demonstrate how changing the sample rate significantly affected the amount of data we were now collecting.

In the above example the light blue line is the previous period prior to increasing the page load sample rate, and the dark blue line is the same period after increasing the sample rate.

After increasing the sample rate, the increased sample rate of data smooths out the graphs considerably, and you are more easily and accurately able monitor your true load times.

Conclusion & Takeaways

Data is your most important ally in the journey to improving performance of your website. Developing a baseline, defining goals, and working to reach them are all important catalysts on the journey to improved conversion, user experience, and visitor retention.

Understanding page speed insights is important for marketers. The impact these metrics have on your site are undeniable, and can be important for your success online. I encourage you to take the time to understand these metrics, and tune your sample rate to get the most out of Google Analytics.

With the right data, and tools in place, monitoring your success or failure in this area can become quite easy, and will open the door to insights that may have otherwise been overlooked or unavailable.

I hope this guide has been helpful in getting you started on your journey to a faster, more reliable website using Google Analytics. Discover how you are performing now!

About the Author

Adam is a former Marketing Technologist with Vendasta. Before starting in January 2016 he ran his own digital agency and was a partner on the Vendasta platform. He's always on the lookout for new insights into the GA/GTM/DataStudio stack and solving attribution challenges across any funnel.

Shares
Share This