Originally Posted by
PortFJ62
Thank you.
Paste in the main body section?
Better, actually, to paste it into tpl_main_page.php, because that file has the closing </body> tag.
Here are the last few lines of code of the CORE FILE.
PHP Code:
<!--bof- banner #6 display -->
<?php
if (SHOW_BANNERS_GROUP_SET6 != '' && $banner = zen_banner_exists('dynamic', SHOW_BANNERS_GROUP_SET6)) {
if ($banner->RecordCount() > 0) {
?>
<div id="bannerSix" class="banners"><?php echo zen_display_banner('static', $banner); ?></div>
<?php
}
}
?>
<!--eof- banner #6 display -->
</body>
The Google code goes just above the </body> tag.
<!--eof- banner #6 display -->
<script type="text/javascript">
var _gaq = _gaq || [];
_gaq.push(['_setAccount', 'UA-37469995-1']);
_gaq.push(['_trackPageview']);
(function() {
var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
})();
</script>
</body>
This is the "clunky" way to do things. It is BETTER (if you can) to use the plugin and the reason for this is that you can set various tracking parameters via the admin panel.
For example, later on you may want to build in some custom tracking code, or assimilate AdWords Tracking with Analytics. The plugin allows you to administer these sorts of things more easily than you would by hard-coding the google scripts.
But for now, if your analytics needs are simple, then do as I indicate above.
BEAR IN MIND that tpl_main_page is a CORE FILE. You will need to create an edited OVER-RIDE and place this edited copy into your custom template's COMMON folder.
EG:
CORE FILE: /includes/templates/template_default/common/tpl_main_page.php
OVERRIDE FILE: /includes/templates/YOUR_TEMPLATE_FOLDER/common/tpl_main_page.php
Bookmarks