Setup Google Analytics to Measure Page Load Time, Site Speed
Google Analytics (external site) introduced a new feature which allows webmasters to measure Page Load Time and Site Speed and get detailed analytics reports for your site.
However, it is not an automatic upgrade, and webmasters, bloggers and site owners need to edit code of the Google Analytics code to start tracking page load time and get the site analytics reports. Though available in2 different scripts, it is advisable to always use the asynchronous script as it will not delay page loading and track more pageviews. Remember to place it in HEAD section of your page html.
Add Site Speed Analytics Code
To get the new site speed report, add the following line to your analytics code
_gaq.push(['_trackPageLoadTime']);
Now this is how your code will look like
<script type="text/javascript">
var _gaq = _gaq || [];
_gaq.push(['_setAccount', 'UA-XXXXX-X']);
_gaq.push(['_trackPageview']);
_gaq.push(['_trackPageLoadTime']);
(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>Remember the page speed measurement is turned off by default and unless you make this code change to the Analytics tracking code, this report will not be generated. It will help you find which landing pages are slowest, find the causes and fix up your site speed issue as it is a search engine ranking criteria.
Stuck on a gift? Try our free Gift Idea GeneratorIdeas for anyone by age, job, interests and budget, with Amazon.com and Amazon.in linksFind gifts →Get our free weekly email: new tech guides and tools, no spam.
New and updated tech guides, a free tool worth bookmarking and one useful pick, once a week. No spam, unsubscribe anytime.
One email a week. Unsubscribe anytime. See our privacy policy.







Thanks for this info. I couldn’t make head or tail of Google’s instructions and you set it out so simply. I have just installed it and Look forward to seeing the results.
Thanks again.
I installed the code, but I don’t see it in the reports yet. Where exactly does it show it?
Go to the new version of Analytics – should see the link on top right. Click to Content > Site speed.
Thanks for this neat piece of coding. Am trying it out now and will see how things pan out.
Thanks for sharing this around.