Validate, generate, and test GA4 & Universal Analytics ecommerce events. This tool helps marketers, analysts, and developers ensure their ecommerce tracking is accurate and complete.
Paste your full `dataLayer.push` or ecommerce event JSON object here to check for required fields and correct data types.
Enhanced Ecommerce is a feature in Google Analytics that allows you to get detailed insights into the shopping behavior of your users. It goes beyond standard pageviews and transactions to track the entire customer journey, including product impressions, clicks, viewing product details, adding to a cart, initiating the checkout process, and completing a purchase.
The core difference is the data model. Universal Analytics used a complex set of "actions" (like 'detail', 'add', 'checkout', 'purchase'). GA4 simplifies this into a more flexible, event-based model with recommended event names like `view_item`, `add_to_cart`, and `purchase`.
GA4's `items` array is also flatter and uses slightly different parameter names (e.g., `item_id` instead of `id`, `item_name` instead of `name`). This tool focuses on generating snippets for the modern GA4 standard.
For a GA4 `purchase` event, the following fields are required for accurate reporting:
While other fields like `price` and `quantity` for each item are not strictly required, they are essential for meaningful analysis.