Running a WordPress site without analytics is like driving with the dashboard covered. This guide shows you how to add google analytics to wordpress in about twenty minutes — with Google’s free Site Kit plugin, the popular MonsterInsights plugin, or a manual code snippet.
Google Analytics 4 (GA4) is the current version — the old Universal Analytics stopped processing new data on 1 July 2023, so every new setup today is GA4. It is free and event-based, and it tells you which pages people read, where they came from, and what they do before they leave. The steps below were verified on 20 November 2026 against Google’s official documentation.
In this guide
- Why Add Google Analytics to Your WordPress Site?
- What You Need Before You Start
- Step 1: Create Your GA4 Property and Web Data Stream
- The Three Methods Compared
- How to Add Google Analytics to WordPress with Site Kit (Recommended)
- How to Add Google Analytics to WordPress with MonsterInsights
- How to Add Google Analytics to WordPress Manually
- How to Verify That Data Is Flowing
- Five Settings to Change After Setup
- Common Mistakes That Break Your Tracking
- Frequently Asked Questions
- The Verdict
Why Add Google Analytics to Your WordPress Site?
WordPress tells you nothing about your visitors: it knows how many posts you published, not how many people read them. Learning how to add google analytics to wordpress fills that gap.
First, it shows you which content earns its keep. A post that brings in hundreds of visitors from Google deserves an update and an internal link from your homepage; a post nobody reads can be improved or removed. Without data, you are guessing at both.
Second, it shows you where visitors come from and where they leave. If most people exit on the same page, something there is wrong — slow loading, a broken layout, or a call to action that does not work. Our how to speed up WordPress guide covers the most common fix, and analytics tells you which pages need it.
Finally, analytics underpins everything else you will measure — ad revenue, email signups and sales all need a working GA4 property. Set it up now: GA4 cannot collect data retroactively.
What You Need Before You Start
You need three things, all free: a Google account, WordPress admin access, and about twenty minutes. Use the Google account you want to own the data long term — ideally the same one that owns your Search Console property.
One warning before you learn how to add google analytics to wordpress: pick exactly one method. Two methods means two tags, and GA4 counts every visitor twice.
Step 1: Create Your GA4 Property and Web Data Stream
Every route to how to add google analytics to wordpress starts the same way: a GA4 property with a Web data stream. The property holds your site’s data; the stream connects your site to it and produces the Measurement ID you will need.
- Go to analytics.google.com and sign in. First time? Click Start measuring and enter an account name — your site name works well.
- Click Admin → Create → Property and enter a property name, usually your website name.
- Choose your reporting time zone and currency — the time zone decides which day each visit is counted on, and changing it later only affects future data.
- Pick your industry, business size and objectives, then click Create and accept the terms.
- Choose Web, enter your website URL exactly as it appears in the browser, including HTTPS, and name the stream.
- Leave enhanced measurement on: it auto-tracks page views, scrolls, outbound clicks, site search, video engagement and file downloads. Click Create stream.
GA4 now shows your Measurement ID, starting with G- — for example, G-ABC1234567. Keep this tab open: the ID is what makes how to add google analytics to wordpress work.

The Three Methods Compared
There are three honest ways to learn how to add google analytics to wordpress, and they are not equal. The right one depends on your comfort with code and how much reporting you want inside WordPress.
| Method | Cost | Code needed | Reports inside WordPress | Best for |
|---|---|---|---|---|
| Site Kit by Google | Free | None | Yes — key metrics dashboard | Most site owners; the official Google plugin |
| MonsterInsights | Free Lite; Plus from $99.50/year | None | Yes — full dashboard reports | Owners who want rich reports in WordPress, WooCommerce stores |
| Manual Google tag (gtag.js) | Free | Paste one snippet | No — reports only in GA4 | Developers, or sites that avoid extra plugins |
Site Kit is the default recommendation in this guide on how to add google analytics to wordpress: Google’s official plugin, free with no paid tier, connecting Analytics, Search Console, AdSense and PageSpeed Insights from one dashboard. MonsterInsights is the strongest alternative for deeper reports, especially on a store. The manual method is the lightest option, but a theme update can wipe out the code if you place it in the wrong file.
How to Add Google Analytics to WordPress with Site Kit (Recommended)
Site Kit is Google’s official WordPress plugin, and the simplest answer to how to add google analytics to wordpress for most site owners. It is free and open source, with more than 5 million active installs on WordPress.org, and it needs WordPress 5.2 or newer and PHP 7.4 or newer. BadilHost itself runs Site Kit, connected to Search Console, AdSense, Analytics and PageSpeed Insights from one dashboard.
- Go to Plugins → Add New Plugin, search for Site Kit by Google, and confirm the author is Google.
- Click Install Now, then Activate.
- Go to Site Kit → Dashboard, click Start setup, and tick the box to connect Google Analytics.
- Click Sign in with Google and choose the account that owns the GA4 property from Step 1.
- Grant the permissions, then click Verify — Site Kit confirms site ownership with Google automatically.
- When the wizard reaches Analytics, choose your existing account, property and stream — or let Site Kit create a new property if you skipped Step 1.
- Choose your site’s main goal when asked, then click Complete setup.
That is the whole of how to add google analytics to wordpress with Site Kit: the plugin places the Google tag on every page automatically, and its dashboard shows your key metrics inside WordPress. It also connects Search Console in the same flow — search queries in, behaviour out. Our WordPress security checklist covers the other day-one settings to pair with them.

How to Add Google Analytics to WordPress with MonsterInsights
For readers weighing how to add google analytics to wordpress on a store, MonsterInsights is the most popular third-party analytics plugin for WordPress, with more than 2 million active installs of its free Lite version and a 4.5-star average on WordPress.org. It shows simplified GA4 reports inside the dashboard.
- Go to Plugins → Add New Plugin, search for MonsterInsights, and click Install Now, then Activate.
- The setup wizard starts automatically: click Connect MonsterInsights and sign in with the Google account that owns your GA4 property.
- Grant the permissions, then pick your GA4 property.
- Accept the recommended settings, then click Save and Continue. Skip the optional addons for now; add them later from Insights → Addons.
The free Lite version covers the essentials: a basic GA4 connection and an overview dashboard with sessions, page views, top countries, referrers and devices.
| Plan | Sites | First-year price | Renewal price | What it adds |
|---|---|---|---|---|
| Lite | 1 | Free | Free | Basic GA4 connection and overview dashboard |
| Plus | 1 | $99.50/year | $199/year | Full reports, standard tracking, growth tools |
| Pro | 5 | $199.50/year | $399/year | eCommerce tracking, form conversions, custom dimensions |
| Elite | 5 | $299.50/year | $599/year | Multisite, access control, priority support |
All prices are US list prices before tax, checked against MonsterInsights’ official pricing page on 20 November 2026 — the full cost picture for how to add google analytics to wordpress with MonsterInsights. First-year figures are introductory; renewals are charged at the full rate shown. All paid plans carry a 14-day money-back guarantee.
Pro earns its price only for stores: enhanced eCommerce tracking with automatic WooCommerce integration, a form conversion report and custom dimensions. If your site is a blog, Lite or Plus is enough — do not pay just to see page views, which GA4 already records. And remember the one-method rule: if you choose MonsterInsights, do not also install Site Kit’s Analytics module or paste the tag manually.
How to Add Google Analytics to WordPress Manually
The manual method is the lightest way to learn how to add google analytics to wordpress: no plugin, no extra dashboard, just one snippet of code. It suits developers and low-plugin-count sites — but it is also the method most likely to break, so follow the placement rule exactly.
- In GA4, open your web data stream and click View tag instructions. Copy the Google tag snippet — a short script starting with
https://www.googletagmanager.com/gtag/js?id=G-plus a few lines ofgtag('config', 'G-...')code. - Install a code snippets plugin — the free WPCode plugin is the standard choice — or use your child theme’s
functions.php. Never paste the tag into your main theme’sheader.php: the next theme update overwrites it and silently deletes your tracking. - In WPCode, create a snippet, paste the Google tag code, and set it to run in the site header on every page. Save and activate it.
- Clear your caching plugin afterwards, so the new code reaches visitors immediately.
The manual tag does exactly what the plugins do, but it shows you nothing inside WordPress: every report lives in GA4, and every change means editing code again. For most site owners learning how to add google analytics to wordpress, that trade-off is not worth it — Site Kit does the same job in ten minutes with no code.
How to Verify That Data Is Flowing
Installing the tag is only half of how to add google analytics to wordpress. Google says new data can take up to 30 minutes to appear, so do not panic at an empty report — verify the connection before you close the tab.
The fastest check is the Realtime report. In GA4, go to Reports → Realtime, then open your own site in a new tab and browse two or three pages. Within a minute or two you should appear as one active user. If you see yourself, tracking works.
If Realtime stays empty, check four things. First, the Measurement ID: in GA4, open Admin → Data Streams → your web stream and compare it letter by letter with the one in your plugin or snippet — one wrong character sends data nowhere. Second, a second tag: search your page source for G-. You should find the tag once; two copies means two plugins, or a plugin plus a snippet, so remove one.
Third, your cache: purge it and reload, since a cached page from before the install carries no tag. Fourth, your ad blocker: test in a private window with extensions disabled. If all four check out, use DebugView — Admin → Data Display → DebugView with Google’s Tag Assistant extension — to watch every event your browser sends.

Once Realtime shows your visit, the setup is done. Standard reports start filling in over the next 24 to 48 hours as real visitors arrive.
Five Settings to Change After Setup
A working tag is the beginning of how to add google analytics to wordpress, not the end. These five settings take ten minutes and save months of regret later.
1. Extend data retention to 14 months. GA4 keeps detailed user and event data for two months by default, then deletes it — and the change is not retroactive. Standard reports keep their aggregated totals, but explorations and funnels lose everything older than the window. Go to Admin → Data collection and modification → Data retention, set event data retention to 14 months (the free-tier maximum), and turn on Reset user data on new activity.
2. Filter out your own visits. Your own browsing inflates your numbers. In GA4, add your office or home IP under Admin → Data streams → Configure tag settings → Define internal traffic, then set the internal traffic filter to Active under Admin → Data Settings → Data Filters. Test it first — a wrong IP filter can hide real visitors.
3. Mark your key events. GA4 tracks page views and scrolls automatically, but it does not know what a conversion is until you tell it. Mark a form submission, newsletter signup or purchase as a key event: Admin → Data display → Events, find the event, toggle Mark as key event.
4. Link Search Console inside GA4. Go to Admin → Product links → Search Console links and connect the property — the actual words people typed now appear in your Analytics reports.
5. Turn on Google Signals — deliberately. Google Signals adds cross-device and demographic reports, but it changes how your data is collected and may require an updated privacy notice. It is off by default — read what it does before enabling it, and leave it off if you are unsure.
While you are in the admin area, check your backup routine too: our WordPress backup guide shows the restore-tested 3-2-1 setup that actually recovers a site.
Common Mistakes That Break Your Tracking
Installing two methods at once. The most common mistake when learning how to add google analytics to wordpress: Site Kit plus MonsterInsights, or a plugin plus a manual snippet. Every page view is counted twice and your numbers are fiction. Pick one method and uninstall the other.
Connecting the wrong property. A Google account with several properties — test, staging, live — makes it easy to connect WordPress to the wrong one. Check the property name against GA4 before you call the job done. Staging sites deserve their own property, or no tracking at all; our WordPress staging site guide explains how to keep test traffic out of live data.
Judging the setup after five minutes. Google says data can take up to 30 minutes to appear, and standard reports up to 48 hours to fill in. An empty report in the first hour usually means the data has not arrived yet — judge it by the Realtime report.
Forgetting the cookie banner. If your audience includes visitors from the EU or the UK, analytics cookies need consent before they fire — a banner that blocks the Google tag until the visitor accepts is a legal requirement there. Do not assume the tag handles it alone.
Never checking again. Tracking breaks silently: a theme change removes a snippet, a plugin update resets a setting, a caching layer serves stale pages. Put a monthly reminder in your calendar to check that how to add google analytics to wordpress is still working — open Realtime and confirm your own visit appears. Five minutes a month beats discovering a three-month gap.
Frequently Asked Questions
Is Google Analytics free for WordPress?
Yes. GA4 itself is free, and both recommended connection methods are free: Site Kit by Google has no paid tier at all, and MonsterInsights Lite is free on WordPress.org. You only pay for a MonsterInsights paid plan — Plus from $99.50 for the first year, renewing at $199 — for eCommerce and form conversion reports.
How long does it take for Google Analytics to start showing data?
Once you know how to add google analytics to wordpress, Google says new data can take up to 30 minutes to appear. The Realtime report usually shows your own visit within a minute or two; standard reports take 24 to 48 hours to fill in. Do not judge the setup on an empty report in the first hour.
Do I need a plugin to add Google Analytics to WordPress?
No, but most site owners should use one. When you learn how to add google analytics to wordpress with a plugin like Site Kit, setup is easier, it survives theme updates, and it adds Search Console and AdSense in the same flow. The manual method is best left to developers.
Can I use Site Kit and MonsterInsights together?
No — either route to how to add google analytics to wordpress works alone, but use only one. Both add the Google tag to your pages, so running both counts every visitor twice and corrupts your data. Site Kit is the better pick if you also want Search Console, AdSense and PageSpeed Insights in one free plugin. MonsterInsights is the better pick for deeper reports inside WordPress or WooCommerce purchase tracking on a paid plan.
Will Google Analytics slow down my WordPress site?
The impact is small: the Google tag is a single lightweight script loaded asynchronously, so it does not block your page from rendering. The bigger risk is stacking several analytics plugins at once, each adding its own script. One method, one tag, and the cost is negligible on any decent host. If your site is slow for other reasons, start with our how to speed up WordPress guide.
Does Google Analytics work with AdSense?
Yes, and they complement each other: Analytics shows which pages earn the most traffic, AdSense which earn the most revenue. Site Kit connects both from the same dashboard, and linking the two accounts in GA4 shows AdSense revenue alongside traffic sources. If you have not set up ads yet, our how to add AdSense to WordPress guide covers approval, ads.txt and placement rules.
The Verdict
For most WordPress sites, Site Kit by Google is the right answer to how to add google analytics to wordpress: free, official, ten minutes to set up, and it brings Search Console and AdSense along for the ride. Choose MonsterInsights instead if you run a WooCommerce store and want purchase tracking without code — start with the free Lite version and pay for Pro only when a store report earns it. Use the manual tag only if you write code and want zero extra plugins. Whichever method you pick, verify it in the Realtime report today and extend data retention to 14 months before you forget.
Conclusion
Learning how to add google analytics to wordpress takes about twenty minutes and costs nothing: create a GA4 property and a Web data stream, copy the Measurement ID, connect it with Site Kit, MonsterInsights or a manual tag, and confirm your own visit in the Realtime report. Site Kit is the simplest route for most sites, MonsterInsights the richest for stores, and the manual tag the lightest for developers. The setup is the easy part — the habit that pays is opening the reports weekly, finding the page that earns its traffic, and writing more like it.
All steps and prices in this guide were verified against Google’s official documentation, sitekit.withgoogle.com and the WordPress.org plugin directory on 20 November 2026. Google and MonsterInsights change their interfaces and prices without notice, so confirm the current figures on the official pages before you buy. Official pages: Site Kit by Google and MonsterInsights on WordPress.org.