Adding Google Analytics To Joomla

Adding Google Analytics To Joomla can be a very frustrating thing…especially when the Joomla help files and the Joomla Help Forum give the WRONG ANSWERS!

I’ve been working on two Joomla sites lately; one of the first things I’ll do is add Google Analytics to a site if it doesn’t already have it installed. The two Joomla sites I’ve been working on have different files to add the Google Analytics code to. I think it mainly depends on the designer and how they name the files and where they put them…they should be in the templates directory in the root…which file though, is another story.

The first site had a file that sat in the templates directory and the other site had the file I needed in a sub-directory of the templates directory…pain in the arse trying to figure that stuff out…it’s not hard, just a waste of time!

The Joomla Help files and forums were telling me to go to (this taken from the Joomla Help Forum):
* Log on to: http://www.yoursite.com/administrator/
* In the top menu select: “Extensions” > “Template Manager”
* Now select the template which is marked as default and click "Edit"
* In the template edit page click "Edit HTML"

The only thing they got right is the first line! There is no "Template Manager", not that I could see anyway…on either site!! I knew the file in question had to be in the templates directory, so I started testing pages, by adding the code to the bottom, saving and purging and then refreshing the page in a browser and looking at the source code…that’s not the most efficient or safest way to do things, but when the company that makes the CMS you’re trying to add Google Analytics to, doesn’t even know their own product…what’s a boy to do!!??

I found the page by going to Components in the top nav =>> eXtplorer =>> templates =>> sub-directory =>> index.php
The sub-directory in that path was the name of the site.

If you’re working on a Joomla site, I suggest you get the name, number and email of the person who designed it…this might save you some time!

I’ve come to dis-like Joomla…it’s not very user friendly…I recommend Magento…it’s much more search engine friendly and you don’t have to save, then purge…Joomla makes it sound like your casting demons out of the site!!

So be patient, keep smiling and you’ll find what you’re looking for! Oh, by the way, one of the Joomla sites just recently switched over to Magento…yaaayy!!!

Share

0 comments

There are no comments yet...

Kick things off by filling out the form below.

You must log in to post a comment.