• Skip to main content
  • Skip to primary sidebar

Supplemental Resources

Just The Tech, News, and Info We Deem To Post

  • Home
  • Home
  • Home
  • Home
  • Home
  • Home
  • Home
  • Home
  • Home
  • About
  • About
  • About
  • About
  • About
  • About
  • About
  • About
  • About
  • Contact
  • Contact
  • Contact
  • Contact
  • Contact
  • Contact
  • Contact
  • Contact
  • Contact
  • Contribute
  • Contribute
  • Contribute
  • Contribute
  • Contribute
  • Contribute
  • Contribute
  • Contribute
  • Contribute
  • WordPress
  • Marketing
  • Business
  • Computing
  • Security
  • Publicity
  • Resources
  • WHATEVS

Add Google Analytics to WordPress Theme

Screenshot of WordPress plugin php and html code

Add the following code to your WordPress theme’s function.php file, or a functionality plugin to add Google Analytics to a WordPress Theme – when not using a plugin.

// *ADD GOOGLE ANALYTICS TO WORDPRESS
add_action( 'wp_head', 'sent_google_analytics');
function sent_google_analytics() { ?>

*** Replace this line with your Google Analytics Code ***

<?php }

by Jack Alltrade on October 14, 2016

Filed Under: Code Snippets Tagged With: Google Analytics, SEO, WordPress Code Snippet

Reader Interactions

Share Your Two Cents Cancel reply

Your email address will not be published. Required fields are marked *

Primary Sidebar

© Copyright Jack Alltrade & Associates 2026 · Purely Supplemental™ is a trademark of Jack Alltrade & Associates