
HOW TO: Setup Google Analytics To Check Site Speed
- Updated On 17/04/2017
- Author : Pradeep Kumar
- Topic : Featured • Google
- Short URL : http://hbb.me/2oz4bra
CONNECT WITH HBB ON SOCIAL MEDIA
Google Analytics quite recently added a new feature for checking your site speed and page loading time, awesome isn’t it? It is not an automatic upgrade, so you need to tweak your Google Analytics default tracking code to enable this feature. Now it will be easy to improve your site’s loading speed.
Add Site Speed Code in Google Analytics
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 this [sample code] :
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>
This will be really useful for webmasters and bloggers to detect which landing pages are slow. Also you can find the cause and fix it earlier since Google considers site loading speed as a key factor in SERPs.
Want to discuss your queries and interact with experts? You can connect with HellBound Bloggers (HBB) Facebook group for free!
Join HellBound Bloggers (HBB) and get Instant Updates. We'll also notify you with Great Deals, Discounts and other Interesting Tips. We won't SPAM or SHARE your Email Address with anyone.
YOU CAN ALSO SEARCH FOR YOUR DESIRED TOPICS:
Thank you for reading! We welcome and appreciate your comments, but at the same time, make sure you are adding something valuable to this article. If you have any serious queries, suggestions or anything related to this article, feel free to share them, we really appreciate that.
But, if your blog comments are a random "Thank you", "Useful Post", or anything that doesn't actually upscale the article, then we'll be removing them and it won't be appeared below. Thanks for understanding and thanks for connecting with us. If you want to give us any feedback or report any errors, you can kindly contact us and we'll revert back soon.
- Comments
- Facebook Comments
- Comments
Do you have any queries? Want to share something?
9 Comments
Facebook Comments
Benjamin Hubbert
Pradeep, thanks for taking the time to break this down. I just upgraded servers so I am definitely gonna install this code. Hopefully my site checks out.
Nasif
I think the line "_gaq.push(['_trackPageLoadTime']);" is added to the code by default. I checked my source code and it's already there. Maybe I updated the code once upon a time !
Namit Gupta
While updating the code, I realized I was using the old analytics code. Updated to the new one and also added the above mentioned line of code. Thanks Pradeep. ๐
Kavya Hari
Thank you so much Pradeep for given here ๐ And, this is one of the best directions to increase your web site loading speed ๐ Great code ๐
Nick Gray
Site speed is the newest member in the SERP requirements. Will give it a shot for sure. Thanks.
Prashant Rohilla
Thanks Pradeep, till know i was checking it through Google Webmaster tool, will now integrate This Code !
Manrpeet Singh Rehsi
Great Tip, I shall defiantly be using this one.
Isha Singh
nice feature by google. added the code let check how efficient the feature is. btw thanks for share.
plaban
Thanks for this.I didn't know about this.I've added this code.I'm going to check how fast my site loads.