Created
August 24, 2009 14:54
-
-
Save ceejayoz/173917 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
function google_analytics() { | |
print "<script type=\"text/javascript\">\n"; | |
print "var gaJsHost = ((\"https:\" == document.location.protocol) ? \"https://ssl.\" : \"http://www.\");\n"; | |
print "document.write(unescape(\"%3Cscript src='\" + gaJsHost + \"google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E\"));\n"; | |
print "</script>\n"; | |
print "<script type=\"text/javascript\">\n"; | |
print "var pageTracker = _gat._getTracker(\"UA-2899761-10\");\n"; | |
print "pageTracker._initData();\n"; | |
print "pageTracker._trackPageview();\n"; | |
print "</script>\n"; | |
} | |
add_action('wp_footer', 'google_analytics'); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment