Your website load time is becoming more important each day. This is an important factor to track and it’s becoming more important as technology continues to improve. Do you know how long it takes your site pages to load in a browser?
There are two primary reasons you want to track your site speed.
Search engines (mainly Google) are taking your website load time as a factor for ranking your site. If your site speed is slower than mine, and all other variables are the same, Google will place my site higher in search results simply because it’s faster.
Second, you could be losing money and lead conversions. If your site is slow you will lose customers. According to this infographic at KissMetrics, a one second delay in page load time can result in a 7% reduction in conversions – Almost 1 in 10 people who would’ve bought, won’t buy because of 1 second. Naturally, your experience will vary but, according to the same infographic, almost half of web visitors (aka your potential customers) expect a page to load in two seconds.
Your Web Page Performance
You want to make your visitors happy. A fast loading page keeps them happy. Happy people are more likely to buy. Happy people are more likely to become loyal customers. With that brilliant example of logic, you now understand the financial impact and why you want to track your site speed performance in Google Analytics.
Setting Up Your Website Load Time Tracking
Google Analytics automatically tracks the site speed on about 5% of your traffic by default. If you want to increase the number of pages it tracks you can.
You can increase the sample rate from 5% to 70% or 100% with one of these two easy steps (you can set it to 100% but Google won’t actually track 100% of your visitors).
If you manually added the Google Analytics tracking script find the section of your Analytics Tracking Script which looks like this:
var _gaq = _gaq || ;
In this code, the second line with the ‘UA-XXXXXXXX-1’ will be replaced with your Analytics UA Tracking ID.
Between the second and third line, with the ‘_trackPageview’ code in it, add this line of code:
This line of code tells Google to track your website load time on 70% of the page views on your site. The number “70” is the percent of page views you want sampled for speed. You can change it from 0 to 100.
Ultimately, this snippet of code will look like this:
var _gaq = _gaq || ;
If you set your sample rate to 100% Google Analytics won’t track all the page views. It will be close but they won’t. Also, Google won’t track more than 10,000 hits per day for your sample. Keep that in mind when determining your sample rate.
WordPress Site Speed Tracking
To increase the site speed sample rate, you can enter the snippet of code in the plugin’s Advanced Settings.
Go to the plugin setting’s page. If you haven’t already, check the box to show advanced settings and hit save:
In the advanced settings, there’s an option to place custom code. Put the line of code in the box so it looks like this:
Hit save and you’re done.
With this plugin you’ll have to be careful on this option. Every time you save the settings it adds a “” before the single quote marks. The plugin stores the content in your database and the slash is a code to make sure it outputs the single quote on your page instead of stopping (I’m not exactly sure since I’m not a programmer but I understand it’s necessary sometimes). If you hit save again it will add two more slashes so be careful when saving. Make sure you remove all slashes each time BEFORE you hit save on this option.
After you save the settings your code will look like this:
As long as there’s only one “” before each single quote you’re fine. If you make any other changes later, make sure you remove the slashes before you hit save to keep it working properly.
Page Speed Dashboard For Google Analytics
Now you have the tracking code set up on your site. Here’s a Google Analytics dashboard to give you a quick view how your page speed is effected by various visitor details. It lays out speed by source, landing page, country, browser, and mobile visitor.
Website Speed Test
The tracking in Google Analytics will give you a nice view on what your visitors are experiencing. These speed test options give a standardized report to help you determine where things can be improved on your site.
If you find your page load time slower than you like, check out a webinar by my friends at Speedilicious (register here, wait or scroll to end of the 2 minute intro video for webinar registration button to display). They’ll show you how you can fix most of the things people screw up when optimizing for site speed. I highly recommend watching their webinar and what they offer.
If you thought this was helpful, share it with your friends. Help them monitor their site speed and make the internet a better place.
Hourglass image by andreyutzu