How to add Google Analytics a Joomla Website

As a Joomla developer, you can on the necessity of Google Analytics on a Joomla site to add, run, maybe you want your own Analytics monitor or have a client that you can add the Analytics code so they can send visitors track will. In any case, you must know how to add Google Analytics code to your Joomla site.

The most important part of the addition of Google Analytics code is finding where the code is so placed that it appear on every page of the site. This isrelatively easy, but it works you must understand how to that of the standard HTML template change in the administration area of your Joomla installation.

The first thing you need is an account with Google. This article assumes that you already use an account with them and know how to access the code to be added to your website. Once you logged into your account, you copy all your Google Analytics tracking code. Paste it into a text program and save for the futureReference.

Next, login to the administrator area of your website. Go to Extensions> Template Manager. Choose a standard template check box and then click Edit. Edit in the page template, click on "Edit HTML". This will show your presentation of the index.php page. Select all the text, copy it and then paste this text into a program that you save in a safe place should you do damage to the original document.

Now to go back to the original file, and scroll downthe side. The second was on balance the end body tag that looks like a forward slash immediately followed by the word "body". Add the code just before the end body tag. Click "Save."

Now you have the Google Analytics code on every page of your Joomla site placed. Remember that if you templates, you must add this code, with the same procedure, in your new template.

This entry was posted on Friday, July 16th, 2010 at 1:40 am and is filed under Joomla Code Articles. You can follow any responses to this entry through the RSS 2.0 feed. You can leave a response, or trackback from your own site.

Leave a Reply