How to Set Up Google Analytics 4 (GA4) on WordPress with Google Tag Manager Step by Step
If you want to understand how visitors use your website, where they come from, and which pages help generate leads, then Google Analytics 4 is one of the most important tools you can install. In this guide, I’ll show you how to set up GA4 on WordPress using Google Tag Manager, step by step, in a simple and beginner-friendly way.
This setup method is one of the best options for business websites because it keeps your tracking organized and makes it easier to add future tracking for contact forms, button clicks, phone clicks, WhatsApp clicks, and conversions.
If you run a service-based website, agency website, blog, or local business site, this guide will help you install GA4 the right way.
Table of Contents
- What Is Google Analytics 4?
- Why Use GA4 with Google Tag Manager?
- What You Need Before You Start
- Step 1: Create a GA4 Property
- Step 2: Create a Web Data Stream
- Step 3: Install Google Tag Manager on WordPress
- Step 4: Create the GA4 Tag in Google Tag Manager
- Step 5: Test with Tag Assistant Preview
- Step 6: Publish Your Tag
- Step 7: Check GA4 Realtime Reports
- Common GA4 Setup Mistakes to Avoid
- Final Thoughts
What Is Google Analytics 4?
Google Analytics 4, or GA4, is the latest version of Google Analytics. It helps you track what people do on your website, including page views, engagement, traffic sources, and key actions. Unlike the older Universal Analytics, GA4 is designed to work better across websites and apps and gives you a more modern event-based tracking system.
For most website owners, GA4 is now the standard choice. If you want to measure how your content performs, how users move through your site, and where leads come from, GA4 is essential.
Why Use GA4 with Google Tag Manager?
You can install GA4 directly on WordPress, but using Google Tag Manager gives you much more flexibility. It allows you to manage tracking in one place without editing your website code every time you want to add a new event.
Here’s why this setup is a smart choice:
- It keeps tracking organized
- It makes future event tracking easier
- It works well for lead generation websites
- It helps you add Google Ads, Meta Pixel, and conversion tracking later
- It reduces the need to repeatedly edit theme files or plugins
If you plan to track form submissions, call button clicks, WhatsApp clicks, or important CTA buttons later, Google Tag Manager is the better long-term setup.
What You Need Before You Start
Before setting up GA4 on WordPress, make sure you have the following:
- A Google Analytics account
- A Google Tag Manager account
- A WordPress website
- Admin access to your WordPress dashboard
- A Google Tag Manager plugin such as GTM4WP
For WordPress, GTM4WP is a great choice because it is simple, reliable, and made specifically for Google Tag Manager integration.
Step 1: Create a GA4 Property
- Go to Google Analytics
- Click Admin
- Click Create Property
- Enter your website or business name
- Select your reporting time zone and currency
- Complete the setup steps
Once done, Google Analytics will create your GA4 property.
Step 2: Create a Web Data Stream
- Go to Admin
- Click Data Streams
- Select Web
- Enter your website URL
- Enter a stream name
- Click Create Stream
After that, you will see your Measurement ID. It looks like this:

Keep this Measurement ID ready because you’ll use it in Google Tag Manager.
Step 3: Install Google Tag Manager on WordPress
- Log in to your WordPress dashboard
- Go to Plugins → Add New
- Search for GTM4WP
- Install and activate the plugin
- Go to Settings → Google Tag Manager
- Paste your GTM container ID
Your GTM container ID looks like this:
Then configure the basic settings:
- Container code ON/OFF: On
- Container code compatibility mode: Off (no tweak, right placement)
Save your changes. If your site uses caching, clear your cache after saving.
Step 4: Create the GA4 Tag in Google Tag Manager
- Open your Google Tag Manager account
- Go to Tags
- Click New
- Name the tag clearly, such as GA4 – Google Tag – All Pages
- Click Tag Configuration
- Select Google Tag
- Paste your GA4 Measurement ID
- Click Triggering
- Select Initialization – All Pages
- Save the tag


This tells Google Tag Manager to load your GA4 tracking on every page of your website.
Step 5: Test with Tag Assistant Preview
Before publishing, always test your setup.
- In GTM, click Preview
- Enter your website URL
- Connect your site
- Open your website in the preview session


If everything is set up correctly, Tag Assistant should show:
- Your GTM container is detected
- Your GA4 Google Tag is firing
- No major tag errors
Step 6: Publish Your Tag
- Go back to GTM
- Click Submit
- Add a version name if you want
- Publish

Now your GA4 tracking is live on your website.
Step 7: Check GA4 Realtime Reports
After publishing, confirm that data is reaching Google Analytics.
- Go to Google Analytics
- Open your GA4 property
- Click Reports
- Open Realtime

Then visit your website in another tab and browse a few pages. If the setup is working, you should see your active visit in the realtime report.
Common GA4 Setup Mistakes to Avoid
Many website owners install GA4 but still end up with inaccurate or messy data. Here are the most common mistakes to avoid:
- Installing tracking in multiple places
- Keeping old Universal Analytics tags active
- Forgetting to test before publishing
- Not checking Realtime reports
- Ignoring future conversion tracking
Installing GA4 is only the beginning. To get real value from analytics, you should also track important actions like contact form submissions, call clicks, and key buttons.
Final Thoughts
Setting up Google Analytics 4 on WordPress with Google Tag Manager is one of the best ways to build a clean and flexible tracking foundation for your website. It may look technical at first, but once it’s done correctly, it becomes much easier to track performance, understand your traffic, and improve conversions over time.
If your goal is to grow a business website, generate more leads, or make smarter marketing decisions, GA4 is one of the core tools every modern website should have.
Take the time to set it up correctly once, test it properly, and then build on top of it with conversion tracking and event tracking later.
Need Help Setting Up GA4 on Your Website?
If you want help setting up Google Analytics 4, Google Tag Manager, Google Ads conversion tracking, or lead tracking on your WordPress website, feel free to contact me.
A proper setup can help you understand what is working, where your leads come from, and how to improve your website performance over time.
