Are you one of the millions that uses Google awesome analytics tool Google Analytics? If you dont, you should! This is the best friend of all webmasters. Or perhaps second best after Google Webmaster Tools, but still. Google has now made Analytics even more awsome. You can now even check the speed of your site.
Over the last year Google has indicated how important site speed really is. I guess we all have been there. Searching for a site and when we finally got the search result you wanted the site is so extremely slow. Google want to get rid of these sites from their searches and since the majority of the searches happens on Googles sites this really matter to you as a webmaster.
There are a lot of web sites out there that can track your sites load speed and you can of course just check the site your self in a web browser. But the best way to check how Google finds your page speed must be to use Google’s tools.
So lets get to business.
To use Google Analytics you have to first sign up at http://analytics.google.com and add your site there.
The you have to add the tracking code to your site. Remember that the code must be displayed at ALL pages at your website to track all traffic.
And here is where the magic comes. The normal tracking code looks like this:
<script type=”text/javascript”>
var _gaq = _gaq || [];_gaq.push(['_setAccount', 'UA-XXXXXXXX-X']);
_gaq.push(['_trackPageview']);
(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>
What you need to do is simply to add the missing piece of the puzzle; _trackPageLoadTime();
This means that the new tracking code will look like this:
<script type=”text/javascript”>
var _gaq = _gaq || [];_gaq.push(['_setAccount', 'UA-XXXXXXXX-X']);
_gaq.push(['_trackPageview']);
_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>
When you have this new code on your site you just have to sit back and wait for some days to see the tracking correctly. Then you can log on to Analytics. Remember that you must click on the “New” button in the top right corner since this is a new feature.
Choose you site and then..
Choose “Site Speed” under “Content” and you can start to track the speed of your different sites. If you have sites that has loads really slow you should do something about it.
Google sees you
God luck on your speed!











Pingback: Computerole » Blog Archive » Google Analytics and site speed | SFWEBDESIGN.com