There are two common methods for adding Google Analytics code to your Mambo site. Some people choose to add the code to a custom module, however it is just as quick to add the code directly to the template. Adding the analytics code directly into the template also provides a small performance advantage over using modules.
A Mambo template has the following basic structure:
All Mambo-specific code goes in between the HTML tags, eg, mosPathWay, mosMainBody, banners, modules etc.
When you sign up for a Google Analytics account, you will be given the tracking code to add to your template's index.php file. Copy and paste the code segment into the bottom of your template's index.php, immediately before the </body> tag.
So, looking at the structure outlined above, your Google Analytics code will be placed right before the closing body tag, eg:
| Note |
|
|
| |
The UA-xxxx-x needs to be replaced by your own account code
|
|
|
|