Google Analytics Problem Solved
I’ve found Google Analytics to be a really useful tool for monitoring traffic to my various web sites. I’m also a big fan of Wordpress, and there just happens to be a Wordpress pluggin that allows you to easily integrate Google Analytics into your Wordpress web sites. Unfortunately, when I switched to the Desk Mess theme, the Analytics module quit working so I lost tracking data for this blog. Fortunately the fix was easy. Wordpress uses a footer.php file to process the footer section of pages. It looks something like this:
<!– begin footer –>
<div style=”clear:both;”></div>
<div style=”clear:both;”></div><div id=”footer”>
Copyright © 2007 <a href=”<?php echo get_settings(‘home’); ?>/”><?php bloginfo(‘name’); ?></a> • Using <a href=”http://themes.performancing.com” >Modernpaper</a> theme created by <a href=”http://performancing.com” >Performancing</a>
</div><?php do_action(‘wp_footer’); ?>
</body>
</html>
In Desk Mess’ footer.php file, the line in red is missing. Because of that, Wordpress doesn’t process the footer correctly and the Analytics code isn’t added in as it should be. Adding the missing line to footer.php causes Wordpress to correctly process the footer, and Analytics tracking is working correctly again – problem solved. If only they were all so easy…