If you do not know where your visitors come from or what they do on your site, you are making marketing decisions in the dark. Google Analytics 4 is free and gives you that visibility. Adding it to WordPress is easier than most people think.
In this guide we will show you how to set up Google Analytics 4 on WordPress using three easy methods, then how to check that it works.
Step 1: Create a GA4 Property
- Go to analytics.google.com and sign in with your Google account.
- Click Admin, then Create, then Property.
- Enter your property name, time zone, and currency.
- Add your business details and goals.
- Choose Web as your platform, enter your website URL, and name the stream.
- Copy your Measurement ID, which starts with G-.
Keep Enhanced measurement turned on. It tracks scrolls, outbound clicks, file downloads, and more automatically.
Method 1: Site Kit by Google (Easiest)
Site Kit is Google’s official WordPress plugin. It connects Analytics, Search Console, and other Google tools without touching code.
- In WordPress, go to Plugins, Add New, search for Site Kit by Google, then install and activate.
- Click Start setup and sign in with the Google account that owns your GA4 property.
- Grant the requested permissions.
- Choose your existing GA4 property, or let Site Kit create one.
- Finish setup. Site Kit adds the tracking code for you and shows basic stats in your dashboard.

Method 2: Add the Code With a Header Plugin
If you prefer a lightweight setup:
- In GA4, open Admin, Data streams, your stream, then View tag instructions and choose Install manually.
- Copy the Google tag code snippet.
- Install a code snippets plugin such as WPCode.
- Paste the snippet into the site wide header section and save.
Avoid pasting code directly into your theme’s files; it can disappear when the theme updates.
Method 3: Google Tag Manager
Tag Manager is best if you plan to add many tracking tags, such as ads pixels and custom events.
- Create a Tag Manager account and container at tagmanager.google.com.
- Add the container code to WordPress with a plugin like WPCode or a dedicated Tag Manager plugin.
- In Tag Manager, create a Google tag using your G- Measurement ID, set it to fire on all pages, and publish.
Which Method Should You Use?
| Method | Best for |
|---|---|
| Site Kit | Beginners who want stats inside WordPress |
| Header plugin | Simple, lightweight setup |
| Tag Manager | Sites with many tags or custom tracking |
Use only one method. Installing GA4 twice will double count your visits.
Step 2: Check That Tracking Works
- Open your website in another browser tab.
- In GA4, go to Reports, Realtime. You should see yourself as an active user within a minute or two.
- For deeper testing, use DebugView with the Tag Assistant tool.
Step 3: Finish the Essentials
- Set up conversions: track form submissions and purchases. See how to track conversions in Google Analytics 4.
- Link Search Console in GA4 Admin to see search queries next to your analytics data.
- Update your privacy policy to mention Google Analytics. Our guide on how to create a privacy policy for a small business website explains what to include.
- Consider cookie consent if you have visitors from regions that require it.
Once data is flowing, start with simple metrics like users, engagement rate, and bounce rate; see what is bounce rate and how to reduce it.
Frequently Asked Questions
Is Google Analytics 4 free?
Yes. The standard version of GA4 is free for most websites.
How long until data appears in GA4?
Realtime data appears within minutes. Standard reports can take 24 to 48 hours.
Can I use Site Kit and a header plugin together?
No. Use one method only, or your traffic will be counted twice.
Will GA4 slow down my WordPress site?
The impact is small for most sites. Loading it once through a single method keeps it light.
Final Thoughts
Now you know how to set up Google Analytics 4 on WordPress: create a property, install it with Site Kit, a header plugin, or Tag Manager, test with Realtime, and add conversions. With analytics in place, every marketing decision gets easier.


