Need to set up google analytics 4 on your WordPress site? You’re in the right place. By the end, you’ll know exactly how to add Google Analytics 4 to WordPress, verify data collection, and unlock deeper insights. Let’s walk through this step by step.
Gather Your Analytics Requirements
Before you dive in, let’s make sure you have everything you need. This avoids that awkward moment when you’re halfway through setup and missing a key piece.
- A Google Analytics account with Editor role
- A GA4 property and its Measurement ID (starts with “G-”)
- Admin access to your WordPress dashboard
- If you’re on WordPress.com, a Premium, Business, Commerce, or legacy Pro plan (Free and Personal plans require an upgrade)
Analytics Options Comparison
Option | Availability | Key Features |
---|---|---|
Jetpack Stats | All WordPress.com plans | Basic pageviews, referrers, simple trends |
Google Analytics 4 | WordPress.com Premium, Business, Commerce; WordPress.org sites | Event-based tracking, demographics, funnel reports, ecommerce |
Source: WordPress Support
Install Site Kit Plugin
If you run a self-hosted WordPress site, the easiest route is Google’s official Site Kit plugin. It handles authentication, tag insertion, and basic settings all in one.
- Go to Plugins › Add New in your dashboard
- Search for “Site Kit by Google”
- Click Install, then Activate
If you’re on WordPress.com Business, Premium, or Commerce, you can skip this plugin step. Just head to Settings › Traffic and paste your Measurement ID in the Analytics section.
Add GA4 Measurement ID
Now it’s time to connect your GA4 property to WordPress.
For Site Kit users
- In your dashboard, visit Site Kit › Settings › Connect More Services
- Click Connect next to Google Analytics
- Sign in with your Google account and allow permissions
- Select your GA4 property when prompted
For manual integration
- Copy your Measurement ID from Admin › Property › Data Streams › Web Stream Details
- Paste the tag or ID into your theme’s header.php before the closing
</head>
tag, or use your CMS’s custom HTML feature
After you add the tag, give it up to 30 minutes for data to appear.
Verify Tracking Is Working
Once the tag is live, head to your GA4 account’s Realtime report. Open your site in another tab, then click around and watch active users light up.
- In Google Analytics, go to Reports › Realtime
- Look for Active Users change as you browse
- Try an Incognito window to avoid skewing data
Seeing yourself in Realtime means tracking is working, congratulations.
Configure Advanced Tracking
GA4 uses an event-driven model to go beyond simple pageviews. Want to capture more than just visits?
- Enable Enhanced Measurement in your Web Stream settings to auto-track scrolls, outbound clicks, file downloads, and video engagement
- Set up User ID tracking under Admin › Property Settings › Reporting Identity to unify sessions across devices
- Mark key events as conversions (for example, form submissions or button clicks) under Configure › Conversions
- If you run a WooCommerce store, enable ecommerce tracking to get product views, cart activity, and purchase events
Analyze Data and Optimize
With tracking in place, you can dig into key metrics and turn insights into action. Your GA4 dashboard packs demographic, behavior, and conversion data right at your fingertips.
- Check Engagement › Overview for engaged sessions per user and average engagement time
- In Pages and Screens, click the pencil icon to add Bounce Rate as a metric
- Use Explorations › Funnel Exploration to map visitor journeys and spot drop-off points
- Explore Path Analysis to see how users navigate your site
While you’re here, you might also want to brush up on your search engine optimization for WordPress skills.
Review Key Takeaways
- Ensure you have the right plan, Google account, and Editor role
- Use Site Kit or paste your Measurement ID manually
- Allow up to 30 minutes for data to start flowing
- Verify setup in the Realtime report
- Turn on enhanced measurement, User ID, conversions, and ecommerce tracking
- Leverage engagement and funnel reports to refine your content and user experience
Ready to see your traffic come alive in GA4? Drop a comment below with your favorite metric or share this guide with a fellow site owner.