Skip to content

Instantly share code, notes, and snippets.

@gareth-gillman
Created March 15, 2018 13:02
Show Gist options
  • Save gareth-gillman/eb6cf1c0a413f4319a06519557052d3f to your computer and use it in GitHub Desktop.
Save gareth-gillman/eb6cf1c0a413f4319a06519557052d3f to your computer and use it in GitHub Desktop.
Google Analytics WordPress
function gg_add_ga() {
echo '<script>';
echo '// ga code here';
echo '</script>';
}
add_action( 'wp_head', 'gg_add_ga' );
add_action( 'wp_footer', 'gg_add_ga' );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment