google analytics Posted by jinglesnbells 16 Jul 2007 12:56 UTC Does anyone use google analytics? It says to place the code on each page you want to track right before the </body> tag. I am not sure how to do this since things are done using templates. What pages do I need to edit? Thanks for your help!
Posted by Rick Sapir / Tiki for Smarties 16 Jul 2007 20:28 UTC Add it directly to the header.tpl template. HTH, -Rick
Posted by Gary Cunningham-Lee 18 Jul 2007 00:53 UTC To add to what Rick said, if the code is javascript, enclose it in {literal}{/literal} tags. -- Gary
Posted by Rick Sapir / Tiki for Smarties 18 Jul 2007 01:43 UTC This has been asked enough times now.... I've added it as a Tiki FAQ. -Rick
Posted by Gary Cunningham-Lee 18 Jul 2007 05:58 UTC Regarding the new FAQ, I'm not sure how much it matters, but Google says to put the urchin code in the body, just before the closing /body tag. Also, it'd be good to mention the literal tags needed around Javascript in Smarty templates. -- Gary
Posted by Rick Sapir / Tiki for Smarties 18 Jul 2007 11:03 UTC You're right... I'll change the FAQ to use the footer.tpl instead. However, the LITERAL tags are not needed, since the JS code does not use any {...}. -R > Regarding the new FAQ, I'm not sure how much it matters, but Google says to put the urchin code in the body, just before the closing /body tag. Also, it'd be good to mention the literal tags needed around Javascript in Smarty templates. > > — Gary
Posted by tassos 03 Jan 2009 03:58 UTC First of all Happy New Year everybody. Now, Guys help please!!!!!!!!!! Ok, I have read everything but I can not get it to work. I have put the code in footer.tpl. I have tried with and without the literal tags. I have tried both codes from Google ga.js and urchin.js The code from Google is in two parts. The first script part works but the second it does not. My web site is hr-info.com and if you go and do a view source you will see at the bottom the code. You can then see that the code is stript and the only thing left is the "catch(err) {}" code. I am using tiki v2.2 with the Andreas08 theme. Any help will be appreciated. By the way google says that it receives data but then it shows as zero visits which is totaly inaccurate. Any ideas???? Thanks Tassos