|
By adding Google Analytics Code to your template, you'll be able to track your site visitors. Google Analytics can even provide a lot more useful information about your visitors. You can read all about it on their site. In order to add Google Analytics to your site, you'll have to register, and you'll be given a piece of code which you have to place in each of your pages (html code) you want to track. Since a Joomla template consists of only one actual page, the process is quite simple. |
![]() |
There are quite a few thrid party modules and plugins available which add the code to your template, but this will explain how to add it in the page itself. Make sure you have the Analytics code near you:
- In Joomla back-end, select Extensions -> Template Manager
- You'll get an overview of all installed templates.
- Click on the template in use where you want to add the code.
- On the settings page of the template, you'll see some buttons in the top right corner.
- Click on the Edit HTML button.
- You'll get to see the code of the index page. Scroll all the way down in this page.
- At the very end of this page, you'll see a closing body and html tag
- Paste the Google Analytics code just above the closing body tag, and hit the 'Save' button.
Attention: it's possible that you won't be able to save the modifications in your Joomla back-end due to security reasons. Then you'll probably have to make the index.php of your template file writable.
To do this, you'll need access to your webserver (/your-joomla-install/templates/your-template/index.php). Another option would be to download the index file of your template with FTP to your hard drive, and add the Google Analytics code from your PC, and reupload the file when you're done.





