Since upgrading to the 5.x series I've noticed that my previously hidden StatCounter code is now exposed in the footer. It appears the footer field is filtering out the HTML comment tags and displaying the contents of script tags. Any way around this aside from sticking it in the code somewhere? I like having it in the database so it survives upgrades...

Comments

ToddZ-1’s picture

I created a block for the tracking code. Works great. Dunno why I didn't think of that right away.

turnercl’s picture

Apparently a theme can interact with the contents of a block. The particular theme I use is RoopleTheme "NewsFlash." I first made a new block just to hold the Statcounter stuff then placed that block in the page footer. Whether using input format "full HTML" or even using "PHP code" the theme (apparently) still added

markup to the Statcounter lines. The result was that the block, while invisible, still caused extra blank space on the www page where I wanted it to be completely unobtrusive.

I reverted to plan-B and just added the Statcounter lines at the bottom of the theme's page.tpl.php file, just before the "</body> </html>".