THIS is how to add Google Analytics Code to your Joomla Site

Discuss Search Engine Optimization in relation to Joomla!. This forum will also have discussions on SEF/SEO Joomla! extensions.

Moderator: General Support Moderators

haynest
Joomla! Apprentice
Joomla! Apprentice
Posts: 41
Joined: Mon Apr 13, 2009 12:33 pm

THIS is how to add Google Analytics Code to your Joomla Site

Post by haynest » Sat May 23, 2009 3:12 am

I found this amazing website that confirmed my thoughts on adding Google Analytics code to your Joomla 1.5.x website. Here is a link to the web page, but I wanted to post it here in case the site ever goes down. http://www.goodwebpractices.com/joomla/ ... oomla.html

Create a Google Analytics Account (duh)

Go to the Google Analytics website and sign up for account.

Once you've followed the registration process you will come to a page where you are given a tracking code to add to each page of your website. If you are given the choice to choose between the new tracking code (ga.js) or the old tracking code (urchin.js) choose the new tracking code.

Keep this webpage open with the tracking code on as we're going to need it in a few minutes.

Add the Analytics tracking code to your Joomla template

Adding the analytics tracking code to your Joomla website is really easy. We're going to show you how to do this through logging in to the administrator backend and editing your template's HTML.

In Joomla 1.0.1x

If you are using Joomla 1.0.10, 1.0.11, 1.0.12, 1.0.13, 1.0.14 or 1.0.15 do the following:

* Log on to: http://www.yoursite.com/administrator/
* In the top menu select: "Site" > "Template Manager" > "Site Templates"
* Then select the template which is marked as default and click "Edit HTML"

In Joomla 1.5

If you are using Joomla 1.5, 1.51 do the following:

* 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"

Adding the code within the template

If you have followed the steps above you should now be looking at your template's HTML.

* Scroll right down to the bottom of all this code
* On the second to bottom line you should see the tag </body>
* You need to paste your Google Analytics tracking code just before this tag
* Now press "save" and Google Analytics is installed on your website!

Google Analytics in Joomla
Last edited by toivo on Thu Feb 22, 2018 1:27 pm, edited 1 time in total.
Reason: mod note: locked topic on request

User avatar
Ghonjez
Joomla! Exemplar
Joomla! Exemplar
Posts: 8770
Joined: Sat Oct 18, 2008 3:02 am
Location: Mars
Contact:

Re: THIS is how to add Google Analytics Code to your Joomla Site

Post by Ghonjez » Sun May 24, 2009 9:02 am

Hi haynest...

Thanks for share this.
Very appreciated.

:)

webrecsol
Joomla! Apprentice
Joomla! Apprentice
Posts: 44
Joined: Sat Jan 31, 2009 12:33 pm
Location: http://www.21centurysmoking.com
Contact:

Re: THIS is how to add Google Analytics Code to your Joomla Site

Post by webrecsol » Mon May 25, 2009 7:37 am

really great information for google analytics code

thanks for sharing...

haynest
Joomla! Apprentice
Joomla! Apprentice
Posts: 41
Joined: Mon Apr 13, 2009 12:33 pm

Re: THIS is how to add Google Analytics Code to your Joomla Site

Post by haynest » Tue May 26, 2009 12:10 am

No problem,

Please CONTINUE to post here if this helped you. Or, post here if it doesn't work, then we will all know something with Joomla or Google Analytics has changed. At that point i'll figure something out and post that too.

User avatar
Ghonjez
Joomla! Exemplar
Joomla! Exemplar
Posts: 8770
Joined: Sat Oct 18, 2008 3:02 am
Location: Mars
Contact:

Re: THIS is how to add Google Analytics Code to your Joomla Site

Post by Ghonjez » Tue May 26, 2009 6:44 am

Hi All...

Other way for add Google Analytic is use extensions :
http://extensions.joomla.org/extensions ... -analytics

and if you want to insert Google Analytic Chart to your site, visit this tutorial :
http://code.google.com........dataDeveloperGuide.html

Hope this helps. :)

User avatar
Kualaho
Joomla! Enthusiast
Joomla! Enthusiast
Posts: 140
Joined: Sat Apr 18, 2009 9:38 pm
Location: UK
Contact:

Re: THIS is how to add Google Analytics Code to your Joomla Site

Post by Kualaho » Wed May 27, 2009 11:28 pm

I perefer the manual method than using another extension. Thanks for the share.

arlen
Joomla! Enthusiast
Joomla! Enthusiast
Posts: 215
Joined: Fri Dec 08, 2006 7:01 pm

Re: THIS is how to add Google Analytics Code to your Joomla Site

Post by arlen » Thu May 28, 2009 4:15 am

Just a quick addendum: If you have TinyMCE turned on as editor, turn it off before doing this. Tiny can do bad things to script tags

smidgen
Joomla! Fledgling
Joomla! Fledgling
Posts: 3
Joined: Sat Oct 18, 2008 12:57 pm

Re: THIS is how to add Google Analytics Code to your Joomla Site

Post by smidgen » Thu May 28, 2009 10:16 am

What about putting the code in a custom module and adding it to the bottom of your site? I did that and I am getting results. This seems easier than modifying templates.

haynest
Joomla! Apprentice
Joomla! Apprentice
Posts: 41
Joined: Mon Apr 13, 2009 12:33 pm

Re: THIS is how to add Google Analytics Code to your Joomla Site

Post by haynest » Thu May 28, 2009 11:41 am

That might also work well. I posted this method because this is how Google recommends to do it, and I was having a hard time finding a SOLID method that works in the forums. This method is SOLID.

arlen
Joomla! Enthusiast
Joomla! Enthusiast
Posts: 215
Joined: Fri Dec 08, 2006 7:01 pm

Re: THIS is how to add Google Analytics Code to your Joomla Site

Post by arlen » Thu May 28, 2009 1:33 pm

smidgen wrote:What about putting the code in a custom module and adding it to the bottom of your site? I did that and I am getting results. This seems easier than modifying templates.
Code is code. Pasting Google's code into the template editor or the module editor is the same operation. The risk of one is that if you ever lose the original template and have to reinstall you have to edit again. But the same risk goes for the custom module.

Bottom line: do it either way; whichever way you feel comfortable with is the way you should do it.

shelleyiocona
Joomla! Fledgling
Joomla! Fledgling
Posts: 3
Joined: Fri Apr 03, 2009 6:51 pm

Re: THIS is how to add Google Analytics Code to your Joomla Site

Post by shelleyiocona » Mon Jun 01, 2009 11:20 pm

Thank you very much. I just implemented and it worked like a charm.

ishtiyak
Joomla! Apprentice
Joomla! Apprentice
Posts: 6
Joined: Sat May 23, 2009 7:08 am

Re: THIS is how to add Google Analytics Code to your Joomla Site

Post by ishtiyak » Wed Jun 03, 2009 2:49 am

thanks the solution

shaileshj
Joomla! Apprentice
Joomla! Apprentice
Posts: 11
Joined: Thu May 14, 2009 8:02 am

Re: THIS is how to add Google Analytics Code to your Joomla Site

Post by shaileshj » Thu Jun 04, 2009 5:42 am

great and simple tutorial without much confusing

User avatar
conanstevens
Joomla! Apprentice
Joomla! Apprentice
Posts: 6
Joined: Tue Sep 29, 2009 3:43 pm

Re: THIS is how to add Google Analytics Code to your Joomla Site

Post by conanstevens » Tue Oct 20, 2009 11:15 am

Worked nicely, was having trouble finding my way around 1.5 and this helped a lot.

Thanks
http://www.ConanStevens.com - How I went from nothing to movie star in 5 years (Joomla site)

http://www.CookingWithConan.com Video recipes for Athletes and Bodybuilders (joomla site)

hotwebideas
Joomla! Intern
Joomla! Intern
Posts: 66
Joined: Tue Jul 07, 2009 1:07 pm

Re: THIS is how to add Google Analytics Code to your Joomla Site

Post by hotwebideas » Wed Oct 21, 2009 1:34 am

Excellent!
Bruce C
Hot Web Ideas, inc.
Joomla Web Development / Search Engine Optimization / Social Media Marketing
http://www.hotwebideas.com

hotwebideas
Joomla! Intern
Joomla! Intern
Posts: 66
Joined: Tue Jul 07, 2009 1:07 pm

Re: THIS is how to add Google Analytics Code to your Joomla Site

Post by hotwebideas » Wed Oct 21, 2009 1:38 am

arlen wrote:Just a quick addendum: If you have TinyMCE turned on as editor, turn it off before doing this. Tiny can do bad things to script tags
Hey arlen,
Actually, that is not entirely true. TinyMCE comes with the Joomla installation with a setting called "Code cleanup on save" which is set to Always. Why they set it up like this, I have no idea.

You can actually turn this off by going into the Plugins Manager and clicking on the Tiny MCE plugin. Then, under "Code cleanup on save" set it to Never and TinyMCE will never touch your code.

I hope this changes the perspective a little ;)
Bruce C
Hot Web Ideas, inc.
Joomla Web Development / Search Engine Optimization / Social Media Marketing
http://www.hotwebideas.com

User avatar
conanstevens
Joomla! Apprentice
Joomla! Apprentice
Posts: 6
Joined: Tue Sep 29, 2009 3:43 pm

Re: THIS is how to add Google Analytics Code to your Joomla Site

Post by conanstevens » Wed Oct 21, 2009 4:54 am

hotwebideas wrote:
arlen wrote:Just a quick addendum: If you have TinyMCE turned on as editor, turn it off before doing this. Tiny can do bad things to script tags
Hey arlen,
Actually, that is not entirely true. TinyMCE comes with the Joomla installation with a setting called "Code cleanup on save" which is set to Always. Why they set it up like this, I have no idea.

You can actually turn this off by going into the Plugins Manager and clicking on the Tiny MCE plugin. Then, under "Code cleanup on save" set it to Never and TinyMCE will never touch your code.

I hope this changes the perspective a little ;)
Completely off topic but the best tip I have had for a long time, saves me going to no-wsiwig editing everytime I embed a video or some such.

THANKS :D
http://www.ConanStevens.com - How I went from nothing to movie star in 5 years (Joomla site)

http://www.CookingWithConan.com Video recipes for Athletes and Bodybuilders (joomla site)

hotwebideas
Joomla! Intern
Joomla! Intern
Posts: 66
Joined: Tue Jul 07, 2009 1:07 pm

Re: THIS is how to add Google Analytics Code to your Joomla Site

Post by hotwebideas » Sun Oct 25, 2009 1:36 am

You're welcome. Yeah, the TinyMCE info was off topic from the original Google Analytics question. That always happens with popular threads.
Bruce C
Hot Web Ideas, inc.
Joomla Web Development / Search Engine Optimization / Social Media Marketing
http://www.hotwebideas.com

topazsword
Joomla! Apprentice
Joomla! Apprentice
Posts: 21
Joined: Mon Jul 28, 2008 4:43 am
Location: Philippines
Contact:

Re: THIS is how to add Google Analytics Code to your Joomla Site

Post by topazsword » Mon Jan 18, 2010 6:35 am

i am having problem in 1.5? i didn't see any </body>

Below shows what i've got
}
//End for main navigation

$layout = $tmplTools->getLayout ();
if ($layout) {
$tmplTools->display ($layout);
}
"Everything you want in life is just outside your Comfort Zone. All success is found in your Courage Zone."

http://www.webmaxitsolutions.com

User avatar
Ghonjez
Joomla! Exemplar
Joomla! Exemplar
Posts: 8770
Joined: Sat Oct 18, 2008 3:02 am
Location: Mars
Contact:

Re: THIS is how to add Google Analytics Code to your Joomla Site

Post by Ghonjez » Tue Jan 19, 2010 8:18 am

Hi...

Try this tutorial >>> http://www.goodwebpractices.com/joomla/ ... oomla.html

hope helps ;)

Pakiisp
Joomla! Apprentice
Joomla! Apprentice
Posts: 14
Joined: Mon Feb 01, 2010 12:02 pm
Contact:

Re: THIS is how to add Google Analytics Code to your Joomla Site

Post by Pakiisp » Mon Apr 19, 2010 8:28 pm

really good post, specialy for me am new in joomla thankyou

amedida
Joomla! Apprentice
Joomla! Apprentice
Posts: 38
Joined: Thu Mar 18, 2010 3:45 pm
Location: Portugal

Re: THIS is how to add Google Analytics Code to your Joomla

Post by amedida » Mon Aug 09, 2010 11:23 pm

This one is solved.

Hi all.
I can not edit html on purity II template through the template manager.
What should I do to insert analytics code on the template?
Thanks!
Last edited by amedida on Tue Aug 10, 2010 9:16 am, edited 1 time in total.

corydos
Joomla! Enthusiast
Joomla! Enthusiast
Posts: 147
Joined: Tue Feb 03, 2009 10:33 am

Re: THIS is how to add Google Analytics Code to your Joomla

Post by corydos » Tue Aug 10, 2010 1:13 am

I guess somethings have changed with Google analytics.

Just yesterday after making a new GA account, it seems that you don't place the code before the body tag anymore... now its right before the </head> tag.

Anybody also getting this? I wonder if this will slow down your site because it's having the js on top instead of the bottom...

amedida
Joomla! Apprentice
Joomla! Apprentice
Posts: 38
Joined: Thu Mar 18, 2010 3:45 pm
Location: Portugal

Re: THIS is how to add Google Analytics Code to your Joomla

Post by amedida » Tue Aug 10, 2010 9:18 am

Yes, now GA tracker is placed before the /head tag.
I'm not sure about speed issues but I would like to know the opinion of others well informed.

User avatar
zanvll
Joomla! Apprentice
Joomla! Apprentice
Posts: 13
Joined: Sun Aug 01, 2010 6:24 am
Contact:

Re: THIS is how to add Google Analytics Code to your Joomla

Post by zanvll » Tue Aug 10, 2010 2:39 pm

Added successfully. Thank you very much

But,can I add one of the other statistical code? This will affect the right SEO?

User avatar
Ron S
Joomla! Enthusiast
Joomla! Enthusiast
Posts: 171
Joined: Sun Aug 08, 2010 2:54 pm
Contact:

Re: THIS is how to add Google Analytics Code to your Joomla

Post by Ron S » Wed Aug 11, 2010 12:24 am

Use J!Analytics - it is a Joomla 1.5 only module which inserts Google Analytics code into your web site pages. Available at http://extensions.joomla.org/extensions ... ytics/4300
DoBizOn9 - Consolidated Online Business Startup Guide: Online Business Ideas | Online Business Opportunity | Online Jobs . Include JOOMLA GUIDE at http://www.dobizon9.com/webdesigning/cms/joomla.html

amedida
Joomla! Apprentice
Joomla! Apprentice
Posts: 38
Joined: Thu Mar 18, 2010 3:45 pm
Location: Portugal

Re: THIS is how to add Google Analytics Code to your Joomla

Post by amedida » Wed Aug 11, 2010 9:17 am

Why using an extension if you can paste the code in the template and forget about it?

kevinmarton
Joomla! Apprentice
Joomla! Apprentice
Posts: 9
Joined: Wed Aug 11, 2010 6:48 am

Re: THIS is how to add Google Analytics Code to your Joomla

Post by kevinmarton » Thu Aug 12, 2010 4:57 am

I am using manual method and i will also prefer it, one ways thanks a lot for sharing such a precious information with us

User avatar
Lingo_
Joomla! Fledgling
Joomla! Fledgling
Posts: 3
Joined: Wed Mar 10, 2010 10:54 pm
Contact:

Re: THIS is how to add Google Analytics Code to your Joomla

Post by Lingo_ » Fri Aug 13, 2010 9:51 pm

Well, now I've followed the very easy instructions (Thank's a lot!) and we'll se. Pasting just before the </Head>-tag though, just as mentioned above.
I don't know if there is an easy way to determine the speed issue, but I guess there is a lot of dependencies to that. Again - Thank you very much for a straigthforward post :)
Trådlösa, godkända villalarm >>> http://larmat.se

weelee02
Joomla! Apprentice
Joomla! Apprentice
Posts: 23
Joined: Wed Jan 13, 2010 11:52 pm

Re: THIS is how to add Google Analytics Code to your Joomla

Post by weelee02 » Tue Aug 17, 2010 5:09 am

hei, it's really help me
many thanks


Locked

Return to “Search Engine Optimization (Joomla! SEO) in Joomla! 1.5”