How To Connect Your WordPress Blog To Google Analytics



This post is the third in a 4-part series on connecting your blog to Google Analytics. In the first post, we walked you through the process of creating a Google Analytics account step-by-step. You should do that prior to following the steps below, and you should also have your Google Analytics Tracking ID handy to copy and paste into your Blogger settings. In the second post, we provided the process for connecting your Google Blogger blog to Analytics.

Below are step-by-step instructions for getting your WordPress blog properly connected to Google Analytics so that you can begin measuring, segmenting, tracking, and experimenting to grow and nurture your audience.

Connecting Google Analytics to WordPress

There are two ways to connect your WordPress site or blog to Google Analytics.

  • Manually – don’t do it this way.
  • Plugin – do it this way.

Technically, you can do it either way; however, because there are literally dozens of free WordPress plugins that make the process so simple, there’s no need to try to edit the footer.php file in the WordPress theme that you are using. If you are adept at software code and know what you’re doing, you can easily do it this way, but for anyone else, there’s just no need, so I’ve skipped instructions for this process. Below are step by step instructions for using a WordPress plugin to connect Google Analytics to your WordPress site or blog.

      1. Login to your WordPress Admin panel at
      2. Click on the “Plugins” menu item on the left
      3. Click “Add New”
      4. Search for “Google Analytics”, and find dozens of free plugins. I recommend using the plugin that is by far the most popular, updated, and reviewed: Google Analytics by Yoast. As of this writing, this plugin has been downloaded nearly 8 million times, has more than 1,000 reviews, and those reviews average 4.3 / 5 stars.
      5. Click “Install Now”
      6. Once the plugin is installed, click Activate.
      7. Now that the plugin is activated, you’ll need to edit the settings (easier than it sounds), so click “Settings,” and you’ll see the following screen.
        Google Analytics by Yoast
      8. Click “Re-authenticate with your Google account. If you’re not still logged into your Google Analytics account, you’ll need to sign in again.
      9. During the authentication process, you will be shown an “authentication code”. Copy and paste that code into the field that pops up, and hit Enter.
      10. Alternatively, you can click “Manually enter your UA code”, and then paste your code that you got when you setup Google Analytics earlier in this exercise.
      11. I recommend selecting the same checkboxes that are shown above, and also choosing to ignore users that are classified as “Editor”. This setting makes sure that your visits and clicks to your own web site are not counted in the user data in Google Analytics.
      12. Click Save changes, and you’re done. There are other settings, but those are not necessary at this point in your setup.

WordPress also has it’s own statistics package that, like Blogger, can provide you with a basic count of page views, visitors, etc.; however, also like Blogger, it usually won’t agree with Google Analytics, and also will not provide a deep source of analytics data that is so valuable in tracking and segmenting your audiences for maximum marketing potential. Google Analytics is free, and now you know exactly how to connect it to WordPress, so we highly recommend that you take advantage of this very powerful tool.

Learn More Digital Marketing Tactics at GA

This entry was posted in Marketing and tagged , , on by .

About Kevin Sandlin

Kevin Sandlin is a serial entrepreneur and 7-time startup veteran, including one IPO and two acquisitions. Kevin founded CWNP with $500, and grew the company into the industry standard for vendor-neutral WiFi certification & training through great digital, email, and content marketing. Kevin is the founder of Atlanta Tech Blogs and Pitch Practice and teaches General Assembly's part-time Digital Marketing course in Atlanta. Follow Kevin on Twitter @kevsandlin.

Disclaimer: General Assembly referred to their Bootcamps and Short Courses as “Immersive” and “Part-time” courses respectfully and you may see that reference in posts prior to 2023.