Site Speed added to Google Analytics tracking code
Google Analytics have recently added a site speed tracking feature, by adding a new line of code to their tracking code. The feature has not been implemented automatically and is something you must add manually. The feature is also only available on the new version of Google Analytics.
How to implement the new tracking code
Add the following line of code:
_gaq.push(['_trackPageLoadTime']);
Resulting in:
<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>
Viewing site speed statistics
Go to My Site -> Reports -> Content. You should see a new entry “Site Speed” under the Content section. After several hours you will notice results showing your average page load speeds.
The diagram above shows the average load speed of the website per day. As you can see, on Friday 13th May, the website’s average load speed was 3.34 seconds. This is a reasonable load time as, typically, most people won’t wait more than 10 seconds for the site to load. If a web page does not load up in three seconds, they will leave.
Tips to speeding up your website
- Optimise image sizes
- Optimise JavaScript calls
- Optimise CSS. One file, one call.
- Reduce white space in code.
- Enable gzip compression.
- Super cache
- Content delivery network (CDN)
Conclusion
The new feature from Google Analytics demonstrates once again how important it is to have a user-friendly and fast loading website. In my opinion, the addition of page load speed is a welcome change, as a faster website would naturally entice users and encourage them to stay on the website and convert.
The Google AdWords algorithm has incorporated page load speed for some time now. This recent change in Google Analytics enforces our belief that the page load speed is a crucial factor in SEO and usability.
Gareth Evans
SEO Programmer

