Setting Up Google Analytics on Mambo
Get your Google Analytics Tracking Code
- Login and/or setup your Google Analytics account for your Mambo website.
var _gaq = _gaq || ;
ga.src = (‘https:’ == document.location.protocol ? ‘https://ssl’ : ‘https://www’) + ‘.google-analytics.com/ga.js’;
var s = document.getElementsByTagName(‘script’); s.parentNode.insertBefore(ga, s);
Edit the Template Index file
- Login to the Mambo Administration back end.
- Hover over the SITE menu item, then click on TEMPLATE MANAGER>Site Templates when the drop-down menu appears.
Click on the radial button for the template that you are using in your Mambo front end, then click on EDIT HTML in the top right hand corner. You will be editing the INDEX.PHP file of the template. You can verify this by looking at the file name immediately above the code edit window.
Find the “</head>” tag within the code, click in the edit window so that your cursor is blinking in front of this tag, then click on your enter key a few times to add an empty space in the code.
Retrieve the Google Analytics code from the first part of this tutorial. And paste it into the space you created. The code should be pasted BEFORE the “</head>” tag.
- Click on SAVE in the top right hand corner.