Recently a lot of talk has been going around SEO circles about the new Google Analytics ability to track the time it takes for your page to load.
I use WordPress for this site, and I got curious about how to add in the PageLoadTime part of the script using my WordPress Admin.
I have installed Google Analyticator on my site to help with the Analytics validation. It makes everything really easy. Here is how I added the PageLoadTime script to my site:
Easy Steps
Step 1: Log into your WordPress admin area.
Step 2: Navigate to Google Analyticator. It will be in your sidebar under “Settings -> Google Analytics”:
Step 3: Navigate down the page until you find “Additional Tracking Code (after Tracker Initialization)”:
Step 4: Enter this code into the box:
_gaq.push([‘_trackPageLoadTime’]);
Step 5: Look at your site to make sure it has entered correctly. Your tracking script should look thus:
*Note* Numbers will not start appearing in your Analytics right away. According to this post by Optimisation Beacon, data will begin appearing after a few hundred pageviews.
Wait, where do I find this in Analytics?
First, make sure you are using the NEW Analytics. I believe it has been rolled out to everyone.
You can find Site Speed on your site’s Analytics Dashboard under Content -> Site Speed. This is where it is, visually:
Happy optimizing!
Did this today – looking forward to seeing the results tomorrow morning. Got a feeling I’m going to be spending the day compressing stuff! Idea for your next post – reducing page load times for noobs!
Thanks for the comment, Chris! I’m definitely giddy to look at some data soon.
I’ll probably write a post about decreasing page load time at some point. There have been some good posts about it fairly recently though, if I do recall.
Site Speed – Are you fast? Does it matter? (SEOmoz)Site Speed for Dummies, Pt 1
Pingback: Google Analytics Now Tracks Page Load Speed | NexGen SEM
Pingback: Google Analytics Now Tracks Page Load Speed | jondyer.net
Wow, thats a great new feature! Thanks for the walkthrough on how to insert the code!
Nice. Excited to give this a shot. When I add it to my analytics code (via Google Analytics for WordPress Configuration) and videw the source, I see:
_gaq.push([\'_trackPageLoadTime\']);
Do those extra \’s make a difference? Are they going to break the code?
John –
I don’t think it should have done that. You need to have exactly what I designated to put.
I am honestly not sure how it works adding with Google Analytics. Is there an option for adding “After Initialization”? How did you input the code? I guess what I am asking is if there is a place provided to input custom code.
I put it in as you stated, but when I submit, it adds the slashes. I feel like I’ve seen this happen before in other instances.
I removed Google Analytics for WordPress and installed Analyticator – that seemed to do the trick.
Thanks again!
Hi John,
You’re using Yoast’s Google Analytics for WordPress, not Google Analyticator. That plugin seems to have a bug where the slashes are added but not stripped out.
I have a post (How To Add Site Speed For Google Analytics In WordPress) that covers how to hack the plugin to fix this and I’ve also reported it as a bug.
Hope that helps..
My bad, I didn’t see your post until after I uninstalled Yoast’s plugin. I think I’ll probably just stick with Analyticator, I have no real preference as long as the GA data is being gathered. Thanks for taking the time to share that though, I appreciate it!
Pingback: Site Speed Report Now Available In Google Analytics | Wpromote
Good idea redacting your UA code!
I forgot to do that and have had several sites showing up in my unfiltered profile… 🙁
Luckily I’ve had it happen to me before, so I was prepared for it.
Pingback: Google Analytics Now Tracks Page Load Speed | New Age Website Marketing