Information Tech

the reality of working in IT for the last decade

Careers

take charge of your career, before someone else does

Management

the realities and joys of being in management

Blogging

a fun project that turned into a hobby sometimes

Life & Times

we all get one shot at it, better make it count

Home » Blogging, Web Finds

Using Site Speed in Google Analytics

Submitted by on September 10, 2011 4 Comments
Google Analytics Site Speed

Today, I was looking through my Google Analytics account and found something new. In reality, it is not really that new; I am just late finding it. The feature that I am speaking about is called Site Speed.

Site Speed is a feature that I am most excited about as it offers us Google’s perspective on the average time it takes to load various pages on our websites.  This is not blinded aggregated benchmarks but the actual load times for various pages on our websites.  Google has given us this powerful and amazing feature.  No more will we have to guess or beat our collective heads into the wall by using various small or inconsistent players in order to help determine page load times.  Do not get me wrong, there are good services that help with this determination, but Google will quickly become the de facto standard for its broad-based consistency and ease of use.

A simple change is required in your Google Analytics Tracking code.  You need to add “_gaq.push([‘_trackPageLoadTime’]);” to your tracking code.  Please see the below example for placement.

  var _gaq = _gaq || [];
_gaq.push([‘_setAccount’, ‘YOUR ACCOUNT NUMBER GOES HERE‘]);
_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>

Shortly after adding this code, you will begin to see values for page load times in your Google Analytics account under Content / Site Speed section.  You may need to move over to the beta version of Google Analytics to use this feature.  I did not check the original version of Google Analytics to see if it exists there, as I am delighted with the new beta release of the Analytics site. You can access the Google Analytics beta site by logging into your regular Google Analytics account and then clicking on the link on the top right-hand side of the page.

As noted in the Google blog posting about this feature, you will need to change your date selection to include today; otherwise, you will need to wait until tomorrow to view some results.  This is really a piece of cake to add to your site to give you some solid feedback on how well your site is being loaded on the net. Additional information can be found on Google’s help page for Site Speed.

I have been a huge fan of Google Analytics, and for us small site operators, you cannot beat the analytics for the price point (it’s free – yea!).  Google really has an amazing product here that you can use to enhance your website performance.  After all, nobody likes going to a slow and poky website.

After looking at some of the results for my website, I made a few changes and cut my average load time from 7.1 seconds to 5.2 seconds.  I will be making changes this weekend that I hope will get me into the 4-second range.  I am not sure that I will be able to do much better than that without changing my host and leaving WordPress.  Neither of these two options is highly likely for me to embark on to save another second.  As with many things in life, site performance is always about trade-offs between features/functions, hosting providers, time investment in recoding, and the almighty dollar.  We all need to find the proper balance to ensure our users get the best possible experience from our websites.

4 Comments

Leave a comment!

Add your comment below, or trackback from your own site. You can also Comments Feed via RSS.

Be nice. Keep it clean. Stay on topic. No spam.

CommentLuv badge

You can use these tags:
<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

This is a Gravatar-enabled weblog. To get your own globally-recognized-avatar, please register at Gravatar.

*