Adding web statistic tool to website code
rpk - June 11, 2009 - 16:23
Hi,
I'm working on a site and need to add the code for a commercial web statistics tool (like Google Analytics). The code is supposed to go right before the closing body tag. I tried adding the code to page.tpl.php in my theme but somehow that didn't work.
I'd be glad for any advice with this!
Thanks
RPK

Well that should work
But why not just use the excellent Google Analytics module instead?
Steve Hanson
Principal Consultant Cruiskeen Consulting LLC
http://www.cruiskeenconsulting.com
I need to implement a
I need to implement a different statistics tool.
RPK
>I tried adding the code to
>I tried adding the code to page.tpl.php in my theme but somehow that didn't work.
Did you clear the site cache?
What happened to the output source code: does it disappear completely or become modified ( ie filtered ) in some way?
---------------------------
www.crsurfcam.com
Oh, the site cache - That was
Oh, the site cache - That was it!
Great, thanks for your help!
RPK
You might use Block
You might consider adding your statistics codes to a block as an alternative instead of adding directly to the template file . Then place the block into the footing area.
I use this approach, so the code will not be overwritten when I upgrade/update a theme.
Don't forget to use FULL HTML instead of FILTERED HTML too.
That's an interesting
That's an interesting approach I hadn't considered! Thanks for the advice!
RPK
>I use this approach, so the
>I use this approach, so the code will not be overwritten when I upgrade/update a theme.
This makes sense.. I did this once with some analytics code. I upgraded the template and still haven't put it back...
---------------------------
www.crsurfcam.com