Traffic tracking and analysis - Google Analytics

Anybody that creates a webpage and publishes, wants to know if someone is viewing it, what they are doing on it, and if a search engine is indexing it. I wanted to start doing exactly that. Go Daddy provides some stats about how many hits, from where, what browser, and a few other bits of information. Not enough to satisfy me, especially when I want more in-depth insight regarding my visitors. Another major reason I wanted to do this is because the stats that I get form Go Daddy, include the hits that are being generated by my editing/viewing of the pages. This can add upto 100s a day, skewing my stats and perseption of how good the site is doing.

For this, I turn to who other than Google - or Google Analytics to be more precise. They have a whole slew of different metrics that are measured for a given site. Extremely easy to setup - for a regular website... and just a bit more work is needed to get it working with Drupal.

A company called IXIS has created a module to incorporate Google Analytics into Drupal. Because of the way Drupal works - ie template based, you cannot simply copy and paste the Google Analytics code to every page. You have to integrate it into the php script. The free Google Analytics module by IXIS does just that... and does it very well. You can configure it to only track hits that come from sources other than the administrator. This is extremely helpful to get the real picture.

First you must register an accoung with Google Analytics - if you already have a Google account, you can just use that. Then you create a profile for the website you want Analytics to start tracking.
Google Analytics will then spit out a small snippet of javascript code that on a regular website you would copy and paste onto everypage you would like to get statistics about.

This is what the javascript code looks like:

<script src="http://www.google-analytics.com/urchin.js" type="text/javascript"> </script>
<script type="text/javascript">
_uacct = "UA-212xxxx-x";
urchinTracker();
</script>

Instead of copying and pasting that snippet in your page, you simple copy the UA-212xxxx-x code into the Google Analytics Module and you're good to go.
It gives you an option to locally catch the urchin.js file, but this isn't working well for me at the moment. Whenever this feature is turned on, Google Analytics does not detect the tracking code on my pages. I will have to look into this further.
Other than that, this module has been seamless. Love it, and would definitely recommend it to anyone looking for more in-depth statistics and analysis of their traffic patterns.
And once again, it's free Google products to the rescue!!!

Post new comment

The content of this field is kept private and will not be shown publicly.