Regardless if you are creating a site for huge internet market wealth or simply as a hobby, you should be interested in where your viewers are coming from, and what they are doing on your website. Google analytics does just that, once installed on your site it will provide you with hughe amounts of data regarding the traffic visiting your site, from time spent on your site, to the type of internet browser they are using and the geographic location of the visitor, the list of information is huge - but the best thing of all it is free!
If you are new to joomla and have a working site and want to install google analytics this is the simplest way to add it.
First of all you need a google account, something like a gmail email will work - sign into google analytics at - http://www.google.com/analytics/
You will be presented with your control panel - located at the bottom left hand side of your screen you will see a link: Add Website Profile - Click on it.
You will be prompted for the following:
Choose website profile type: Select Add a profile for a new domain.
Please provide the URL of the site you would like to track: simply add in your website address ie www.yourdomain.com
Select your country and time zone and click continue.
You will now see your tracking code it should look something like this:
<script src="http://www.google-analytics.com/urchin.js" type="text/javascript">
</script>
<script type="text/javascript">
_uacct = "UA-#######-#";
urchinTracker();
</script>
The #'s would be where your tracking numbers are.
Click on the code and it will highlight it all in blue, right hand click your mouse and click on copy.
Your done for the time being with google analytics.
Log into the administrator backend of your Joomla website.
Goto site --> Template Manager --> Site Template
Select the radio button next to the template you are using for your site.
Click on Edit HTML at the top right hand of the screen.
You will now be presented with the html code for your template - if you are unfamiliar with this don't get scared!
Ok, now scroll to the bottom of the code, you should see two tags one after the other:
</body>
</html>
Directly before the </body> tag, place your cursor, right hand click and select paste.
Your code should now look something like this:
<script src="http://www.google-analytics.com/urchin.js" type="text/javascript">
</script>
<script type="text/javascript">
_uacct = "UA-#######-#";
urchinTracker();
</script>
</body>
</html>
Click save at the top right hand of your screen - if you are using more than one template you will need to repeat the process.
Log back into your Google Analytics and you see to the right hand side of your websites profile - Receiving Data!
That's it google analytics is now tracking your date - it usually takes around 24hrs for your results to appear!
After your first 24hrs log back in and click on View Reports and your first set of stats should be ready - make sure you get yourself comfortable you will be here for a while! :)