THIS is how to add Google Analytics Code to your Joomla Site
Moderator: General Support Moderators
-
- Joomla! Apprentice
- Posts: 41
- Joined: Mon Apr 13, 2009 12:33 pm
THIS is how to add Google Analytics Code to your Joomla Site
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
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
Reason: mod note: locked topic on request
- Ghonjez
- 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
Hi haynest...
Thanks for share this.
Very appreciated.
Thanks for share this.
Very appreciated.
-
- 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
really great information for google analytics code
thanks for sharing...
thanks for sharing...
-
- 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
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.
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.
- Ghonjez
- 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
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.
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.
- Kualaho
- 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
I perefer the manual method than using another extension. Thanks for the share.
-
- 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
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
-
- 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
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.
-
- 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
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.
-
- 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
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.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.
Bottom line: do it either way; whichever way you feel comfortable with is the way you should do it.
-
- 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
Thank you very much. I just implemented and it worked like a charm.
-
- 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
thanks the solution
-
- 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
great and simple tutorial without much confusing
- conanstevens
- 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
Worked nicely, was having trouble finding my way around 1.5 and this helped a lot.
Thanks
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)
http://www.CookingWithConan.com Video recipes for Athletes and Bodybuilders (joomla site)
-
- 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
Excellent!
Bruce C
Hot Web Ideas, inc.
Joomla Web Development / Search Engine Optimization / Social Media Marketing
http://www.hotwebideas.com
Hot Web Ideas, inc.
Joomla Web Development / Search Engine Optimization / Social Media Marketing
http://www.hotwebideas.com
-
- 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
Hey arlen,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
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
Hot Web Ideas, inc.
Joomla Web Development / Search Engine Optimization / Social Media Marketing
http://www.hotwebideas.com
- conanstevens
- 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
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.hotwebideas wrote:Hey arlen,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
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
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)
http://www.CookingWithConan.com Video recipes for Athletes and Bodybuilders (joomla site)
-
- 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
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
Hot Web Ideas, inc.
Joomla Web Development / Search Engine Optimization / Social Media Marketing
http://www.hotwebideas.com
-
- 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
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);
}
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
http://www.webmaxitsolutions.com
- Ghonjez
- Joomla! Exemplar
- Posts: 8770
- Joined: Sat Oct 18, 2008 3:02 am
- Location: Mars
- Contact:
-
- 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
really good post, specialy for me am new in joomla thankyou
-
- 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
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!
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.
-
- Joomla! Enthusiast
- Posts: 147
- Joined: Tue Feb 03, 2009 10:33 am
Re: THIS is how to add Google Analytics Code to your Joomla
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...
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...
-
- 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
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.
I'm not sure about speed issues but I would like to know the opinion of others well informed.
- zanvll
- 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
Added successfully. Thank you very much
But,can I add one of the other statistical code? This will affect the right SEO?
But,can I add one of the other statistical code? This will affect the right SEO?
My sites:http://www.welding-electrodes.net
- Ron S
- 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
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
-
- 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
Why using an extension if you can paste the code in the template and forget about it?
-
- Joomla! Apprentice
- Posts: 9
- Joined: Wed Aug 11, 2010 6:48 am
Re: THIS is how to add Google Analytics Code to your Joomla
I am using manual method and i will also prefer it, one ways thanks a lot for sharing such a precious information with us
- Lingo_
- 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
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
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
-
- Joomla! Apprentice
- Posts: 23
- Joined: Wed Jan 13, 2010 11:52 pm
Re: THIS is how to add Google Analytics Code to your Joomla
hei, it's really help me
many thanks
many thanks