SEO & AI

How to set up Google Analytics 4 (GA4) correctly on WordPress

GA4's event-based model is structurally different from the old Universal Analytics, and a lot of 'my numbers look wrong' complaints trace back to setup mistakes carried over from that older mental model rather than anything actually broken.

V Vinod Kulkarni
26 September 2026 · 8 min read
How to set up Google Analytics 4 (GA4) correctly on WordPress

How to set up Google Analytics 4 (GA4) correctly on WordPress

TL;DR: GA4 is built around a fundamentally different data model than the older Universal Analytics it replaced, everything is an "event" (a page view, a scroll, a click, a purchase) rather than the older, more rigid pageview-and-session structure, and a lot of confusing "my GA4 numbers don't match what I expect" complaints trace back to applying old Universal Analytics mental models and habits to a genuinely different system rather than anything actually broken in the setup itself. Correct setup involves creating a GA4 property, installing the tracking code correctly (directly or via Google Tag Manager), configuring key events (especially ecommerce purchase tracking for a WooCommerce store), and setting up conversions and, ideally, connecting to Search Console for a fuller picture.

Why GA4 confuses people coming from Universal Analytics

Universal Analytics, the older Google Analytics version GA4 has fully replaced, was built around a session-and-pageview-centric model, with specific, separate configuration needed for anything beyond basic page tracking (goals, events, ecommerce tracking each configured somewhat independently). GA4 instead treats essentially everything as a single, unified concept, an "event," with a page view itself simply being one specific type of event among many, alongside scrolls, clicks, video engagement, and custom events you define yourself, all captured within the same underlying, more flexible data model. This is a genuinely different way of thinking about analytics data, and someone bringing over specific habits, terminology, or expectations from Universal Analytics without adjusting to GA4's actual, different model is a common, well-documented source of confusion and setup mistakes, more than any inherent flaw in GA4 itself.

Step 1: creating your GA4 property correctly

Within your Google Analytics account, creating a new GA4 property (distinct from any legacy Universal Analytics property that may still exist from before the transition, since these are fundamentally separate systems rather than one being an upgrade path automatically carrying over configuration from the other) involves specifying your business details, industry category, and reporting time zone, worth setting the correct time zone specifically to match your actual business location for accurate time-based reporting, and creating a "data stream" specifically for your website (GA4 also supports app data streams, relevant only if you also have a mobile app), which generates the specific Measurement ID (G-XXXXXXX format) you will need for the actual tracking code installation.

Step 2: installing the tracking code

There are two common, valid approaches for installing GA4 tracking on a WordPress site. Direct installation via a dedicated WordPress plugin (several reputable analytics plugins simplify this, letting you simply enter your Measurement ID without needing to manually edit theme code) is the more straightforward path for most site owners. Installation via Google Tag Manager, a separate tag management system that itself gets installed once on your site and then lets you manage GA4 and any other tracking tags (conversion pixels, other analytics tools) through Tag Manager's own interface without needing to directly edit your site's code for each individual tag added later, is the more flexible, scalable approach particularly valuable if you anticipate needing multiple tracking tags over time or want more granular control over exactly when and under what conditions specific tracking fires.

For a straightforward site with GA4 as your only tracking need, direct plugin installation is simpler; for a site anticipating broader, ongoing tracking and marketing tag needs, setting up Google Tag Manager from the start, even just for GA4 initially, provides a more scalable foundation for whatever additional tracking needs arise later.

Step 3: configuring key events

GA4 automatically tracks certain events by default (including basic page views and some engagement signals), but genuinely meaningful business tracking, a form submission, a specific button click representing a meaningful action, a newsletter signup, generally requires explicitly configuring these as tracked events, either through Tag Manager's event configuration (if using that approach) or via specific plugin settings if using a direct-installation analytics plugin that supports custom event configuration. Marking specific events as "key events" (GA4's current terminology for what Universal Analytics called "goals") within the GA4 interface itself allows these specific, business-meaningful actions to be tracked and reported on with particular visibility and importance in your reporting, distinct from GA4's broader, more general automatic event tracking.

Flowchart showing the GA4 setup sequence: create property, install tracking code via plugin or Tag Manager, configure key events specific to your business goals, set up WooCommerce ecommerce tracking if applicable, connect Search Console for combined reporting

Step 4: WooCommerce enhanced ecommerce tracking

For a WooCommerce store specifically, properly configuring GA4's enhanced ecommerce tracking, capturing product views, add-to-cart actions, checkout initiation, and completed purchases as specific, structured events, provides considerably more valuable, actionable data than basic page-view tracking alone, directly supporting analysis of exactly where in your funnel customers are dropping off, directly relevant to the friction points covered in our cart abandonment guide. This is generally configured either through a dedicated WooCommerce-GA4 integration plugin (several exist specifically designed to correctly map WooCommerce's own events to GA4's expected ecommerce event structure) or through custom Tag Manager configuration if using that approach, since WooCommerce's default behavior does not automatically send properly structured ecommerce events to GA4 without this specific, additional configuration step.

Step 5: connecting Search Console

Linking your GA4 property to Google Search Console (a straightforward configuration option within GA4's own admin settings) allows viewing certain Search Console data, organic search queries and performance, directly alongside your GA4 analytics data, providing a more complete, combined picture of how visitors find your site through organic search and what they subsequently do once they arrive, without needing to check two entirely separate tools independently for related insights.

Common setup mistakes

Not filtering out internal/development traffic. Without excluding your own team's visits (and any staging or development environment traffic, covered in our dedicated staging guide) from your GA4 data, your reported numbers are meaningfully inflated and distorted by non-genuine-visitor activity, worth setting up an internal traffic exclusion filter based on IP address or another reliable identifier early in your setup process. Forgetting to configure WooCommerce ecommerce tracking specifically, leaving a store with only basic page-view data and no actual purchase or funnel-stage tracking, a significant, avoidable gap for a business that should be actively analyzing its actual sales funnel performance. Not setting key events for genuinely important actions, relying purely on GA4's default automatic tracking without deliberately marking the specific actions that actually matter to your business as key events, missing the more focused, prioritized reporting visibility that proper key event configuration provides. Applying Universal Analytics habits and expectations without adjusting, expecting specific metrics or report structures to work identically to the older system, leading to confusion when GA4's genuinely different data model produces different-looking numbers or requires a different report to find equivalent information.

A setup checklist

Step What to confirm
GA4 property created with correct time zone/business details Not confused with a legacy Universal Analytics property
Tracking code installed (plugin or Tag Manager) Verify actual data is flowing in GA4's real-time report
Internal traffic excluded Your own team's visits not inflating reported numbers
Key events configured for genuinely important actions Not relying solely on default automatic event tracking
WooCommerce ecommerce tracking configured (if applicable) Purchase and funnel-stage events properly structured
Search Console connected Combined organic search and analytics reporting available

FAQs

Does GA4 track visitors the same way Universal Analytics did?

No, the underlying data model and many specific tracking mechanics genuinely differ, which is precisely why numbers and available reports can look meaningfully different between the two systems even for the same underlying traffic, rather than indicating a setup problem specifically.

Do I need Google Tag Manager, or is direct plugin installation sufficient?

For a straightforward site with GA4 as your only current or anticipated tracking need, direct plugin installation is sufficient and simpler; Tag Manager becomes more valuable specifically as your tracking needs grow to include multiple tags or more complex, conditional tracking logic beyond what a simple analytics plugin's own settings typically support.

How do I know if my GA4 tracking is actually working correctly after setup?

GA4's Real-Time report shows current, active visitor activity within a few minutes of a genuine visit, a quick, direct way to confirm tracking is actually firing correctly immediately after setup, before waiting for longer-term historical reporting to accumulate and confirm the same thing less immediately.

GA4 itself does not automatically enforce cookie consent; you need to implement this separately, typically through Google's Consent Mode integration (allowing GA4 to adjust its behavior based on a visitor's actual consent status) combined with a properly configured cookie consent solution, covered in our dedicated DPDP cookie consent guide, since GA4 setup and cookie consent compliance are related but genuinely separate configuration concerns both requiring deliberate attention.

Can I see historical Universal Analytics data within my new GA4 property?

No, GA4 and Universal Analytics are separate systems with separate, non-combined historical data; if you need to reference older Universal Analytics historical data, you generally need to access it separately from wherever your prior Universal Analytics data was exported or archived, rather than expecting it to appear within your GA4 property's own historical reporting.

Does GA4 provide the same level of detail for a small site as it does for a large one?

Yes, the same underlying tracking and reporting capability applies regardless of site size, though GA4's specific machine-learning-based predictive metrics and certain advanced reporting features generally require a meaningful volume of data to produce statistically meaningful results, meaning some of GA4's more advanced features are less immediately useful for a very low-traffic site simply due to insufficient data volume rather than any inherent limitation for smaller sites specifically.

Should I set up GA4 myself, or is this something to delegate to a developer or agency?

Basic GA4 setup (property creation, tracking code installation via a plugin) is genuinely accessible for a non-technical site owner to handle directly; more advanced configuration (Tag Manager-based setups, custom event tracking, WooCommerce enhanced ecommerce configuration) benefits from more technical involvement, worth weighing your own comfort level against the complexity of your specific, intended tracking needs.

Conclusion

GA4's event-based data model is a genuine, structural departure from the older Universal Analytics system, and correctly setting it up means understanding and working with that different model rather than applying old habits and expectations to a system that behaves meaningfully differently. Correct setup covers property creation, proper tracking code installation, deliberate key event configuration for your genuinely important business actions, and, for a WooCommerce store specifically, properly configured enhanced ecommerce tracking, none of which happen fully automatically without deliberate configuration.

Excluding internal traffic and connecting Search Console are two commonly overlooked steps worth including from the start, since both directly affect the accuracy and usefulness of the data you ultimately rely on for genuine business decisions.

HostCloud's hosting and our free analytics setup guide can help you verify your GA4 tracking is correctly configured and firing as expected, particularly for WooCommerce-specific ecommerce event tracking. See our tools at https://hostcloud.in/tools.

Related posts