Where the Google analytics code should be placed?

GK User
Sun Oct 09, 2011 8:47 am
Where to put google analytics code in the template The world news II? In the template there is no Body ...
User avatar
Fresh Boarder

teitbite
Sun Oct 09, 2011 10:54 am
Hi

Every web needs <body> :) Take a look at /layouts/default.php
User avatar
Moderator

GK User
Thu Dec 01, 2011 11:32 am
pereromo wrote:Where to put google analytics code in the template The world news II? In the template there is no Body ...


Go to templates/gk_twn2/layouts/ and add the tracking code inside default.php just before </body>-tag.

Remember to backup your original default.php file before adding the code, that is always a good practice. ;)

Good luck.

- Kurt
User avatar
Fresh Boarder

GK User
Fri Dec 02, 2011 8:18 pm
Wouldn't you put the code in the iphone.php and handheld.php too or is it all handled by the default.php?
User avatar
Fresh Boarder

GK User
Sun Dec 04, 2011 1:13 am
hi!
there is an easy way for google analytics to get put into your site - there are plugins available for different joomla version on the joola JED. just search the extentions directory, and then you dont have to muck around manually with your code! :) the plugin does it all for you!
User avatar
Platinum Boarder

GK User
Sun Dec 04, 2011 7:12 am
default.php is only loaded for desktop version of the template, if you want your code to be loaded with handhelds version, better add it either to /blocks/head.php or /blocks/footer.php
User avatar
Platinum Boarder

GK User
Tue Mar 13, 2012 1:59 pm
Don Lee wrote:default.php is only loaded for desktop version of the template, if you want your code to be loaded with handhelds version, better add it either to /blocks/head.php or /blocks/footer.php


HI Don I was trying to put the code in footer.php but it doesn't work! Would you like to help me please? Thank you!
User avatar
Fresh Boarder

GK User
Tue Mar 13, 2012 2:46 pm
Hi dmisura,

Please provide me with FTP access info via a PM then I will check for you. Thanks!
User avatar
Platinum Boarder

GK User
Thu Mar 15, 2012 9:23 pm
HI Don I provide you cpanel access on PM, thank you!
User avatar
Fresh Boarder

GK User
Fri Mar 16, 2012 1:38 pm
Hi,

I've checked your site and seen that you added your GA code twice in default.php and footer.php that might cause it not working so I've removed the code from default.php, please check if it works now.

Thanks,
User avatar
Platinum Boarder


cron