Categories
Analytics WordPress

Should You Use a Google Analytics Plugin for WordPress? (Updated for GA4)

Plugin or manual code for Google Analytics 4 on WordPress? The pros and cons of each, what happened to the old GA plugins, and my recommendation in 2026.

Last updated: October 15, 2026

I often find WordPress sites cluttered with unused, outdated, and abandoned plugins. When I clean one up, I start with plugins that do simple jobs you can easily do another way. Google Analytics plugins are a classic example.

I first wrote this in 2014. A lot has changed since then, so here’s the updated version.

What changed: GA4

Google’s old Universal Analytics stopped processing data on July 1, 2023. Every site now uses Google Analytics 4. If your site still has an old UA tracking code (it starts with UA-), it isn’t collecting anything. Your GA4 Measurement ID starts with G-.

Option 1: Add the code yourself

GA4 gives you a short gtag.js snippet to paste into the <head> of every page. Put it in a child theme’s header, or use a small code snippets plugin so it survives theme updates.

  • Pros: no extra plugin overhead, nothing to update, and no authentication to break.
  • Cons: awkward for non-technical users, and extras like excluding logged-in users have to be coded by hand.

Option 2: Use a plugin

  • Pros: easy setup, reports inside WP Admin, and extras like outbound link tracking and excluding logged-in users.
  • Cons: some overhead, another thing to keep updated, and occasional authentication headaches. Back in 2014 I had to re-connect Yoast’s GA plugin repeatedly; manual code never needs that.

Which plugins?

The plugins I mentioned in 2014 have all changed hands or names:

  • Google Analytics by Yoast is now MonsterInsights.
  • Google Analytics Dashboard for WP is now ExactMetrics.
  • Google’s own Site Kit plugin connects GA4, Search Console, and PageSpeed Insights, and it’s free.

My recommendation

  • If you only need the tracking code, add it manually or use Site Kit.
  • If you want reports in WP Admin and will actually use features like outbound link tracking, a plugin is fine. Pick one that’s actively maintained.
  • Either way, check whether you need a cookie consent banner. In the EU and UK you usually do.

GA plugins are lightweight enough that you can run one without much fear. Just don’t install one out of habit if you’ll never look at the extra data.

FAQ

Do I need a plugin for Google Analytics on WordPress?

No. You can paste the GA4 gtag.js snippet into your theme’s head. A plugin adds convenience and extra reports.

What is the best Google Analytics plugin for WordPress?

Site Kit by Google is free and official. MonsterInsights and ExactMetrics add more reporting inside WP Admin.

Does Universal Analytics still work?

No. Universal Analytics stopped processing data on July 1, 2023. Use Google Analytics 4.

Tell me why I'm wrong...