google analytics does not seem to be able to embed the code in the webpage when using itheme as the theme. Switching to another theme allows analytics to work and embed the code. Any ideas why this is happening?

Comments

markDrupal’s picture

It works fine for me. I put the code given to me by google into a block and placed the block in the footer.

Why do you say it isn't working?
What problems are you having?

carldnelson’s picture

I am using the Google analytics module and have been collecting data fine for several weeks. Then I switched to itheme as my theme and noticed no data was being collected by Google. I checked the source of the page generated using itheme and the analytics script was not in the source. I switched back to garland theme for a few days and Google began collecting data - also on switch back to garland the analytics code was visible in the source code of my site. So, is there something in the itheme template that prevents the inclusion of the analytics code generated by the analytics module?

I eventually ended up turning off the analytics module and just embedded the script code in my page headers. It's probably just as simple and doesn't involve adding another module to my setup.

defender’s picture

Status: Active » Needs review

I Add "php print $closure ?" to itheme/page.tpl.php

</div><!--/wrapper -->
</div><!--/page -->
<?php print $closure ?>
</body>
</html>

I checked the source the analytics script was in the source.
:-)

dr00b’s picture

Thanks for the tip, I've made several derivative themes based off of iTheme so your post saved me a lot of headache trying to troubleshoot this!

waynemwyatt’s picture

Thanks, the new-horizon theme was doing the same thing, it is fixed now with the closure tag, you saved me some time!