48h Store Diagnosis (€99) - store-specific UX/CRO report + 1h consultation
E-COMMERCE ANALYTICS • GA4, GTM & DATA LAYER

GA4 + GTM + Data Layer in E-commerce: Complete Funnel and Micro-Conversion Tracking Plan

Without reliable measurement, CRO turns into guesswork and Google Ads or Meta Ads algorithms optimise on corrupted signals. Instead of stacking random “one-click GA4” plugins, you need one clean tracking plan: 12 Data Layer events, properly ordered GTM and Consent Mode v2, and a repeatable verification routine. Here is the complete blueprint alongside five real tracking defects we catch in audits.

Author: Dawid Śliwiński / / Analytics Engineering (GA4 / GTM) • PUSH
⏱ 10 min read with event spec

Store owners often tell us: “GA4 is installed, the plugin tracks everything automatically.” Then we open Tag Assistant and browser DevTools Network tab and discover either zero GA4 hits firing at all, one page view firing four times, purchase events missing items or mixing VAT rules, or ad tags firing before the Consent Mode v2 default state.

In an earlier guide we covered 6 tracking errors that distort ROAS in GA4. This playbook goes one step further: a complete Measurement Plan for e-commerce - the 12 Data Layer events (including search, filter and variant micro-conversions), five live audit measurements showing what breaks in production, and a 30-minute QA checklist.

“Do not track 60 random events that nobody ever opens. Track 12 clean, consistent funnel and micro-conversion events where every single one answers a real commercial or CRO question.”

- PUSH GA4 / GTM Implementation Standard

Want to test your current setup while reading? Open our free GA4 configuration auditor in another tab.

MEASUREMENT PLAN • 12 DATA LAYER EVENTS

12 Data Layer events that actually guide CRO decisions (implementation table)

Default GA4 e-commerce tracking only covers core steps from product page to checkout. For practical CRO, it leaves a blind spot at the top of the funnel: which filters buyers use, what they search for (and when they hit zero results), and whether they interact with variants before hitting “Add to cart”.

Stage / eventTriggerKey parametersCRO decision unlocked
1. view_item_listCategory grid or search results rendereditem_list_name, items[]Which categories attract traffic but fail to drive clicks.
2. view_search_resultsSite search results displayedsearch_term, results_countMissing catalogue items and zero-result queries.
3. filter_apply (custom)Filter or sort control appliedfilter_name, filter_valueWhich facets convert vs which clutter the sidebar.
4. select_itemProduct tile clicked on a listingitem_list_name, index, items[0]Listing tile CTR by position and category.
5. view_itemProduct detail page (PDP) viewedcurrency, value, items[0]Baseline for PDP-to-cart rate per SKU/category.
6. select_variant (custom)Size, colour or trim option clickedvariant_type, variant_value, in_stockHow often buyers click out-of-stock sizes.
7. add_to_cartItem confirmed added to cart (post-validation)currency, value, items[]Buy-box and PDP persuasion effectiveness.
8. view_cartCart page or slide-out drawer openedcurrency, value, items[]How many shoppers use cart as a shipping calculator.
9. begin_checkoutFirst checkout screen loadedcurrency, value, coupon, items[]Cart-to-checkout drop (login wall, surprise costs).
10. add_shipping_infoDelivery method selected and step submittedshipping_tier, value, items[]Locker vs courier split and address validation friction.
11. add_payment_infoPayment method selected before placing orderpayment_type, value, items[]Express wallet share and payment gateway drop-off.
12. purchaseConfirmed order (strictly deduplicated)transaction_id, value, tax, shipping, items[]True revenue and ROAS aligned with Ads platforms.

One non-negotiable engineering rule: before every new e-commerce push to window.dataLayer, clear the previous object with dataLayer.push({ ecommerce: null });. Skipping this causes GTM to merge stale product arrays from earlier events and inflate cart values.

Three Data Layer pitfalls that quietly corrupt GA4 reports:
  • Inconsistent value definition: agree once across teams whether value in purchase equals gross item revenue excluding shipping, and keep that rule identical across GA4, Google Ads and Meta CAPI.
  • Firing add_to_cart on button click instead of server/cart success: if a buyer clicks “Add to cart” without picking a size and sees a validation warning, never count that as an add-to-cart.
  • Refiring purchase when a buyer reloads the thank-you page: flag each order server-side so dataLayer prints purchase strictly once per transaction_id.
ERRORS #1 & #2: ZERO GA4 SIGNALS OR GTM LOADED TOO LATE

0 GA4 signals firing or GTM buried at the bottom of the page

It sounds basic, yet live audits regularly catch two extremes. First (panel ANL-01 below): zero signals reaching Google Analytics 4 - commonly caused by a cookie plugin update that hard-blocked the entire container instead of firing cookieless Consent Mode v2 pings, or a theme deployment that dropped the tag snippet.

Second (panel ANL-02 in the next section): Google Tag Manager is installed, but injected too low in the HTML (near </body> instead of high in <head>). On fast office Wi-Fi nobody notices; on mobile cellular networks, ad clickers tap into a category or bounce before the browser reaches the footer, erasing entire segments of fast sessions.

Correct script loading order in <head>:
  • 1. Initialise dataLayer and Consent Mode v2 default state (gtag('consent', 'default', ...)): at the very top of <head> before GTM loads.
  • 2. Load your CMP (cookie banner) script: include wait_for_update: 500 for returning visitors with stored preferences.
  • 3. Load GTM (gtm.js): high inside <head>, with the <noscript> fallback immediately after the opening <body> tag.
Audit panel ANL-01 recording 0 Google Analytics 4 signals sent during a storefront visit
Real audit measurement (beauty store, desktop): Panel ANL-01 detected 0 signals reaching Google Analytics 4 - the storefront was flying completely blind.
ERROR #3: LATE GTM & STACKED TAG ARCHAEOLOGY

GTM injected too low and GA4 loaded 6 times per visit

The opposite of zero tracking is “agency archaeology”: one vendor hardcoded gtag.js into the template, the store owner enabled the platform’s native GA4 integration, and another team added a Google Tag plus a manual page_view tag inside GTM.

Below is panel ANL-02 from an interior decor store (GTM placed outside the top of the document), followed in the next chapter by panel ANL-03 from an accessories store where GA4 code loaded 6 times and a single visit fired 4 page_view signals to the exact same Measurement ID. Bounce rate drops artificially near zero, session counts distort and conversion rates become unusable.

Single source of truth for tag ownership:
  • Route all tags through GTM (or 100% through one clean integration): never run the platform’s built-in “GA4 ID” box alongside a GTM Google Tag.
  • One Google Tag with automatic page_view: do not attach a second manual page_view event on All Pages unless you intentionally disabled send_page_view.
  • Audit page source after every platform or agency handover: search raw HTML and DevTools Network for G-, GTM- and gtag/js - exactly one clean pipeline should fire.
Audit panel ANL-02 flagging Google Tag Manager script placed too low outside the top of the document
Real audit measurement (home decor store, desktop): Panel ANL-02 caught the GTM container placed below the upper document head, delaying measurement and losing fast mobile sessions.
PRODUCT DATA LAYER • SCHEMA.ORG

Why we audit Product Schema.org alongside GA4 Data Layer

Whenever we implement a clean GA4 Data Layer, we audit the product page’s JSON-LD Product schema in the same pass. Both read the exact same database fields (SKU, name, variant, gross price, currency, stock, ratings). In audit panel ANL-07 below, the sports store sent valid price and stock markup to Google, yet omitted AggregateRating - even though the visible PDP showed a 4.9 star average.

Aligning your Data Layer, Product JSON-LD and Google Merchant Center feed ensures analytics, organic rich snippets, AI shopping assistants and Shopping Ads all read one consistent set of numbers.

Minimum Product JSON-LD fields to align with your Data Layer:
  • name, sku, gtin (EAN) and brand: matched to item_id in GA4 and your Merchant Center product feed.
  • offers: accurate gross price, ISO currency (EUR/PLN) and live stock state (InStock / OutOfStock).
  • aggregateRating (conditional only): never output empty markup with ratingCount: 0 - emit it only once a product has genuine verified reviews.
Audit panel ANL-07 flagging missing product ratings AggregateRating in Schema.org structured data
Real audit measurement (sports store, desktop): Panel ANL-07 highlights missing product ratings (AggregateRating) in Schema.org markup despite visible customer reviews on the PDP.

Frequently asked questions

Is Server-Side GTM (sGTM) worth setting up for an online store?

Server-Side GTM pays off once you run meaningful Google Ads and Meta Ads spend: it improves signal quality for Meta CAPI and Google Enhanced Conversions, cuts client-side script weight and gives full control over outbound payloads. However, you must fix your client-side Data Layer first - sGTM cannot repair missing or duplicated events at the source.

Why does GA4 revenue never match our e-commerce backend 100%?

Gaps come from shoppers declining analytics cookies, strict ad-blockers / Safari ITP and buyers closing the browser tab after bank authentication before returning to the thank-you page. A healthy setup should still capture consented orders accurately without double counting and with exact basket values.

How can we measure site search and filters in GA4 if our store does not track them yet?

Basic view_search_results can be enabled under GA4 Enhanced Measurement using your URL query parameter (e.g. s or q). To capture zero-result counts (results_count = 0), filter interactions and variant clicks, push lightweight custom Data Layer events (filter_apply, select_variant) and register their parameters as custom dimensions in GA4.

How do we fix duplicate page_view or purchase events in GA4?

Map every source injecting GA4 scripts (theme header, e-commerce plugins, SEO plugins, GTM container). Keep strictly one owner - ideally GTM fed by a clean Data Layer - and disable every secondary plugin sending direct GA4 hits.

Contact

Book a free 15-minute consultation.

Fill in the form. Dawid Śliwiński (Co-founder of PUSH) will analyse your store and get back to you within 24 hours with an actionable plan.

“Instead of hunting for random freelancers for every fix, we handed them full control over technology and campaigns. The store finally runs without issues, our customer acquisition costs dropped drastically, and we can focus solely on logistics and order fulfilment.”

Martyna - Co-owner, Rolexpress.pl

    Data Controller: Push Agency Dawid Śliwiński (ul. Łagodna 4B, 63-004 Gowarzewo, Poland, VAT ID: PL6972347119, REGON: 380136618). Data is processed to handle your inquiry and deliver a proposal. You may access, rectify, erase your data, or withdraw consent at any time.