Google Analtyics is a great tool you can use in conjunction with Joomla 2.5 to help track all of the traffic that your website receives. It is free to setup and use Google Analtyics, and this guide will walk you through the necessary installation steps. Because Google Analytics is an industry standard, there are many tutorial available online to help you with using this tool to monitor visits to your Joomla 2.5 website.
Create a Google Analytics account
If you haven't already, you will need to sign up for a Google Analtyics account. Visit this page and then click the Create an account link in the top right of the page.
Generate Tracking Code
Once you're logged into Google Analtyics, your next step is to setup your Joomla 2.5 website within the tool and get the tracking code. Here are the general steps (again, you must be logged in to Google Analytics first)
- Click Admin
in the top right menu
- Click the New Account
- Fill out all the details on the Create New Account
page and then click the Create Account
button at the bottom of the page
- You will then be on a page with several tabs at the top, and the current one selected is Tracking Code
. Find and copy into a text editor (for later use) the code under section 2. Paste this code on your site
. It will look similar to the following:
var _gaq = _gaq || ;
ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
var s = document.getElementsByTagName('script'); s.parentNode.insertBefore(ga, s);
Paste the code in your template
The instructions from Google say to paste the above tracking code right before the closing of your </head> tag. What you'll need to do is edit your Joomla 2.5 template
and add this code before the closing </head> tag. When testing these steps with the Beez_20 template, on the Template Manager: Cusomise Template
page we clicked the Edit main page template
link under Template Master Files
On this page, we can then add our tracking code. As you can see in the screenshot below, we added the tracking code right before the </head> tag:
Be sure to click Save
in the top right of the page to save the changes to your template.
Verify the tracking code has been added
When you go back to your Google Analytics account, back to the same page that gave you the tracking code, refresh the page. If the tracking code was installed successfully, next to Tracking Status you should see a Tracking Installed message.