Page 1 of 1

Where to put Google analytics on Yootheme template

Posted: Thu Jan 06, 2011 10:06 am
by JGS2010
Hello

As per the title I am not sure where to put the code on my template. I found some advice that said its as easy as going into the template via the back end, choosing edit html and then placing it on the second from bottom line just before the body> text. The yootheme didn't have this code so I am unsure how to add this.

any help would be greatly appreciated.

Regards

john.

Re: Where to put Google analytics on Yootheme template

Posted: Thu Jan 06, 2011 10:40 am
by browncar
Well there is an extension that might make this easier for you .

http://extensions.joomla.org/extensions ... ytics/6170

you would have to go get your Google analytics code but it should do the trick. I have not tested this particular extension but it seems to be very popular.

I would try to enter the code in the footer of the page (template) . If you do not want to use an extension.

Cheers.

Re: Where to put Google analytics on Yootheme template

Posted: Thu Jan 06, 2011 10:56 am
by JGS2010
Hey

Thank you for that link i will give that a go later. I went to put the code at the bottom of the template but i think yoo theme do their code differently, so i was not able to (although I don't know too much abotu this)

Thanks again.

Re: Where to put Google analytics on Yootheme template

Posted: Fri Jan 07, 2011 4:55 am
by keliix06
The plugin is the easiest way to do it, but if you edit the template's index.php file you'll find the </body> tag near the bottom of that for placing the code manually.

Re: Where to put Google analytics on Yootheme template

Posted: Fri Jan 07, 2011 1:53 pm
by v2interactive
keliix06 wrote:The plugin is the easiest way to do it, but if you edit the template's index.php file you'll find the </body> tag near the bottom of that for placing the code manually.
Exactly.

Re: Where to put Google analytics on Yootheme template

Posted: Sat Feb 19, 2011 2:22 pm
by Raton
It won't work by modifying index.php. The guy is asking about a "Yootheme" template.
For yootheme tempaltes you have to modify head.php in /templates/yourtheme/warp/systems/joomla.1.5/layouts/

Re: Where to put Google analytics on Yootheme template

Posted: Wed Feb 23, 2011 9:36 am
by tinus2003
The new Google Analytics tracking code should be added to the <head>, not </body>.
New plguins will make this possible for you. Yootheme templates are built up differently from other templates, so you won't be able to simply change the index.php.

Go with a simple system plugin to add the GA code. Make sure it is a asynchronous trackingcode script.

Re: Where to put Google analytics on Yootheme template

Posted: Thu Feb 24, 2011 3:44 pm
by noizer1
Could you clarify how to put the code in the file ?

EDIT:

I did my self, I put the code in a new php file named ga.php and at the last line of the head.php I have included:

<?php include ("ga.php"); ?>

Now the code is eh the <head> code and not in the <body> It has to be like this?

Re: Where to put Google analytics on Yootheme template

Posted: Thu Feb 24, 2011 4:18 pm
by tinus2003
I would download a plugin to add the tracking code to your <head> section. You can find them in the extensions.joomla.org website.

Once you did this, you will need to install the plugin. If you don't know how this works, you can get a step by step instruction on how to do that here:
http://www.analyticsforjoomla.com/other ... la-16.html

After that, you're done!

I hope that answers your question. If not, you might want to ask the guys at Yootheme for a instruction on how to add the code to the files of their template.

Re: Where to put Google analytics on Yootheme template

Posted: Thu Feb 24, 2011 4:31 pm
by noizer1
I am using Joomla 1.6 and at the moment there is no extension (at least I haven't found one)

I edited my post because I think I have done it right

Re: Where to put Google analytics on Yootheme template

Posted: Sat Mar 05, 2011 1:55 pm
by tinus2003
There are actually a bunch right now.
Just check this google search to find them.

Get me a plugin

Re: Where to put Google analytics on Yootheme template

Posted: Sun May 22, 2011 10:52 pm
by mlvfx
Hi,
I believe yootheme index.php refers to /tamplate_name/layouts/template.php

index.php just refers to that code which has a standard index.php structure.
Copy your Google script before the closing </head> tag


So thats it for a manual placement!
Cheers!

Re: Where to put Google analytics on Yootheme template

Posted: Wed Sep 26, 2012 11:26 pm
by sjimmy78
thats solve it!

Re: Where to put Google analytics on Yootheme template

Posted: Thu Apr 04, 2013 8:49 am
by chris_tech
yes works although yootheme support more or less insist on their method to work as well (by putting the code before the ending body tag in the administration template area) - tried both and only the way suggested by google (placing the code before the ending head tag) works...

regards
chris

Re: Where to put Google analytics on Yootheme template

Posted: Fri Apr 12, 2013 5:25 pm
by mfjlabs
No one mentioned it, but thought it might be encouraging to see what GAs look like in YooTheme Tasty under J2.5 (
yootheme-tasty-style-screen.png
). No xtra extensions & been working sweet for months now.

Can't wait to get to 3.x.
Good luck with your upgrade.
Peace.

Re: Where to put Google analytics on Yootheme template

Posted: Tue Apr 23, 2013 8:56 pm
by zombie4eva
mlvfx wrote:Hi,
I believe yootheme index.php refers to /tamplate_name/layouts/template.php

index.php just refers to that code which has a standard index.php structure.
Copy your Google script before the closing </head> tag


So thats it for a manual placement!
Cheers!
Thanks very much , I finally solved with your advise of editing template.php for yootheme template..

Re: Where to put Google analytics on Yootheme template

Posted: Mon Apr 29, 2013 1:12 pm
by madmaxy
Hi,

ihave the same problem. Im using a yootheme template for my joomla 2.5.9.

I want to use this canonical.php (more infos here: http://www.concept-br.de/blog/canonical-tag-for-joomla/)

Ive posted the php include in the head of the layouts/template.php file, but without success.

Ive tried it with the head.php in warp/systems/joomla/layouts.head.php - same result !

I hope someone has an idea or solution.

Thx a lot

mad

Re: Where to put Google analytics on Yootheme template

Posted: Mon May 27, 2013 3:55 pm
by fantoche
Hi,
Did you resolve it?
I have a yootheme template and I put the GA code in layouts/template.php without success. Please tell me how you do it.

Re: Where to put Google analytics on Yootheme template

Posted: Sat Sep 21, 2013 7:58 pm
by pishro
fantoche wrote:I have a yootheme template and I put the GA code in layouts/template.php without success. Please tell me how you do it.
hi fantoche! ;)
please see this question in Support yootheme : Google Analytics Tracking code

Code: Select all

http://www.yootheme.com/support/question/6050