Forums | Mahara Community

Support /
Google analytics in footer getting stripped out


anonymous profile picture
Account deleted
Posts: 47

22 March 2009, 20:54

Hi. Been messing with putting google analytics code in the footer.tpl, right before the </body> tag.  It didn't get picked up by google properly, and when I look at the page source inteh browser, the section of the analytics codes in the { } (including those brackets) is missing. The rest of it is there.

I have tried both googles urchin and the newer ga code, both do teh same.  When I go to the shell and do a more of footer.tpl, the entire code is there.  There must be something that is stripping that out?  Any ideas?

Thanks, Jamie

 

anonymous profile picture
Account deleted
Posts: 1643

22 March 2009, 23:02

Yes, it's smarty. Smarty tags start with { and end with }

Wrap your script block with {literal} ... {/literal} and it'll play nice.

anonymous profile picture
Account deleted
Posts: 47

23 March 2009, 8:37

Thanks Nigel, works now Smile.  I guess I was out "smarted"!

Jamie

 

anonymous profile picture
Account deleted
Posts: 52

07 March 2010, 12:01

Jamie,

Were you able to get Analytics to provide you with useful information?  

Tim

4 results