I still remember the moment I realized something was wrong with my website tracking. I opened Google Analytics like I always did, expecting to see traffic numbers, page views, and where my visitors were coming from. Instead, I saw warnings about Universal Analytics going away and messages pushing me toward Google Analytics 4.
At first, I ignored it. My site was working fine, traffic was coming in, and I didn’t feel like breaking anything. But the more I read, the clearer it became: if I didn’t set up Google Analytics 4 on my WordPress site, I would eventually lose all tracking data.
If you’re feeling confused, overwhelmed, or slightly scared of messing things up, you’re not alone. I’ve been through this setup myself, and in this guide, I’ll explain everything in simple words so even beginners and non-native English users can follow along easily.
What Is Google Analytics 4 and Why It Matters
Google Analytics 4, commonly called GA4, is Google’s latest analytics platform. It replaces Universal Analytics and focuses more on how users interact with your website instead of just counting page views.
GA4 tracks real user behavior such as scrolling, clicks, downloads, engagement time, traffic sources, devices, locations, and events. The biggest difference I noticed is that GA4 is event-based, which means almost every action a visitor takes is recorded as an event.
This helps you understand not just how many people visit your WordPress site, but what they actually do once they arrive.
Things You Need Before Adding GA4 to WordPress
Before you start, make sure you have a few basics ready. You don’t need to be a developer or know any coding.
You only need a WordPress website, a Google account, and access to your WordPress admin dashboard. That’s all. Everything else can be done step by step.
Step 1: Create a Google Analytics 4 Property
If you already have GA4, you can skip this step.
- Go to Google Analytics
- Click Admin
- Select Create Property
- Enter your website name
- Choose your time zone and currency
- Select Web as your platform
- Enter your website URL
- Create the data stream
Once done, you’ll see something called a Measurement ID.
It looks like this: G-XXXXXXXXXX
This ID is very important. We’ll use it later.
Step 2: Choose How You Want to Add GA4 to WordPress
There are three common ways to add Google Analytics 4 to WordPress:
- Using a WordPress plugin (recommended for beginners)
- Adding GA4 manually (copy-paste method)
- Using Google Tag Manager
I’ll explain all three, but start with the plugin method if this is your first time.
Method 1: Add Google Analytics 4 Using a WordPress Plugin (Easiest)
This is the method I personally recommend for beginners.
Popular GA4 Plugins Used by Competitors
- Site Kit by Google
- MonsterInsights
- ExactMetrics
- GA Google Analytics
These plugins handle tracking code, events, and updates automatically.
How I Did It Using a Plugin
- Go to WordPress Dashboard
- Click Plugins → Add New
- Search for Site Kit by Google
- Install and activate the plugin
- Connect your Google account
- Select your GA4 property
- Finish the setup
That’s it. Your Google Analytics tracking code is now active on your WordPress site.
What I like about this method is that:
- No manual code editing
- Automatic updates
- Built-in reports inside WordPress
Method 2: Add Google Analytics 4 Manually (Without a Plugin)
If you prefer fewer plugins, this method works too.
Steps to Add GA4 Tracking Code Manually
- Go to Google Analytics
- Open your GA4 data stream
- Copy the Google tag (gtag.js) code
- Open WordPress Dashboard
- Go to Appearance → Theme File Editor
- Open
header.php - Paste the GA4 tracking code before the closing </head> tag
- Save changes
Important:
If you change or update your theme, the code can disappear. That’s why beginners usually prefer plugins.
Method 3: Add Google Analytics 4 Using Google Tag Manager
This method is best for advanced users managing multiple tags.
Why People Use Google Tag Manager
- Centralized tracking
- Better control over events
- No repeated code edits
Basic Process
- Create a Google Tag Manager account
- Add a new GA4 Configuration Tag
- Paste your Measurement ID
- Publish the container
- Add the Tag Manager code to WordPress
If this sounds confusing, skip it for now. GA4 plugins do the job just fine.
How to Check If GA4 Is Working on WordPress
This is the part I always double-check.
- Open Google Analytics
- Go to Reports → Realtime
- Open your website in another tab
- Click around your site
If you see active users, page views, or events—GA4 is working
Detailed Overview
Creating a Google Analytics 4 Property
If you don’t already have a GA4 property, this is your first step.
Log in to Google Analytics using your Google account. Go to the Admin section and click on Create Property. Enter your website name, select your time zone and currency, and choose Web as your platform.
After entering your website URL, Google will create a data stream for your site. This is where GA4 collects your website data. Once the setup is complete, you’ll see something called a Measurement ID. It usually starts with the letter G followed by numbers and letters.
This Measurement ID is important because it connects your WordPress website to Google Analytics.
Different Ways to Add Google Analytics 4 to WordPress
There isn’t just one correct way to add GA4 to WordPress. Over time, I’ve tested multiple methods, and each has its own use case.
The three most common ways are using a WordPress plugin, adding the tracking code manually, or using Google Tag Manager. If you’re new to WordPress or analytics, the plugin method is the safest and easiest option.
Adding Google Analytics 4 Using a WordPress Plugin
This is the method I recommend to most beginners because it removes technical risk and saves time.
Popular WordPress plugins that competitors commonly use include Site Kit by Google, MonsterInsights, ExactMetrics, and GA Google Analytics. These plugins automatically insert the GA4 tracking code and handle updates in the background.
When I used Site Kit by Google, the process was very straightforward. I installed the plugin, connected my Google account, selected my GA4 property, and finished the setup in a few clicks.
What I like about this method is that you don’t need to touch theme files, worry about missing code, or break your website layout. You can also view basic analytics reports directly inside your WordPress dashboard.
Adding Google Analytics 4 Manually Without a Plugin
Some people prefer not to install extra plugins, especially if they want better performance or more control. I’ve used this method on lightweight sites.
To do this, you need to copy the Google tag code from your GA4 data stream. Then, go to your WordPress dashboard, open the Theme File Editor, and paste the tracking code inside the header file before the closing head tag.
This method works well, but there’s one important thing to remember. If you change your WordPress theme or update it, the tracking code may be removed. That’s why beginners often feel safer using plugins.
Using Google Tag Manager With WordPress
Google Tag Manager is more advanced, and I usually recommend it only if you plan to manage multiple tracking tools, conversion tracking, or custom events.
With Tag Manager, you create a GA4 configuration tag, add your Measurement ID, publish the container, and then add the Tag Manager code to your WordPress site.
It gives you more flexibility and control, but it also adds complexity. If you’re just starting out, GA4 plugins already cover most needs.
How to Check If Google Analytics 4 Is Working
This is the step I never skip because it confirms everything is set up correctly.
Open your GA4 dashboard and go to the Realtime report. Then open your website in a new browser tab and click around different pages. If you see active users, page views, or events appearing in real time, your tracking is working.
If nothing shows up immediately, don’t panic. Sometimes GA4 takes a few minutes to start showing data.
Common GA4 Terms Explained in Simple Words
When I first started using GA4, the terminology felt confusing. Over time, it became easier.
A Measurement ID connects your website to GA4. A data stream is where your site sends data. Events track actions like clicks, scrolls, downloads, and form submissions. Engagement shows how long users stay active on your site. Traffic sources tell you where visitors come from, such as search engines, social media, or direct visits.
You don’t need to master all of this on day one. GA4 becomes clearer the more you use it.
My Honest Experience With Google Analytics 4
At the beginning, GA4 felt unfamiliar and slightly overwhelming. The reports looked different, and some options were not where I expected them to be.
But after spending some time with it, I realized it actually gives better insights into real user behavior. Events, engagement time, and user journeys helped me understand what content people actually care about.
Now, I rely on GA4 to make content decisions, track website growth, and improve user experience.
Final Thoughts
If you’re still wondering how to add Google Analytics 4 to WordPress, the simplest advice I can give is this: start with a plugin if you’re a beginner, avoid overcomplicating things, and make sure tracking is active before Universal Analytics data is gone forever.
Once GA4 is running, you can slowly explore reports, events, and insights at your own pace. There’s no rush to understand everything in one day.