Last active
October 10, 2015 15:49
-
-
Save ryanshoover/45038f475910a7cb1334 to your computer and use it in GitHub Desktop.
Add Google Analytics to WP <head>
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 | |
// (Don't copy the opening PHP tag above) | |
/** | |
* Add Google Analytics in the header | |
*/ | |
add_action( 'wp_head', 'wcraleigh_add_ga_tracking', 1 ); | |
function wcraleigh_add_ga_tracking() { | |
?> | |
<!-- Start Google Analytics --> | |
<!-- ** REPLACE ME WITH YOUR GOOGLE ANALYTICS TRACKING SCRIPT ** --> | |
<!-- End Google Analytics --> | |
<?php | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment