"Helping businesses operate more effectively online"

11

Mar

2008

How to add Google Analytics to Joomla
Written by David Towers   

Joomla Google Analytics Today we're going to answer a very straight forward question that we have been asked: "How can I add Google Analytics to Joomla?"

Google Analytics is a free website tracking tool which helps you understand your website's visitor. We highly recommend it, and in this post will run you through how to add Google Analytics to either Joomla 1.5 or Joomla 1.0.1x.

We have broken down the answer of this question into two steps:

1. Create a Google Analytics account
2. Add the Analytics code to your Joomla template

Create a Google Analytics account

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: 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: 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!

Here is a screenshot of the HTML of a template before we added the Google Analytics code:

Joomla HTML template

And here is the HTML after we added Google Analytics code:

Google Analytics in Joomla

Now you've installed Google Analytics, why not track file downloads automatically using our Google Analytics download tracking Javascript?

We look forward to answering your questions and reading your comments...

Comments (230)Add Comment
0
Rajesh
March 19, 2008
122.164.189.245
Votes: +25
...

Hi Nice article.

David Towers
David Towers
March 19, 2008
205.167.7.18
Votes: +6
...

Thanks Rajesh!

0
raman
March 26, 2008
59.92.113.174
Votes: +7
...

Very simple and effective content about joomla. Will be very useful for budding web masters. Thanks

0
Prinson
March 30, 2008
220.226.19.52
Votes: +2
...

Thanks for your help. I appreciate it very much

0
Greg
April 08, 2008
98.17.185.33
Votes: +3
...

Thank you very much! I originally downloaded a module that supposedly made this process easy. It didn't make it easy, because there was a lack of documentation, and it only supported the legacy mode of Google Analytics.

In contrast, your post was a simple solution. Thanks again!

0
Javier Giron
April 15, 2008
190.57.61.228
Votes: +1
...

i added the code exactly as you said, but it still didnt work.
GA doesnt recognize that the code has been added.
Please advice me what to do.

Thanks!

0
Tamara
April 16, 2008
70.7.76.80
Votes: +2
...

Hi, It takes a day for GA to track info. Try checking tomorrow for your stats

0
Rob
April 17, 2008
202.12.233.21
Votes: +8
...

The next problem, once Analytics was collecting data, was that all of the page names show up in the reports as:
"index.php?option=com_content&view=article&id=126&Itemid=87..."

Hovering over the names in the reports will add the article ID but good luck working out which page that is off the top of your head! smilies/smiley.gif

Is there a way to make Joomla or Google use the Article name or something more friendly in the report?

David Towers
David Towers
April 17, 2008
87.90.44.16
Votes: +0
...

Thanks for posting Raman, Prinson Greg, Javier, Tamara and Rob!

Javier have your stats appeared yet? Tamara's right, there is usually a lag of about a day.

Rob if you use sh404sef to make your URLs search engine friendly, you won't have this problems anymore. Why not try installing the sh404sef extension on your website?

0
nitin
June 14, 2008
122.163.209.47
Votes: +0
...

thanks the article rocks

0
Rakesh
July 04, 2008
124.125.11.100
Votes: +1
...

Thanks David T,

For Starting such a nice post on Google Analytics, I also installed GA and waiting for a day as said visitors above to detect code by GA.

0
aa
July 23, 2008
78.98.173.255
Votes: +1
...

thank you, great article, very helpfull smilies/wink.gif

0
ja
July 25, 2008
92.36.240.183
Votes: +1
...

Ovo ti je dobar članak lafe. Hvala.
This is good article pal.
Das ist sehr gut Information Kamarad.

0
sandeep
August 03, 2008
123.237.67.228
Votes: +1
...

Thanks.
Its worked perfect on my site.

http://gsmunlock.in

0
Jenny
August 05, 2008
66.91.144.98
Votes: +0
...

Thank you. This is a great article. It helps to all who is new in joomla.

0
Peter
August 13, 2008
66.106.254.202
Votes: +0
...

Thanks. However, the index.php file I have does not have a tag. Not sure where should I insert the GA code if there's no tag.

0
Peter
August 13, 2008
66.106.254.202
Votes: +0
...

I meant to write "/body" tag.

0
Steogede
August 14, 2008
82.163.165.185
Votes: -1
...

I would say it is better to add the GA code directly after the opening body tag, rather than directly before the closing body tag. I know Google say to place the code before the closing body tag, but they don't mean directly before.

The Google help article on tracking links to external sites states that you need to place a call to GA in the onclick attribute. In order for this to work, they say that you must place the GA code before the relevant link - infact they go so far as to say you should put the code between the opening body tag and the a tag which you want to track manually.

0
Sam
August 23, 2008
81.197.69.201
Votes: +0
...

I tried to edit the html file but it was empty. However, I have also index.php file which might cause this. Do you know why I cannot the main index files as you advised?

0
Zohaib Mir
September 03, 2008
203.99.176.179
Votes: +1
...

A good and simple article

0
rod
September 13, 2008
203.155.76.141
Votes: +2
...

Very Thank smilies/grin.gif

0
Marosh
September 22, 2008
193.120.161.6
Votes: +0
...

Hi Guys, nice and simple article.

0
Al
September 24, 2008
210.56.102.239
Votes: +0
...

Since Google Analytics requires the code to be placed on all the website pages. Is it enough to just put the code on the template?
Is there a solution like a plugin that transfers the code in case I change the template?

Jason Boyette
Jason Boyette
September 24, 2008
199.178.199.254
Votes: +1
...

@Al: No, you would need to add it to any template you use. The good thing is that it's only needed in the template, and not EVERY page.

0
Rob
October 07, 2008
77.61.76.186
Votes: +0
...

Is it that easy? Thanks!

0
John
October 08, 2008
58.8.238.238
Votes: +0
...

Thanks,saved me from having to download a module/plugin for my website. smilies/grin.gif

0
Jim
November 02, 2008
98.235.172.175
Votes: +0
...

Thanks, So much it worked perfectly, google is already tracking and it took about on minute, an I'm a new joomla user

Cheers,
Jim Novak

0
matyus
November 26, 2008
219.93.152.130
Votes: +0
...

thanks a lot!!
simple but perfect!! smilies/cheesy.gif

David Towers
David Towers
November 28, 2008
193.23.120.250
Votes: +0
...

Glad you guys have found it useful!

0
Alfred
November 29, 2008
98.242.148.52
Votes: +0
...

Very helpful. Nice.

0
Alex Rainy
December 01, 2008
92.112.61.231
Votes: +0
...

Tnx a lot!

0
Pantera
December 12, 2008
189.13.204.202
Votes: +3
...

Hi, I did add the code, what I want know is to DISPLAY some of the statistics in the frontpage of my joomla site, also I would like to include a LINK to the complete statistics page.

thanks!

0
rodrigo
December 21, 2008
187.26.133.190
Votes: +1
...

Muito grato pela dica, vou adicionar ao meu site

thanks

0
jemma
December 30, 2008
59.180.45.34
Votes: +1
...

Very simple and effective.

Exactly what i needed. Thanks a lot.

0
christak
January 07, 2009
150.140.3.228
Votes: +0
...

Thank you a lot.
It seems nice.

christak

0
jack
January 14, 2009
170.223.251.43
Votes: +1
...

Thanks a lot for the tutorial it was very helpful.....

0
Wendy
January 23, 2009
70.149.233.38
Votes: +1
...

I have only very recently started to work with Joomla and have found it very confusing. I am slowly suppose to take over a site someone design with Joomla. I am trying to add the analytic codes but your instructions do not match what my menu has. I checked and I am using Joomla Version 1.5.7 Production/stable [Wovusani]. Can you give me any assistance with putting these codes on my site?
Thank you in advance for any and all help.

0
USN
February 08, 2009
66.189.169.16
Votes: +2
...

Great article! Very simple to follow!

0
David
February 10, 2009
90.202.127.77
Votes: +1
...

Nice artlice, Thanks

0
Christopher
February 13, 2009
69.4.49.190
Votes: +1
...

Excellent! Thank you. Took me < 5 minutes.

0
xboxguy
March 09, 2009
76.227.232.12
Votes: +0
...

Thanks for the article. I was going to do just this, but I wanted some confirmation that I had the right idea before possibly crashing my site. Thanks for that confirmation.

0
Billy Bisco
March 09, 2009
76.117.117.206
Votes: +0
...

Thanks for the help

0
Aniket
March 18, 2009
219.64.195.232
Votes: +0
...

Thanks a lot for your help. Just took me less than 5 mins to do a this ....
My client is now very satisfied

0
Walter
March 21, 2009
201.0.99.88
Votes: +0
...

Simple the best! Thanks

0
fuzzywig
March 28, 2009
86.174.152.28
Votes: +0
...

Great article help me out loads thanks

0
Joe
April 02, 2009
65.111.94.38
Votes: +0
...

Excellent article. I've been getting advice on how to add Analytics to Joomla and it hasn't worked, until now. Other persons I've talked with stated I should install a new module and then input the necessary data, which doesn't work. I wasted many hours trying to do it the other way and less than 5 minutes your way.

Thanks,
Joe

0
Blazej
April 03, 2009
89.76.117.81
Votes: +0
...

Thanks! That's really clear and helpful.

0
dave
April 15, 2009
207.172.196.194
Votes: +0
...

thanks! once I read this I was like; duh! I should've known that.

0
vince
April 16, 2009
167.107.191.217
Votes: +0
...

Better than using a module for this. Like the above poster said, "duh! I should've known that". :-)

Thanks

0
derdave
April 17, 2009
138.232.228.14
Votes: +1
...

thx, worked well for me! greetings, der dave

0
Nel
April 22, 2009
190.4.139.156
Votes: +0
...

coo As Easy as posibel

0
Earn Money Writing
April 22, 2009
24.11.64.149
Votes: +1
...

Thanks for the article.

I will test it out and hopefully it works.

0
Conken
April 23, 2009
81.149.118.207
Votes: +0
...

Champion effort Sir.

Thank you.

0
Ashley
April 28, 2009
122.163.46.51
Votes: +0
...

Thanks Man For this wonderful Article Its working Great....
God Bless you

0
Howard
April 28, 2009
212.31.116.217
Votes: +0
...

Thank you!

0
Keith
April 28, 2009
99.249.29.125
Votes: +0
...

Sometime its great to go in the old fashioned way under the hood without a plugin and mae things happen.

Today, thanks to you, it was the easiest task of my day.

Thanks muchly.

0
name
April 29, 2009
194.204.116.50
Votes: +0
...

Excellent thankyou so much --- this is what is good about the net

0
Allyson
May 01, 2009
173.33.229.68
Votes: +0
...

Ditto!
Previously I tried using a module, but why bother? This is so easy.

0
gilles
May 08, 2009
99.233.216.39
Votes: +0
...

Perfect!

wonderful/clear instructions!

Thanks so much!

0
Joan
May 13, 2009
212.187.58.147
Votes: +0
...

Nice and clear. Great article!!!
Thanks

0
synoptik
May 15, 2009
90.179.207.62
Votes: +0
...

hi, i just don't understand s/thing. the google tutorial says that i should see the tracking code in a web browser (developer -> html code). i've inserted the code in the template in the way described above but i don't see it there. so i'll wait till the next morning and see if it works.

in other hand the article is written very clearly so even a beginner can follow. thank you.

0
G. Tsolakis
May 27, 2009
79.166.45.230
Votes: +0
...

thank you so much

0
Andy
May 29, 2009
68.200.243.86
Votes: +0
...

For some reason "Template Manager" does not show up under my Extensions menu. I only have "Install/Uninstall", "Module Manager", and "Plugin Manager". Do you know why this isn't showing up or how I can get around it to ad Google Analytics. I'm using version 1.5.3 of Joomla.

0
softlogic
May 29, 2009
122.164.96.80
Votes: +0
...

thanks for a clear article

0
Andy
May 29, 2009
68.200.243.86
Votes: +0
...

I figured out why my "Template Manager" was not showing up. I was not logged in as a Super Administrator, only as an Administrator. I had someone else create the site originally and he did not convey the Super Admin login info to me.

0
schnell abnehmen
June 03, 2009
78.141.137.49
Votes: +0
...

It worked with me. I used to add the Analytics script to the index.php when using Joomla 1.x. For some reason, it didn´t work this way in Joomla 1.5 so I went for your solution.
Tx.

0
Martin
June 04, 2009
82.17.165.109
Votes: +0
...

Excellent article which made adding Google Analytics dead simple, there should be a link to this from Google Analytics.
Very much appreciated.

0
San Francisco
July 07, 2009
71.198.129.190
Votes: +0
...

Any updates or advice on conversion tracking for an e-commerce store using VirtueMart/Joomla? Is there a way to have a 'thank you' page generate after each sales process is confirmed? Trying to figure out how to determine what URL to use to monitors goals.

Thanks.

0
yuk
July 17, 2009
202.176.84.31
Votes: +0
...

thank you very much

0
Jeff
July 17, 2009
207.242.9.2
Votes: +0
...

Awesome writeup - had the Google Analyitics code on my site in just a couple of minutes. Like others, I was just about to download a plugin, this is WAY easier.

Now to wait for the stats to be 'posted' on Google. ;-)

Thanks again!

Jeff

0
Auto Man
July 22, 2009
196.213.171.162
Votes: +0
...

I thought that you are going to mention a plugin to do the work for us, but this is even better! Thanks!

0
siegfried
July 23, 2009
99.241.79.29
Votes: +0
...

Awesome. Just what I needed.

Thanks

0
Dennis van Leeuwen
August 09, 2009
82.95.145.44
Votes: +0
...

Will adding my GA code to the template be enough for tracking virtuemart (which is installed) information also? Or do I need to ad the code to the Virtuemart component also?

0
John
August 12, 2009
72.2.207.234
Votes: +0
...

I think I must be missing something. I followed the steps and everything seems to work. However, the content tracking in Google Analytics shows the visited content in the following format.

/public/index.php?option=com_content&view=section&layout=blog&id=1&Itemid=3

Being new to Joomla, I am not sure how to map this to my website. I assume the "id" is the id of the section. Is the "Itemid' the id of the article?

It would be great if there was a way to have the content via the section or category alias rather than the id.

Thanks

0
iain
September 01, 2009
86.154.101.127
Votes: +0
...

Thanks for the tutorial.

I couldn't add the code through the template manager... kept saying that the php file couldn't be opened for editing.

Instead, I accessed the php file through ftp and edited it in wordpad...

0
Tony
September 04, 2009
210.1.217.206
Votes: +0
...

Thank you for this article - you saved my site! Placing this script before the body, is fatal. Your tip works A1.

0
Accounting Teacher
September 11, 2009
119.152.75.184
Votes: +0
...

It is extremely easy, I was planning to incorporate an extension, but it can be done without it. And You showed it how.

0
Miguel Garcia
September 18, 2009
93.102.69.189
Votes: +0
...

Hi...

Simply excellent. Superb...

Any way I need to repost Dennis van Leeuwen Question:

Will adding my GA code to the template be enough for tracking virtuemart (which is installed) information also? Or do I need to ad the code to the Virtuemart component also?

Lots of Thanks David Towers

Great article...

0
TimM
September 21, 2009
86.10.80.140
Votes: +0
...

I have added the code as described and have an icon on the GA panel indicating that the web site is not being tracked. Does this mean that the process has not worked or does this mean that the process worked and GA has not yet updated? I have tried to save and refresh but it makes no difference.

Grateful of any advice

0
Academic Blog
September 23, 2009
132.241.78.61
Votes: +0
...

Hey, thanks for the help!! I just added analytics to my joomla template.

0
justin
September 26, 2009
59.57.185.198
Votes: +0
...

Same doubt as someone else above,is it enough to just paste the tracking code by edit the template page?as GA requires the codes on every page.

0
Angie
October 20, 2009
69.54.29.6
Votes: +0
...

Nice tutoril, appreciate it. But would like to know how to track information in VirtueMart. Any input would be appreciated.

0
Nikki
October 24, 2009
124.168.199.124
Votes: +0
...

Fantastic, couldn't have is explained it more clearly, great job smilies/smiley.gif

0
DrMistry
November 10, 2009
81.141.147.4
Votes: +1
...

Good job - short, sweet and accurate. Thanks for posting.

0
July
November 12, 2009
195.140.180.233
Votes: +0
...

Thank you!
I searched about Google Analistic+Joomla 1.0 - and your topic answer, how i can do this!

0
pojisteni
November 28, 2009
94.112.121.171
Votes: +0
...

Hi, is it possible to have GA only at one main site and meassure accesses from another subdomains? Or is it necessary to have unique GA on each subdomain?

0
Miguel J. Parias
December 01, 2009
87.218.88.138
Votes: +1
...

Hi all,

I have joomla 1.5.15. When I go to edit HTML, the file is "empty". I read somebody used other technic to edit the index.php file. Can somebody tell me how to do it? Thanks in advance,

MP

0
C
December 02, 2009
188.4.242.245
Votes: +0
...

is not working in my site.

what am i missing ?

0
Julia
December 12, 2009
203.173.162.243
Votes: +1
...

Same here my file is empty....any suggestions?

0
dawn
December 13, 2009
68.38.202.215
Votes: +0
...

Thanks - great article.

0
Jericho
December 18, 2009
24.67.83.182
Votes: +0
...

Not working with my site either (1.5.15). When I add the code, the pages of my site don't want to display. All i get are empty white pages.

0
Jason
January 09, 2010
66.82.9.54
Votes: +0
...

using Joomla 1.5.15 and Rhu-Milkyway template..I added the analytics code immediately before the /body tag, and it shows up on every page if you viewsource. No problems with page loading. I will wait a day and look for data, but this isn't my first time using analytics so I am sure it will work.

0
Jason
January 09, 2010
66.82.9.55
Votes: +0
...

As an update to the above...in Google Analytics, sometimes it takes a while for the little yellow yield triangle status symbol to go away. You can manually force google to look for the code by clicking on "edit" at the end of the row. Then on the new page, at the upper right hand corner of the table is a small link that says "check status". Click "check status" and the new page should tell you immediately if the code is installed correctly.

0
Web Design Kent
January 15, 2010
86.137.144.33
Votes: +0
...

Great info. Just what I need to convert my static site to Joomla and keep my tracking stats.

0
Devin
January 17, 2010
116.7.59.253
Votes: +0
...

amazing, your article is very helpful. Thanks.

0
MikeT
January 22, 2010
71.64.118.219
Votes: +1
...

Awesome! Thank you!

0
Specusphere
January 28, 2010
58.111.143.46
Votes: +0
...

Beautiful, thanks for the help! Really appreciate it. Those were very clear and relevant instructions.

0
Han Timmer
February 17, 2010
80.101.123.28
Votes: +0
...

Thanx this was usefull information it works

0
Aty
February 19, 2010
122.173.126.201
Votes: +1
...

But this only helps us to track the home page... not all pages of the website... Correct me if I am wrong.

0
Stevan
February 23, 2010
82.95.64.218
Votes: +1
...

Hi Guys,

Thanks for the input and support.
I want to know if you have a Joomla site with multiple templates (yes all active), do you have to put the code in every template?

I'm not talking about changing templates.
I'm using 3 differtent templates for one site now (photographer) at the same time.

Thanks for any input on this.

0
corkhound
February 25, 2010
86.30.183.90
Votes: +1
...

Superb article - the clearest thing that I have read in months. Well done!

0
jazzer707
February 25, 2010
74.225.4.196
Votes: +0
...

Thank you! Easy and straight forward...my site is ready now!

0
Simon Barrell
February 25, 2010
68.192.17.154
Votes: +0
...

Excellent job David! In 2 minutes this solved a problem I have been wrestling with for weeks. I checked the source code on various pages to verify this works. Thank you!

0
Sue Rivers
March 01, 2010
82.15.136.19
Votes: +0
...

Great. Google says do this to every page you want to track. Can I assume that putting the code on the template in effect puts it on every page? Sorry if an obvious question! Many thanks.

0
Sue Rivers
March 01, 2010
82.15.136.19
Votes: +0
...

Ignore previous! Have viewed source and I can see the html I added on all pages. Thanks so much for such a straight-forward answer!

0
Thomas Dobner-Dobenau
March 17, 2010
85.127.232.147
Votes: +0
...

Thank you for the good and short description for Google Analytics!
Thomas

0
priyadharshan
March 18, 2010
203.153.222.16
Votes: +1
...

Thank you for this really easy, and simple guide...no modules or what ever...

thank you again for sharing this

0
Ray
April 04, 2010
70.127.103.179
Votes: +0
...

Thanks for the info. Much easier to use than some of the other analytics that are plug ins.

The gift that keeps on giving. Good INFO.

0
Dany
April 08, 2010
88.3.150.253
Votes: +0
...

Hi! When editting php file there is no /body tag.
only php programming. where shold i insert the code?

thx in advance
Dany

0
Peter Bui
April 19, 2010
115.64.25.115
Votes: +0
...

I created this Joomla plugin that loads the Google Analytics code asynchronously. Faster loading Joomla site and Google code:

http://www.pbwebdev.com.au/blog/asynchronous-goolge-analytics-plugin-for-joomla.html

0
Bobbi-Lea Dionysius
April 28, 2010
58.106.46.203
Votes: +0
...

Hi, thankyou for this. Easier tutorial for a dumb designer like me!

www.dionysiacdesign.com

0
Janine
May 03, 2010
213.93.227.242
Votes: +0
...

Hi there, and thanks so much for this (hopefully) helpful info. However, when I added my GA code and tried to save it I got the folliwing message:

Could not make the template file writable
Could not make the template file unwritable

Does this mean it's still not wel installed? I absolutely have no idea :-(

Please help

0
bugboy
May 20, 2010
67.205.43.152
Votes: +0
...

Yeah, you said right, I just sooooooo agree with you, did some websites before,at that time I really wanna someone can give me a hand about it, and then a friend tell me a really good company that doing it well, they help me a lot!!maybe they can help you too, http://www.joomlaus.org/, here you go, good luck

0
Linus
June 05, 2010
173.151.244.206
Votes: +0
...

Thanks for simplifying this even for dummies like me! smilies/smiley.gif Only comment is that i got a The parameter file /templates/ja_nickel/params.ini is unwritable!on the right hand side. I rechecked template manager and it does have the analytics code....so good i guess....

I so much appreciate your help just as i do with people trying to make easy changes to healthy living as i shamelessly plug away as in www.wyssyr.com smilies/smiley.gif

Thanks much...

0
Artemeis
June 07, 2010
82.147.45.46
Votes: +0
...

Simple + easy = AWESOME

Thank you so much smilies/smiley.gif

0
DaveEBoy
June 07, 2010
86.8.2.104
Votes: +0
...

Thanks for this elegant info smilies/cheesy.gif

So this will analise all pages of a site?

0
Dony
July 11, 2010
114.56.205.5
Votes: +0
...

Hi,
I have try this step to my website, but I cant save it to my template, I want to know why its said like this "

* Could not make the template file writable
* Could not make the template file unwritable

Message

* Operation Failed!: failed to open file /home/cpdd1993/public_html/administrator/templates/khepri/index.php for writing.
"

Any one can help me, please

0
atul's
July 14, 2010
114.79.185.7
Votes: +0
...

hi dony
i think you want to change the file permission by logging into cpanel to writable (644)permission just change the permission and follow the above tutorials.Give a try if you still get a error then there is a simple way without editing a template here in below link.

http://www.knowledgetantra.com/component/content/article/9-how-to-install-google-analytics-in-joomla.html

smilies/cheesy.gif

0
za morad
July 16, 2010
118.68.166.150
Votes: +0
...

I did as per instruction but am unable to save the file. I get this:

JFTP::write: Bad response
and
Operation Failed!: failed to open file /hsphere/local/home/c259405/info.azial.com/info/templates/js_inspirion/index.php for writing.

0
steve
July 16, 2010
131.107.0.103
Votes: +0
...

the javascript code should be included before the tag, not the tag

0
Alisio
July 17, 2010
83.43.194.88
Votes: -1
...

Hi there.
I've been trying to add this code lines begore the /body tag but I can´t reach the html file.
The template I'm using is Purity II and it cannnot be edited cause it only shows a .php file
What do I need to do?
What's wrong?
Thxs in advance.

0
michaelvk
July 27, 2010
61.17.174.252
Votes: +0
...

Hi, I did add the code, what I want know is to DISPLAY some of the statistics in the frontpage of my joomla site, also I would like to include a LINK to the complete statistics page.

cheers!

0
Ed Diesel
July 30, 2010
74.72.177.244
Votes: +0
...

Why does my google analytics code show up on all my pages? I shouldn't be able to see the actual code on my page right? It shows up on the upper right hand corner...I removed the code from the template but it wont disappear!

0
Tim Harden
August 04, 2010
98.180.87.77
Votes: +0
...

Thanks for the article, it was very helpful! Bravo!

Cheers,
Tim Harden

0
alejo
August 06, 2010
190.51.51.193
Votes: +0
...

Very good article!
I wanted to give a simpler form without affecting the template and avoid future problems with upgrades of the templates, because you would have to modify the templates to add the JS code on each update. The solution is the installation of a plugin, developed by me, "AS. Google Analytics, here's the link "http://extensions.joomla.org/extensions/site-management/site-analytics/13534"
It's free, developed for me and I found it interesting to contribution to the comunity Joomla.

I hope you understand the translation of google: D

Greetings!

0
Len
August 10, 2010
87.208.64.101
Votes: +0
...

Nice tutorial. It helped me! Great job! smilies/smiley.gif

0
Offshore Software Development
August 11, 2010
115.109.4.210
Votes: +0
...

This was a Highly knowledgeable post. Kudos for taking pains to write such an awesome post.

And it seems to be like that you have spend a lot of time to research and write an unique post like this.

0
Bahsis
August 12, 2010
110.138.94.105
Votes: +0
...

Hi All,

Tks for share, but now I got problem with Google experiment code in GWO (google website optimizer), once the code attached & validating, the site gonna be mess..? I got no idea which file should be attached the code both original, variation & conversion..?

Appreciated your prompt assistances

0
james
August 20, 2010
58.172.211.10
Votes: +0
...

just going through the google analytics instructions and it tells me that i need to insert the code just before the tag. Not sure if this article is just old or when using a joomla website i need to place the code before the tag. Can anybody help please?

I placed the code before the tag so should find out soon anyway.

0
fingaz
August 21, 2010
196.25.255.246
Votes: +0
...

hi all i see is just php code the is no head and body please anyone can you tell me how to go about this

smilies/cry.gif

0
Allan Fine
August 23, 2010
70.72.171.175
Votes: +0
...

Great article ,I had forgotten how to do it but you made it simple in 2 secs flat. Great Job!!

0
Goldfinger
August 25, 2010
41.207.239.183
Votes: +0
...

nicely done ! thanks!smilies/wink.gif

0
Mad Arts Acting School
August 30, 2010
122.173.77.34
Votes: +0
...

Thanks dear it's too good
i have installed this in my site
http://www.madarts.in

0
Eu
September 01, 2010
195.250.59.11
Votes: +0
...

Will this procedure add the tracking to every page of one site? Or you will be tracking only the main page (where you have entered the code??

0
Eu
September 01, 2010
195.250.59.11
Votes: +0
...

I've found the answer somewhere else... yes, is adding the code to every page of your site. But is still one question: on google analytics site it says "Copy the following code, then paste it onto every page you want to track immediately before the closing tag" ... so not the tag...

0
Eu
September 01, 2010
195.250.59.11
Votes: +1
...

This comment window will not allow < / > so I put some spaces...
Here is what I want to say above: **before the closing < / head > tag ... so not the < / body > tag**

0
Cherry
September 03, 2010
117.197.120.248
Votes: +0
...

Gr8 !smilies/smiley.gif Excellentsmilies/wink.gif

0
Ndi
September 06, 2010
66.8.91.34
Votes: +0
...

Thank you, this article was very help, straight and forward. Thanx again

0
Qaiser Ibrahim
September 17, 2010
119.152.130.39
Votes: +0
...

thank you so much really a nice help thanks

0
Yonica Pimentel
September 23, 2010
69.134.55.196
Votes: +0
...

Thank you, worked perfectly!

0
Munkhdul
September 24, 2010
202.170.64.60
Votes: +0
...

Thank you, it is very useful article!!!!

0
Roylee Wheels
September 25, 2010
123.236.63.154
Votes: +0
...

Thanx a lot smilies/smiley.gif

0
mr-nick
September 27, 2010
93.97.182.202
Votes: +0
...

Thanks alot for this! smilies/smiley.gif

0
Dru
September 27, 2010
75.121.252.57
Votes: +0
...

Thank you for this info. I am new to Joomla, but have a little experience with websites. Your instructions helped a bunch!

0
OSI DESIGNS
October 02, 2010
96.37.153.161
Votes: +0
...

Thanks, for article. It was of great assistance. Just for the sake of any new people that may get confused, let everyone know that when it comes to Joomla everything can be a little different. Example: In the Google Analytics instructions it says to put the script within the head tag where because of Joomla's dynamics, it should be placed at the end of the HTML code as you've instructed.

Thanks again,
Steven Andrews

0
Bruno Gagnon
October 06, 2010
70.83.124.234
Votes: +0
...

Very useful information thanks a lot!

0
Fadhli
October 08, 2010
202.186.124.66
Votes: +0
...

Great Info.. Thanks

0
nikos
October 08, 2010
94.68.50.58
Votes: +0
...

thank u, very usefull

0
Kelsea
October 08, 2010
68.52.7.223
Votes: +0
...

Thanks so much!! This was a much more simple solution than anything else I found

0
Ayo
October 10, 2010
92.7.78.105
Votes: +0
...

Thank you so much for using simple instructions any one can understand!

0
Property Valuation
October 11, 2010
203.167.215.252
Votes: +0
...

Thanks, we had an old version of Joomla installed and your instructions were right on the button.

0
Jules
October 13, 2010
78.105.211.237
Votes: +0
...

When trying to save the pasted text in 1.5 it fails and just gives the message;

* Could not make the template file writable
* Could not make the template file unwritable

Any ideas?

0
anyer carita
October 14, 2010
222.124.108.30
Votes: +0
...

hii..nice share thanks

0
Jessie
October 14, 2010
76.88.29.62
Votes: +0
...

That was perfect - just what I needed thank you!smilies/smiley.gif

0
Melina Bering
October 16, 2010
173.171.84.61
Votes: +0
...

This was so much easier than I anticipated! Thank you so much!

0
badr.b
October 23, 2010
41.250.218.204
Votes: +1
...

Hello, David , Nice Work. Users Will Get Help From This.smilies/grin.gif

0
Kimberly H.
October 24, 2010
67.61.151.51
Votes: +0
...

After hours of trying to figure this out, I found this article. What a life saver or should I say hair saver. I still have a few strands left. Thanx a Million.

0
arun arunkom
October 25, 2010
125.163.172.195
Votes: +0
...

Hi, very nice article and it's work. Thank you very much smilies/wink.gif

0
Bob Kerry
October 27, 2010
71.232.245.61
Votes: +0
...

Nice simple and easy article to follow. Thanks.

0
Helen
October 28, 2010
27.32.134.166
Votes: +0
...

Does it go before the as per the instructions or the tag???

0
Helen
October 28, 2010
27.32.134.166
Votes: +0
...

Sorry,

Does it go before the end head tag as per the instructions or the end body tag???

0
becci
October 28, 2010
78.33.58.21
Votes: +1
...

smilies/grin.gif x 1 million. Thanks!! Really helful!

0
molly
October 28, 2010
173.63.105.18
Votes: +0
...

I agree with the 163 comments above smilies/smiley.gifsmilies/smiley.gifsmilies/smiley.gifExcellent - Well explained.

0
Allabux
October 28, 2010
117.204.2.229
Votes: +1
...

Thanks bro!!!!!!!!!

0
todd
November 03, 2010
174.24.56.67
Votes: +0
...

Jason's post....

"As an update to the above...in Google Analytics, sometimes it takes a while for the little yellow yield triangle status symbol to go away. You can manually force google to look for the code by clicking on "edit" at the end of the row. Then on the new page, at the upper right hand corner of the table is a small link that says "check status". Click "check status" and the new page should tell you immediately if the code is installed correctly."

Was very helpful too!

0
Courtenay
November 03, 2010
96.50.238.220
Votes: +0
...

I installed it thanks to you.

0
Irene Maguire
November 11, 2010
71.242.242.136
Votes: +0
...

I wish every Joomla! direction was as clear and concise!!!smilies/cheesy.gif

0
DigiTheme
November 14, 2010
92.81.229.179
Votes: +1
...

I know this post is from `08, but the code must be inserted between the tags

0
Jason Riley
November 20, 2010
121.210.168.128
Votes: +0
...

Joomla courses at Sydney University. Open to everyone.
http://www.cce.usyd.edu.au/courses/courses/information+technology/web+design/joomla

0
Richa Vaish
November 24, 2010
122.168.161.173
Votes: +0
...

Hey...Thanks for the information. It is really interesting to know the step by step installation of analytic code in a Joomla website. I had gone through many answers in lot of forums but this article i found it really useful.

0
NK
November 24, 2010
195.176.237.21
Votes: +0
...

In the top menu select: "Extensions" > "Template Manager"

I don't have Template Manager in this menu. I am using Joomla 1.5.15 Can someone help?

0
Grozio salonas
November 24, 2010
86.100.88.29
Votes: +0
...

Thank you, worked perfectly.

0
Anjana Silva
December 01, 2010
112.135.68.248
Votes: +0
...

Wow!! Cool as Ice! Solved my question within seconds. Thank you!smilies/wink.gif

0
nik
December 01, 2010
58.146.111.124
Votes: +0
...

thank you for the help smilies/smiley.gif

0
risdiyanto
December 01, 2010
125.163.225.208
Votes: +0
...

thx,..
it's really easy n simple

0
Tommy
December 06, 2010
110.137.182.32
Votes: +0
...

nice article.... thx

0
Citupost
December 21, 2010
83.70.80.202
Votes: +1
...

I was wondering here and there for this thing to be done. Its really simple and helpful.
Thanks So much.

0
Aleksandar Obradovic
December 22, 2010
91.150.126.30
Votes: +0
...

Thank you so much. I used it on my site http://www.nlp-prvi.rs.
I have analytics, thanx again.

0
suman
December 28, 2010
117.192.247.245
Votes: +0
...

Hi
Thanks for the great help.....that i needed....u r doing great thing....kep it up.

0
Stillclock
January 02, 2011
119.73.39.119
Votes: +0
...

wow i was searching for this and found this pretty much better then the all other articles regarding Joomla editing.

0
Philip
January 19, 2011
78.82.227.83
Votes: +0
...

Thanks this solved my issue! Nice article!

regs,
Philsmilies/wink.gif

0
Online Backup
February 15, 2011
87.192.160.22
Votes: +0
...

Added the code in works perfectly.smilies/grin.gif

0
Jack
February 22, 2011
99.184.9.132
Votes: +0
...

Hi,
I need to install Google Analytics onto my website using Joomla 1.5.7 and I have no idea what I'm supposed to do. I've scoured the internet for advice and I haven't found an alternative way to install it without accessing Template Manager...an option I don't have on Joomla 1.5.7.

Do I install it as a module? Or a plugin? Or is Template Manager hiding somewhere I can't find?

Looking for assistance here, I'm in dire straits.

Thank you.

Best,
Jack

0
Casey
February 23, 2011
143.84.43.2
Votes: +0
...

Easy to install! Thanks for taking the time to write this!smilies/grin.gif

0
Hilgard Muller
March 06, 2011
122.61.250.78
Votes: +0
...

Thanks for the information. It is really interesting to know the step by step installation of analytic code in a Joomla website. I had gone through many answers in lot of forums but this article i found it really useful.

0
Roy
March 08, 2011
182.52.192.101
Votes: +0
...

Just what I was looking for. I'm still at the localhost stage but this is a very helpful article

0
eciguser.com
March 11, 2011
121.45.216.165
Votes: +0
...

Thanks for the help David.

0
Martijn
March 13, 2011
82.173.37.31
Votes: +0
...

You also need to add Asynchronous tracking code, not this old type of trackingcode

0
Nithin
March 17, 2011
115.242.202.77
Votes: +0
...

My template having php code only...

so where can i put this code....

i am using cloudbase template.......

Help me !!!!!

Nithin
Keralahomesolutions.com

0
Moon
March 21, 2011
122.169.0.20
Votes: +0
...

Nice Article dude....... Thankssmilies/cheesy.gif

0
Srraqua
March 24, 2011
115.184.52.113
Votes: +0
...

useful article. thanks

0
Taariq
March 31, 2011
41.123.205.84
Votes: +0
...

Good day
I get the following error?
PHP Fatal error: Call to undefined function curl_init() in C:InetpubwwwrootLocalUsercsgroupadministratorcomp
onentscom
GA not runing

0
Mikolaj
April 02, 2011
84.13.198.44
Votes: +0
...

Very useful. Thanks

0
sinip
April 06, 2011
109.165.180.51
Votes: +0
...

For all of you who have different templates without needed HTML codes in the, USE THIS SOLUTION: it works perfectly!!! YOu might need to select other section that footer, if you don't have it in your template.

0
sinip
April 06, 2011
109.165.180.51
Votes: +0
...

Damn, no link??? Ok, HERE IT IS: http://www.knowledgetantra.com...oomla.html

Enjoy!

0
sinip
April 06, 2011
109.165.180.51
Votes: +0
...

Something funny is going on with my attempts to comment here, so the above link is for those people who have templates without needed HTML tags in them, so they can't use the solution described in this article. So, those should use the solution described in the above link. Works perfectly, bear in mind that if you don't have "footer" section you will have to select other one. I used "debug". Works perfectly.

0
Joy
April 11, 2011
66.77.127.27
Votes: +0
...

WOOWOWOW THANKS!

0
Spender
April 29, 2011
82.27.219.169
Votes: +0
...

plain and straightforward

Thanks

Spender
www.shed21.co.uksmilies/cool.gif

0
uk seo company
May 05, 2011
117.201.147.182
Votes: +0
...

Nice step by step guide,its very easy to add analytics in word press.
Regards
localwebmarketer.co.uk

0
Cindy
May 18, 2011
81.178.164.145
Votes: +0
...

Hello

I couldn't find the tag in my template html.
Can someone help me please?
I attach my template html below.

cheers

Cindy


0
swedesh
May 23, 2011
41.177.52.243
Votes: +0
...


Great article - worked first time.

Thanks

0
jesse
May 25, 2011
118.93.136.82
Votes: +0
...

awesome much appreciated

0
Will
May 25, 2011
24.7.33.44
Votes: +0
...

Under the google analytics instructions they say place the code immediately after the tag. Is it different for Joomla?
Thanks

0
Will
May 25, 2011
24.7.33.44
Votes: +0
...

tag* before the closing of the header tag.*

0
HERBCYCLOPEDIA
May 28, 2011
87.212.86.63
Votes: +1
...

I don't have any /body tags on the html file, is that possible?

0
Joe
June 22, 2011
41.132.249.45
Votes: +0
...

Hi

Looks very simple and did everything joy said, but I don't have the in my page.

Here is my code:

0
Kent Website Design
June 27, 2011
86.137.151.26
Votes: +0
...

Just make sure you have the latest version of the Analytics code which loads asynchronously and thus eliminate code blocking of page rendering.
Some Joomla Analytics plugins still use synchronously loading javascript when they install the plugin.

http://code.google.com/apis/analytics/docs/tracking/asyncTracking.html

0
Tampa Home Loans
July 10, 2011
173.65.247.124
Votes: +0
...

Thanks so much for this article. I was getting very frustrated and spent many hours trying to figure this out. I found this article and had Google Analytics installed in about 15 minutes. It works great.

0
Avinash Bhageloe
September 12, 2011
200.2.168.159
Votes: +0
...

Thanx a lot smilies/smiley.gif
It worked fine smilies/grin.gif

0
Stella
September 20, 2011
86.186.76.212
Votes: +0
...

This is my website: www.reproductionartgallery.com. The problem is i had a company built this for me therefore I dont have HTML access to this even now I am the webmaster.
My question is, is there any other alternative method to add the Google Analytics code without HTML access?
Many thanks

0
stephen
September 22, 2011
203.193.146.134
Votes: +1
...

Hi
Thanks a lot for shearing the information with us. My website is www.msseocompany.com and i have successfully added the code in the site. Now it is working well.

0
observatorio
October 01, 2011
190.64.192.90
Votes: +0
...

My website is http://www.latu.org.uy/observatorios I had no problems setting GA up! thanks Rajesh

0
Stephen
October 05, 2011
173.191.254.153
Votes: +0
...

Seriously??? It's that easy??? That was a huge burden lifted off of my shoulders. Thanks for an awesome write-up!

0
Victoria
October 12, 2011
75.157.37.85
Votes: +0
...

This was an awesome post - THANK YOU

0
natalie
October 17, 2011
173.164.69.86
Votes: +0
...

smilies/cheesy.gif So easy! Thank you!!!!

0
Nivedita
October 22, 2011
122.168.112.112
Votes: +0
...

Thanks a lot for the info it is seriously very helpful for me as i am goin to manage a site and I was trying to learn working on joomla.

0
IMRAN
November 03, 2011
175.110.12.111
Votes: +1
...

I Thank full to you for help us. This is really use full post

0
Realizare magazine online
December 31, 2011
86.126.104.169
Votes: +0
...

Very nice and helpful article. Great jobs!

Regards,
Realizare Magazine Online

0
Raihan Sabuj
January 13, 2012
114.134.89.104
Votes: +0
...

smilies/smiley.gifmany many thanks, it was very helpful to my website:

www.bard.kotbari.com/

0
Adrian
January 23, 2012
92.115.110.175
Votes: +0
...

thank you, very helpful for me and my web!!!!!

0
Lena
January 28, 2012
212.10.148.19
Votes: +0
...

Great article:-)
But I don't find the tag in my html manager. This is the end of my html:

$gkparams->set('mega-style', 1); //Megamenu only: Menu style.
$gkparams->set('rtl',($tmpl->getParam('direction')=='rtl' || $tmpl->direction == 'rtl'));
$gkmenu = $tmpl->loadMenu($gkparams, $gk_menutype);
}
//End for main navigation

$layout = $tmpl->getLayout ();

if ($layout) {
$tmpl->display($layout);
}

Do, where do I insert my GA code?

0
pthomp52
February 15, 2012
87.114.180.117
Votes: +0
...

Hi,
What do I do if when I try this, it tells me that the template cannot be made wrieable?

0
Payal Gupta
February 20, 2012
122.177.21.81
Votes: +0
...

Thanks , I did my job because of this article. It help me to add google analytic code in joomla. as i am not so friendly with joomla. So Thanks a lot

0
geej
February 29, 2012
89.240.176.154
Votes: +0
...

I have used the clouduniversity template and when i open html , there isn't any of the html references you mentioned. Do i have to create a custom HTML module and insert the analytics code in there ?

0
Balu
March 03, 2012
122.166.98.134
Votes: +0
...

Thanks for this article, it really helped me in setting up google analytics to my joomla website

0
sohil shah
March 05, 2012
59.182.179.54
Votes: +0
...

Hi......

I want full course training for joomla

....Anybody here....Pls. contact me on 9867 283 708.

0
Andy Kuiper
April 11, 2012
75.154.96.79
Votes: +1
...

I don't usually don't do any of the programming on Joomla, I have a great programmer who looks after that... however I needed to add a dual profile GA code snippet to a version 1 Joomla site, and just thought it would be easy enough to do myself. A quick couple of searches to make sure the code was correct, and here I landed to install it. Your instructions were perfect - works like a charm. Thanks David :-)

Andy - Andy Kuiper

0
Andres
April 13, 2012
77.229.120.91
Votes: +0
...

Hi,
I would like to add Google Analytics Code at my Joomla site. I know, how I must to do it. I did it. BUT, several files without code now. What's wrong? More or less, 75% of my files with code and 25% without code.
Please help me

0
Lori
April 17, 2012
74.223.179.146
Votes: +0
...

I am taking over a website for someone ... www.shrinkrapinc.com. In Admin, I do not have "Template Manager" under "Extensions". All i have are "Module Manager" and "Plugin Manager". How can I add Google analytics to this Joomla 1.5.25 website.

0
Bastiaan
April 19, 2012
62.45.11.55
Votes: +0
...

Works great!
Thanks for the clear explanation

Write comment
 
  smaller | bigger
 

busy