Google Analytics Yoast SEO Setup: Connect Both in WordPress
By Toy Wen Da, Co-Founder · Updated · 8 min read · scored 93/100
Google Analytics and Yoast SEO are separate WordPress tools, and neither one talks to the other by default. A working google analytics yoast seo setup means adding a tracking plugin or code snippet to carry the Analytics data while Yoast handles on-page optimization, then confirming that both are recording visits before you trust a report.

Why "Google Analytics" and "Yoast" keep showing up together

Yoast SEO has never tracked site visitors. Its job is on-page SEO, meaning metadata and sitemaps along with redirects and readability checks, not analytics. So why does the search phrase pair the two names?
The "Google Analytics by Yoast" plugin
Years ago, Team Yoast published a free plugin called Google Analytics by Yoast in the WordPress.org plugin directory. It was one of the earliest ways to add GA tracking codes to a WordPress site without touching a theme file.
The listing still shows that history, with a 4.5-star rating from roughly 3,159 voters and more than 282,087,249 downloads over the plugin's lifetime. Chris Christoff and Syed Balkhi later developed the plugin further with sponsorship from WPBeginner, and it was rebranded as MonsterInsights. It is now one of the most installed analytics plugins for WordPress, and its own listing states over 3 million active installs.
Someone searching "google analytics yoast seo" usually wants one of two things: to get Analytics working alongside a Yoast setup, or to find out what happened to the old plugin. The sections below cover both.
What Yoast SEO contributes
Yoast still matters because it controls the metadata and structure that Analytics later reports on, such as page titles and canonical URLs, along with indexability. To see a page with that side done correctly, this walkthrough of a fully optimized page is a useful reference before you move on to tracking.
How to connect Google Analytics to a Yoast SEO site in WordPress

Here's the process as it works inside the WordPress admin today.
Step 1: Create or confirm your GA4 property
Log in to analytics.google.com and either create a property for your domain or open the existing one. From the property's Data Streams section under Admin, copy the Measurement ID, which starts with "G-".
Step 2: Choose a connection method
You have three realistic options inside WordPress:
- A dedicated plugin such as MonsterInsights: install it from Plugins → Add New, activate it, and follow the setup wizard, which typically asks you to authenticate your Google account and pick the GA4 property.
- Google's Site Kit plugin: install it from Plugins → Add New, then use the Site Kit menu it adds to your sidebar to connect your Google account and enable the Analytics module.
- Manual code insertion: paste the GA4 global site tag into your theme's header, usually through a header/footer plugin rather than by editing
functions.phpdirectly, so the code survives a theme update.
Step 3: Make sure Yoast isn't in the way
Open Yoast SEO → Settings and look in the Crawl optimization or Site features area, depending on your version, for anything that strips scripts or disables embeds. Yoast doesn't block Analytics tags by default, but a separate speed or script-management plugin might, so confirm your tracking script isn't on an exclusion list.
Step 4: Verify data is flowing
Visit your site in an incognito window, then open GA4's Realtime report under Reports → Realtime. Your own visit should show up within a minute or two. If nothing appears, clear any caching plugin and try again before you start troubleshooting the tracking code.
| Method | Setup time | Best for | Maintenance |
|---|---|---|---|
| MonsterInsights (or similar plugin) | Under 15 minutes by the plugin's own description | Site owners who want dashboards without touching code | Low, updates through WordPress |
| Google Site Kit | 10–20 minutes | Sites that want Search Console and PageSpeed data, plus AdSense, in one place | Low, official Google plugin |
| Manual code snippet | 5–10 minutes to paste, longer to verify | Developers comfortable managing their own tags | Higher, breaks on theme changes if pasted into theme files |
Where Analytics and Yoast's other tools overlap
Once tracking is live, some analytics plugins can pull in Yoast-specific data. MonsterInsights, for example, offers a custom dimensions report that shows how pages perform against their Yoast focus keyword and SEO score, so traffic and on-page optimization sit side by side instead of in two dashboards.
Yoast also ships an add-on for time-sensitive content. Yoast News SEO is a separate module aimed at getting articles into Google News, and its setup has nothing in common with standard analytics tracking.
GA4 itself keeps changing: Google has reshaped reporting more than once since the migration from Universal Analytics, and this rundown of recent Google Analytics updates covers what has shifted and what to check in your account.

When WordPress's own tools are enough, and when they're not
A free plugin and a few clicks solve some problems, and others need more.
| Situation | Is the free/built-in route enough? | Why |
|---|---|---|
| Checking if tracking works on one page | Yes | GA4 Realtime plus a quick visit confirms it in minutes |
| A single page missing from Analytics reports | Yes | Usually a caching or exclusion setting, fixable without extra tools |
| Tracking an entire site with dozens of templates | Often not on its own | Different page types (archives and AMP pages) can silently drop tracking |
| Recurring, unexplained traffic drops | Not with built-in tools alone | Needs ongoing monitoring, not a one-time check |
| Ecommerce or goal/funnel tracking | Rarely, without a dedicated plugin | GA4's event model needs configuration most default setups skip |
Sites that load content through infinite scroll often track the first batch of posts correctly and then lose everything a visitor sees after that, because the URL never changes and GA4 never fires a new pageview. If your blog or archive pages work this way, this guide to infinite scroll SEO covers the fix so that both Google's crawler and your analytics tag see every page.
For a single page, the Realtime report and your browser's developer console are all you need. Questions about site-wide trends and channel attribution, or about why a redesign tanked your numbers, are a recurring analysis problem rather than a one-off check, and a dedicated reporting tool earns its keep there.
Common mistakes with Google Analytics and Yoast SEO setups
- Installing two tracking plugins at once. Running MonsterInsights and Site Kit together, or a manual snippet plus a plugin, double-counts pageviews.
- Confusing the Yoast SEO plugin with "Google Analytics by Yoast." They're different products now, and the analytics one is MonsterInsights.
- Pasting the tracking code into
functions.php. It works until a theme update wipes it, so use a header/footer plugin instead. - Assuming Analytics tracks everything Google sees. It only measures what happens after a visit starts and says nothing about off-site signals like reviews or a Yelp listing, which can influence your local rankings separately.
- Never checking Realtime after setup. Without that verification, broken tracking can go unnoticed for months.
- Letting a caching plugin strip the tracking script. Some aggressive optimization settings remove "unnecessary" scripts, and analytics tags can be among them.
FAQs
Does Yoast SEO include Google Analytics?
No. Yoast SEO handles on-page metadata, sitemaps and readability, but it has never included visitor tracking. You need a separate plugin or script to send data to Google Analytics.
What is "Google Analytics by Yoast"?
It was a free WordPress.org plugin originally built by Team Yoast for adding Google Analytics tracking codes to a site. It was later developed into MonsterInsights, which is the name you'll find if you search for it today.
Do I need both Yoast SEO and a Google Analytics plugin?
Yes, if you want both optimization and tracking. Yoast shapes how your pages are structured and indexed, while an analytics plugin reports on who visits and what they do once they arrive.
How do I check if Google Analytics is tracking correctly on a Yoast SEO site?
Open GA4's Realtime report, visit your site in an incognito window, and confirm your own session appears within a minute or two. If it doesn't, check for caching plugins or script-blocking settings first.
Is Google Site Kit better than MonsterInsights for connecting Analytics to WordPress?
Both work. Site Kit is Google's own plugin and also surfaces Search Console and PageSpeed data, while MonsterInsights leans toward in-dashboard reporting and offers custom reports tied to your Yoast SEO scores.
What to do next
Pick one connection method, a plugin or Site Kit, install it today, and check GA4's Realtime report before you change anything in Yoast's settings. To see how your tracking and metadata line up right now, talk to the team for a sample report built around your own site's google analytics yoast seo setup.
Resources / References
Sources
About the author
SearchBlueprint researched, wrote and scored this article with the content pipeline our customers run on their own sites. The score in the byline is what our content engine gave this page before it published. Nothing here is reviewed by hand, which is the point: it is the product's output, published where anyone can check it.