In this guide: How to set up Google Analytics 4 on WordPress: create a GA4 property, add the tag with a plugin or code, configure key events, and the reports to check weekly.
If you don’t measure your website, you’re guessing. Google Analytics 4 (GA4) is free and tells you who visits your site, where they come from, what they do, and which pages lead to results like signups or sales.
Here’s how to set it up on WordPress and start using it properly.
Why GA4 matters
GA4 answers questions like:
- How many people visit my site each week?
- Which channels bring the most visitors — Google, social, email, ads?
- Which pages are most popular?
- Which content leads to newsletter signups, contact form submissions, or purchases?
- Which devices and countries do visitors use?
GA4 is event-based: every interaction — page views, scrolls, clicks, form submissions, purchases — is tracked as an event. You choose which events count as key events (formerly “conversions”).
Creating your GA4 property
- Go to analytics.google.com and sign in with your Google account.
- Click Admin → Create → Account (if you don’t have one) and name it after your business.
- Create a property: enter your website name, reporting time zone, and currency.
- Fill in business details (industry, size, goals).
- Choose “Web” as your platform and create a data stream with your website URL.
- Keep Enhanced measurement turned on — it automatically tracks page views, scrolls, outbound clicks, site search, video engagement, and file downloads.
- Copy your Measurement ID (it starts with
G-).
Adding GA4 to WordPress
Choose one method — never add the tag twice.
Option 1 — Google Site Kit (official plugin)
- Install and activate Site Kit by Google.
- Follow the setup wizard and sign in with Google.
- Connect Analytics (and Search Console while you’re there).
- Site Kit adds the tag and shows key stats in your dashboard.
Option 2 — Your SEO or analytics plugin
Many SEO plugins and analytics plugins (like MonsterInsights or similar) let you paste your Measurement ID.
Option 3 — Google Tag Manager
Best for advanced tracking and multiple marketing tags. Install GTM, then add a GA4 tag inside it.
Option 4 — Add the code manually
Paste the Google tag snippet into your theme’s <head> using a code snippets plugin or your child theme. Theme updates won’t remove it if done correctly.
Verify it works: open your site in another browser and check Reports → Realtime in GA4. You should see yourself as an active user within a minute.
Privacy: if you have visitors from regions with strict privacy laws, use a consent banner and consider Google’s Consent Mode. See Privacy Policy and Cookie Consent.
Setting up key events
Page views alone don’t tell you if your site works. Mark the actions that matter as key events:
- Contact form submissions — track a thank-you page view (for example,
/thank-you/) or a form submission event from your form plugin. - Newsletter signups.
- Purchases (WooCommerce and other stores can send ecommerce events via plugins or GTM).
- Clicks on phone numbers or WhatsApp buttons.
- Affiliate link clicks — see How to Track Affiliate Links.
How to mark an event as a key event:
- Go to Admin → Events (or Data display → Events).
- Find the event (it must have fired at least once).
- Toggle Mark as key event.
You can also create custom events based on existing ones — for example, a generate_lead event when page_location contains /thank-you/.
Also: link GA4 with Google Search Console (Admin → Product links) to see search queries alongside behavior data, and set data retention to the maximum available.
Reports you should check weekly
Spend 10 minutes each week on:
- Reports → Acquisition → Traffic acquisition: which channels bring visitors and key events.
- Reports → Engagement → Pages and screens: your most viewed pages and engagement time.
- Key events report: how many signups, leads, or sales happened.
- Landing pages: which pages people enter on — and which convert.
- Tech → Devices: mobile vs desktop split (and whether mobile users convert worse).
Use UTM parameters on campaign links (email, social, ads) to know exactly which campaign sent each visitor — see UTM Parameters.
FAQ
Why does GA4 show fewer users than my hosting stats?
Ad blockers, consent choices, and bots filtered from GA4 cause differences. Server logs count everything, including bots.
How long until data shows?
Realtime works within minutes; standard reports can take 24–48 hours.
Further reading: official WordPress documentation
Key Takeaways: Google Analytics 4
- GA4 is free, event-based, and essential for measuring growth.
- Add it with Site Kit, a plugin, Tag Manager, or code — only once.
- Mark signups, leads, and purchases as key events.
- Check acquisition, pages, and key events weekly.

