Move Google Analytics code into footer template

Once again, HTML tags should be in the templates when possible.

actions.php is no longer needed now as well.
This commit is contained in:
Scott Walkinshaw
2012-09-19 13:53:01 -04:00
parent e08024b730
commit 267e24e9a3
3 changed files with 10 additions and 22 deletions

View File

@@ -3,4 +3,13 @@
<p>&copy; <?php echo date('Y'); ?> <?php bloginfo('name'); ?></p>
</footer>
<?php wp_footer(); ?>
<?php if (GOOGLE_ANALYTICS_ID): ?>
<script>
var _gaq=[['_setAccount','<?php echo GOOGLE_ANALYTICS_ID; ?>'],['_trackPageview']];
(function(d,t){var g=d.createElement(t),s=d.getElementsByTagName(t)[0];
g.src=('https:'==location.protocol?'//ssl':'//www')+'.google-analytics.com/ga.js';
s.parentNode.insertBefore(g,s)}(document,'script'));
</script>
<?php endif; ?>
<?php wp_footer(); ?>