Web Design, Web Development

Google Analytics; An Invaluable Resource13 Oct

I wanted to touch base with folks regarding Google’s highly useful Analytics tool which is free to use. When performing a statistical analysis of the people visiting your website, you want to make sure each and every aspect of the site is accounted for. This will drive your needs for content placement much further than simply “asking around.” Google has simplified the process of getting started, and I wanted to share some of my thoughts on the implementation of this free service.

You will first need to visit the Google Analytics website to copy and paste some of their updated code on to your pages. The trick here is that you will want to make sure that this code appears on every viewable page available to your visitors for an accurate count of who is visiting what page. This again will allow you to ensure your most important content both exists on those pages, as well as any relational material. A best practice here is to have an include file be integrated into each page, so if any changes are made on Google’s end, you only need to update a single page. In addition, some popular blog/website platforms include templates which in themselves have several include files. You can simply place this code into one of your include files, such as a footer.php file, in the case of WordPress, or any similar platform which uses an include template for every visible page.

Once you have isolated where you will place the Google code, you simply need to copy and paste the appropriate content info your file. As of this writing, below is the current chunk of code you will need to use:

<script type="text/javascript">
var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
</script>

<script type="text/javascript">
var pageTracker = _gat._getTracker("UA-4692319-1");
pageTracker._initData();
pageTracker._trackPageview();
</script>

This code is to be placed right before the tag in your include file, or static file. In my case, I did use the footer.php include as part of my template file. This ensures that every page that contains the footer, which is every page viewable by my visitors, gets the included code.

The service takes about 24 hours to begin populating data. Once you have established the connection, your stats pages will begin filling up with all sorts of useful information. I have attached a PDF file that you can see how the stats are. This is an example of what you would typically look at. Keep in mind many of these numbers are very low as this has just been implemented on this site.

Google Analytics for lucidapple.com .pdf

The amount of data given can be slightly overwhelming at first. It is important to realize that this data contains the functional information for how visitors are interacting with your site. Keep in mind that there are several other platforms that you can use, some of which may prove better than Google however, since the service is free, its invaluable for the majority of users on the web. Feel free to contact me if you have any questions regarding setup, configuration, or analysis of the data.

Leave a Reply