Joomla Tutorials

Add Google Analytics to a Joomla Website

January 10, 2010 | Written by Rod Martin

In our beginner classes we recommend Google Analytics as a free and accurate way to count people visiting your site. Here's how to install it:

  • Step 1: Go to http://www.google.com/analytics and login. If you have any kind of Google account, you can use those same login details.
  • Step 2: Click “Add Website Profile” and you'll see a screen like this:

Add Google Analytics to a Joomla Website

  • Step 3: Enter your domain name and click "Finish".
  • Step 4: Take the code that Google will give you. Copy this code and paste it into a text editor.
  • Step 5: Login to the administrator area of your Joomla website.
  • Step 6: Go to Extensions >> Template Manager.
  • Step 7: Check the box next to your template and click "Edit" in the top-right corner.
  • Step 8: Click "Edit HTML" in the top-right corner.
  • Step 9: Scroll all the way to the bottom of the file until you find this at the very, very bottom:
    < /body >
  • Step 10: Go to your text editor, copy and paste the code directly ABOVE
    < /body >
  • Step 11: Click Save and you're done!
  • Step 12: Go back to http://www.google.com/analytics in subsequent weeks and check the number of people visiting your wonderful website!

 

Comments 

 
# BionicNellyWiz 2011-06-30 06:45
This is a fantastic tip!!! I had orginally put the tracking info in on the website but it obviously didn't get tracked but now it should be properly tracked!

Cool! :-)

Thank you ever so much.
Reply | Reply with quote | Quote
 
 
# iowawebco 2011-06-30 18:54
You're very welcome! :)

Kind regards,
Nick
Reply | Reply with quote | Quote
 
 
# John Sweet 2011-07-14 05:38
How can this be done for joomla 1.6
Reply | Reply with quote | Quote
 
 
# iowawebco 2011-07-14 13:05
Hi John,

It should be basically the same. Are you stuck on certain part?

Kind regards,
Nick
Reply | Reply with quote | Quote
 
 
# John Sweet 2011-07-14 13:17
Hi Nick,
thanks for your response
Yes I am stuck.
I have the Google script ad got as far as trying to put in into the beez_20 template.
When I add it from the template side all looks fine, but when saved and looked at from the front end in source code, it was not there.
I then added it as an HTML module and put in in the footer. Now I can see it but of course its not in the right place.
I am also have the same problem BTW with my Woopra analytics
www.repcillin.com
I would appreciate any help.
This is the first website I have made with joomla!1.6.3.
I have done several previously in Dreamweaver
Reply | Reply with quote | Quote
 
 
# iowawebco 2011-07-14 13:30
Hi John,

I see it in there now. It doesn't have to be in an exact place necessarily and any place will do.

Kind regards,
Nick
Reply | Reply with quote | Quote
 
 
# informer18 2011-07-15 11:52
might be there but it still does not get reported.
Any other ideas.
joomla 1.6.3
Reply | Reply with quote | Quote
 
 
# iowawebco 2011-07-15 11:54
Hi John,

Try going to Article Manager >> Options >> filter >> set super admin to have no filtering, then go to module manager and insert it as a custom html module again. This will ensure that no code is being stripped.

Kind regards,
Nick
Reply | Reply with quote | Quote
 
 
# Daniel Doherty 2011-10-10 09:32
Hi Nick,

Haven't used Joomla before but have added google analytics to lots of accounts. Got to step 9 but in my version does not end with Body? Any tips? Or just try to put it in before the end?

Thanks,


Daniel
Reply | Reply with quote | Quote
 
 
# iowawebco 2011-10-10 12:40
Hi Daniel,

That's strange that there's no ending body tag. Is there one higher up within the file? If so, just insert the code before it.

Kind regards,
Nick
Reply | Reply with quote | Quote
 

Add comment