Skip to content

Instantly share code, notes, and snippets.

@brentini
Forked from IacopoC/ga-tracking-wp.php
Last active March 23, 2018 21:33
Show Gist options
  • Select an option

  • Save brentini/e92b5959f7a0c55fe4926b2da8b48adc to your computer and use it in GitHub Desktop.

Select an option

Save brentini/e92b5959f7a0c55fe4926b2da8b48adc to your computer and use it in GitHub Desktop.
Google analytics tracking code snippet in functions.php WordPress #wordpress
<?php add_action('wp_head', 'add_google_analytics');
function add_google_analytics() {
// Insert your GA code here
} ?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment