Skip to content

Instantly share code, notes, and snippets.

@mintplugins
Last active January 2, 2019 16:04
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mintplugins/d121a8d6a30d257e8c9b6012404fbb9a to your computer and use it in GitHub Desktop.
Save mintplugins/d121a8d6a30d257e8c9b6012404fbb9a to your computer and use it in GitHub Desktop.
// Google Analytics
function my_website_google_analytics(){
// Don't track visits by logged-in administrators
if ( current_user_can( 'update_plugins' ) ) {
return;
}
?>
<!-- Replace me with Google Analytics Tracking Code -->
<?php
}
add_action( 'wp_head', 'my_website_google_analytics' );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment