• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar

Startup Hero

The Official Blog Of Name Hero

Learn To Fly Above The Competition Get Started
  • HomeWelcome
  • CoursesVideo Training Center
  • About UsWhat is StartupHero?
  • BlogGet the latest
  • Start HereStartup 101
  • SpeakingPodcast & Media
  • ResourcesTools to help You
    • Reselling WordPress Hosting
    • Resell Hero
    • How To Start A Blog
  • NameHeroCloud Web Hosting

How To Track Page Speed Accurately In Google Analytics

By Bhagwad Park on December 12, 2018 1

How To Track Page Speed Accurately In Google Analytics

After all your page speed optimizations are done, how do you know if they’re having an actual impact on the loading speed? No matter how many speed tests you conduct with the pagespeed tool by Google or on webpagetest.org, there’s no substitute for real-world monitoring. With testing tools, you at best get a simulacrum of real-world conditions. You can’t account for device, operating systems, slow Internet speeds, and a host of other factors.

The only way to test the results of your efforts is to get the full-page speed details of each and every page load. There are tools that do this. Unfortunately, it requires you to include a Javascript tag on each and every page. This is unavoidable, so the best we can hope for is for an existing tag to do the job for us.

Luckily, we already have a such a tool – trusty Google Analytics. But we need to configure it first.

Google Analytics Tracks Page Speed Metrics

In addition to all the wonderful things Google Analytics does, it also tracks your page speed. In your reports section, click the label on the right called “Behavior”, and you’ll see a “Site Speed” section as shown here:

Google Analytics Behavior Site Speed

 

From here, you can monitor various metrics like DNS redirection time, server connection time, server response time, and final page load time. Particularly useful for me, is the “hourly” report in the “Overview” section for a single day as it allows me to get more fine-grained results without all the aggregation.

But the Problem with Site Sampling

There’s a snag though. By default, Google Analytics doesn’t report every page view time. In fact, it samples only 1% of the total pageviews! That means unless your site gets thousands of pageviews every day, you’ll hardly get a decent sample size to get a representative idea of how fast your site’s speed metrics are.

This is what my speed analytics data used to look like before:

Page Speed Samples Missing

Google allows up to 10,000 site speed samples to be sent every day. The only way you’re going to hit that limit is with 1 million daily pageviews 🙂

Luckily, we can configure Google to increase the percentage of pageviews it sends for speed sampling – and dial it all the way up to 100% if necessary. Here’s how to do it.

Changing the Site Speed Sample in Google Tag Manager

This is the preferred method of changing the site speed sample rate. Google tag manager is how you should be using Google Analytics in any case. Once set up, it’s far easier to manage your tracking code, which also gets updated to the newest versions whenever necessary. It’s a great way to add all kinds of cool functionality to your site. Check it out!

If you’ve set up Universal Analytics in Google Tag Manager, you need to go into your tag settings and click the checkbox saying “Enable overriding settings in this tag” as shown here:

Change the siteSpeedSampleRate to 100

This opens up a bunch of options below and allows you to set individual parameters for Universal Analytics. Under “More Settings”, set the following:

  1. Field Name – siteSpeedSampleRate
  2. Field Value – 100

You can see how it’s done in the screenshot above. Save your changes, and publish the Google Tags to your site after adding a comment how what you changed, just in case you want to keep track later.

Testing the Page Speed Data

Now when you visit Google Analytics, you should see much better data in the Site Speed report since 100% of all visits are being reported. Like this:

Accurate Page Speed Tracking

It’s far more accurate and you can break down the data by country, browser, and telecom provider to get an idea of the factors that most impact your site speed.

If you’re at all interested in maximizing your page speed, then setting up Google Analytics to report all the visits is the first step to measuring it properly!

Bhagwad Park Profile Picture
Bhagwad Park

I’m a NameHero team member, and an expert on WordPress and web hosting. I’ve been in this industry since 2008. I’ve also developed apps on Android and have written extensive tutorials on managing Linux servers. You can contact me on my website WP-Tweaks.com!

Reader Interactions

Comments

  1. Gus says

    February 12, 2020 at 1:42 pm

    Hi! Very useful. I started working on optimizing a website which has this set to 10. Who would do that? Why? Do this have any impacto on site performance?

    Reply

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Primary Sidebar

Connect With Us!

Superhero Resources

Fix Common Issues

  • How To Setup Free And Automatic SSL Certificates
  • How To Setup Cloudflare With Railgun
  • How To Fix Memory Exhausted Errors In WordPress
  • How To Edit PHP Version/Upload Limit/Add Extensions
  • How To Move/Migrate Your Business To Name Hero

Free Guides

  • How To Setup NameHero Hosting
  • How To Create A Web Hosting Business With WordPress
  • How To Start A WordPress Blog
  • How To Migrate WordPress To A VPS
  • How To Speed Test And Optimize Your WordPress Website
  • Magento 2.X Installation Guide
  • How To Clean Up A WordPress Hack

Training

Recent Posts

  • The Best WordPress Plugin To Combat Plagiarism
  • Is It Time to Bring Back Blog Comments?
  • Two Filters That No Longer Work In Gutenberg (And Workarounds)
  • Migrating To The New Cloudflare Managed Rules Interface
  • How To Sort Posts By The “Last Modified” Date
  • How To Make WordPress Send E-mail From Another Address
Subscribe in a reader
  • Web Hosting
  • WordPress Hosting
  • Reseller Hosting
  • VPS Hosting
  • Twitter
  • Facebook
  • LinkedIn
  • YouTube
  • FTC Disclosure
  • Earnings Disclosure
  • Privacy Policy

Copyright © 2023 · Smart Passive Income Pro on Genesis Framework · WordPress · Log in