Created
January 16, 2018 17:24
-
-
Save EastSideCode/e068271faf8d13caa87701c543a5d244 to your computer and use it in GitHub Desktop.
Add analytics to wordpress
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
// Include the Google Analytics Tracking Code (ga.js) | |
// @ https://developers.google.com/analytics/devguides/collection/gajs/ | |
function google_analytics_tracking_code() { ?> | |
<!-- analytics script goes here --> | |
<script type="text/javascript"> | |
</script> | |
<!-- analytics script ends here --> | |
<?php | |
} | |
// include in footer | |
add_action('wp_footer', 'google_analytics_tracking_code'); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment