How to Install Google Analytics with Yoast

Cody Schneider6 min read

Ready to connect Google Analytics to your WordPress site using Yoast SEO? You might be scratching your head trying to find the right settings menu. This guide will clarify the process and show you the best, most up-to-date ways to get your website analytics up and running today.

GraphedGraphed

Still Building Reports Manually?

Watch how growth teams are getting answers in seconds — not days.

Watch Graphed demo video

First Things First: Requirements

Before you get started, let's make sure you have three things ready to go:

  • A WordPress Website: You'll need access to your self-hosted WordPress admin dashboard.
  • The Yoast SEO Plugin: Make sure Yoast SEO is installed and activated on your site. You can find it by going to Plugins > Add New and searching for "Yoast SEO."
  • A Google Analytics Account: You need an existing Google Analytics 4 property set up for your website. If you haven't created one yet, head over to the Google Analytics website and follow the setup instructions.

Find Your GA4 Measurement ID

No matter which method you choose to connect Google Analytics, you'll first need to find your unique Measurement ID. This ID, which starts with "G-", is what tells Google Analytics that the data coming in is from your specific website. Think of it like your site's personal mailing address for traffic data.

Here's how to find it, step by step:

1. Log in to Google Analytics: Go to the Google Analytics website and sign in.

2. Navigate to Admin: In the bottom-left corner of the screen, click on the gear icon labeled Admin.

3. Select Your Property: Make sure you have the correct Account and Property selected in the first two columns. If you only have one website connected, this should already be correct.

4. Go to Data Streams: In the Property column, click on Data Streams.

5. Open Your Web Stream: You'll see a list of your data streams. Click on the one that corresponds to your website.

6. Copy Your Measurement ID: On the next screen, you'll see your Measurement ID at the top right of the page. It's the ID starting with "G-". Go ahead and copy it - you'll need it in a moment.

Keep this ID handy in a notepad or leave this browser tab open for a few minutes.

GraphedGraphed

Still Building Reports Manually?

Watch how growth teams are getting answers in seconds — not days.

Watch Graphed demo video

Why Can't I Just Paste This Code in Yoast?

If you've been searching online, you may have seen older tutorials showing a neat little Google Analytics field directly within the Yoast SEO plugin settings. That feature made things simple, but if you look for it now, you won't find it. What gives?

In 2018, the developers of Yoast SEO decided to remove this particular setting. Their goal was to keep the plugin lean, fast, and sharply focused on its core purpose: search engine optimization. It wasn't because they think analytics isn't important - far from it. They simply concluded that dedicated analytics plugins could handle the job better and offer far more features than a simple text field ever could.

So, instead of a built-in feature, Yoast now recommends using specific analytics plugins for the job. Let's walk through the best options.

Method 1: The Officially Recommended Way (Using MonsterInsights)

Yoast's official partner for analytics is MonsterInsights, the most popular Google Analytics plugin for WordPress with over 3 million active installations. The plugin is designed to be beginner-friendly and does much more than just connect your site, it also gives you a beautiful analytics dashboard right inside WordPress.

The free version is all you need to get set up.

GraphedGraphed

Still Building Reports Manually?

Watch how growth teams are getting answers in seconds — not days.

Watch Graphed demo video

Step 1: Install and Activate MonsterInsights

In your WordPress dashboard, navigate to Plugins > Add New. Use the search bar to look for "MonsterInsights." The official plugin, "MonsterInsights - Google Analytics for WordPress," should be the first result. Click Install Now, and once it's finished, click Activate.

Step 2: Follow the Setup Wizard

Once activated, MonsterInsights will launch a user-friendly setup wizard to guide you through the connection process. It's a very smooth experience.

You'll be asked a few questions about your business category. Select the one that fits best and click Save and Continue.

Step 3: Connect MonsterInsights to Google

This is the most important step. Click the big blue button that says Connect MonsterInsights. You'll be taken to the Google account login screen. Choose the Google account you used to create your Google Analytics property.

You'll need to grant MonsterInsights permission to access your Analytics data. Click Allow. This step is secure and simply lets the plugin fetch your data to display it in your dashboard.

Step 4: Select Your Website Profile

MonsterInsights will automatically detect your Google Analytics profile. Select your website from the dropdown list and click Complete Connection.

The wizard will then recommend a few settings - the defaults are usually perfect for most users. Just review them and continue through the final steps until the wizard confirms setup is complete.

That's it! You didn't even need to copy and paste your Measurement ID. MonsterInsights handled everything for you through its secure connection and has already started tracking your visitors.

GraphedGraphed

Still Building Reports Manually?

Watch how growth teams are getting answers in seconds — not days.

Watch Graphed demo video

Method 2: Using Site Kit by Google

Another excellent option is to use Google's own official plugin called Site Kit. It's a fantastic, free tool that connects your WordPress site not just to Google Analytics but to other critical Google services like Search Console, PageSpeed Insights, and AdSense, all in one place.

Step 1: Install Site Kit

Like any plugin, start by going to Plugins > Add New and searching for "Site Kit by Google." Install and activate the plugin.

Step 2: Run the Site Kit Setup Process

Once activated, click on the Start Setup button to begin the connection process. You will start by linking your site to Search Console by signing into your Google account. You will be prompted to give permission to Search Console and Google Analytics data, just like with MonsterInsights, click Allow on the permission screens.

Step 3: Connect Google Analytics

During the setup process, Site Kit will automatically detect that you haven't connected Google Analytics and will prompt you to do so. Just click on Connect Service and enter your Google Analytics account.

Final Thoughts

Taking advantage of Google Analytics is crucial for monitoring your website, and with Yoast no longer having a dedicated feature, methods such as using MonsterInsights and Google Site Kit make the process simple. Now you can start gaining valuable insights into your visitors' behavior.

When you have your data flowing, interpret the analytics to make sense of it all. This will help you get to know your audience and make informed decisions about your content and strategy.

Try Graphed to start easily managing your content strategy.

Related Articles

How to Enable Data Analysis in Excel

Enable Excel's hidden data analysis tools with our step-by-step guide. Uncover trends, make forecasts, and turn raw numbers into actionable insights today!