GA4 Ecommerce dataLayer Validator

Paste a dataLayer.push() call and check it against GA4's ecommerce event schema: event name, currency, value, items and more.

Describe the result you need. AI will set up the tool and ask for any missing details.

Configure with AI

Enter to submit · Shift + Enter for a new line

Sent to AI. Leave out passwords and private customer data.

Event
purchase
Items
1
Errors
0
Warnings
0
  • Event name "purchase" is a standard GA4 ecommerce event
  • Currency: USD
  • Value: 72.05
  • 1 item in the items array

Parsed object

{ "event": "purchase", "ecommerce": { "transaction_id": "T_12345", "value": 72.05, "tax": 3.6, "shipping": 5.99, "currency": "USD", "coupon": "SUMMER_SALE", "items": [ { "item_id": "SKU_12345", "item_name": "Stan and Friends Tee", "price": 10.01, "quantity": 3, "item_brand": "Google", "item_category": "Apparel" } ] } }

What gets checked

  • Event name: whether it's one of GA4's standard ecommerce events (purchase, add_to_cart, view_item and so on). A non-standard name still gets collected, just not in GA4's built-in ecommerce reports.
  • currency and value: a valid 3-letter currency code, and a numeric value. Both are required for purchase, refund, begin_checkout, add_shipping_info, add_payment_info, view_item, add_to_cart and remove_from_cart.
  • items array: at least one item, each with an identifier (item_id or item_name), a numeric price, and a numeric quantity when it's included.
  • transaction_id: required specifically for purchase and refund, so GA4 can de-duplicate the event.

It accepts either shape: a full dataLayer.push({ event: ..., ecommerce: {...} }) call (Google Tag Manager's convention), or a flat gtag-style object. Paste whichever one your setup actually sends.

The "clear the ecommerce object" push

Google's own guidance is to push dataLayer.push({ ecommerce: null }) right before every new ecommerce event. The dataLayer merges new pushes into existing ones by default, so without that reset, a field from a previous event (like a stale transaction_id) can silently leak into the next one.

Questions people ask

Does this connect to my GA4 property?

No, it only checks the structure of the object you paste against GA4's documented schema, entirely in your browser.

My object uses single quotes and unquoted keys, will it still work?

The tool tries a looser parse (converting single quotes and unquoted keys) if strict JSON parsing fails, but it can't fix every possible JavaScript syntax. Paste valid JSON when you can.

Why does it say my event name isn't standard, even though it works in GA4?

GA4 collects any event you send, but only the documented ecommerce event names populate the built-in ecommerce reports (Monetization, in the Reports section). A custom name still shows up as a regular event.

Do I need every optional item field, like item_brand or item_category?

No, those are recommended, not required. This tool only flags a missing identifier, price or quantity as an error; the rest are just extra detail GA4 can use.

Want this builtinto your store?

I'm Emmanuel, a Shopify and WooCommerce developer. If this tool pointed at something you'd rather have fixed for you (a faster store, cleaner product data, a migration, a custom feature), send me a note.

Emmanuel Asika

Emmanuel Asika

Shopify & WooCommerce developer, Dublin

I build and fix online stores: new builds, migrations, speed, SEO and the custom bits apps can't do.

hello@emmanuelasika.com

Last reviewed 30 September 2026.

Sources: Google Analytics Developer Docs: Measure ecommerce (GA4)