GA4 Ecommerce Data Layer Generator
Generate GTM-ready GA4 ecommerce data layer events for product views, carts, checkout, purchases, and refunds.
Generated GA4 Ecommerce Code
Use this data layer event on your website, then configure a GA4 Event tag in Google Tag Manager.
Ecommerce Event Preview
Review the main event details before implementing the data layer on your website.
Generate an ecommerce event to view its GA4 tracking summary.
Quick Presets
GA4 Ecommerce Best Practices
- Use the prescribed GA4 ecommerce event names whenever they match the customer action.
- Include an item ID or product name for every item in the items array.
- Use a unique transaction ID for each purchase to help avoid duplicate revenue.
- Clear the previous ecommerce object before pushing a new ecommerce event.
- Test events in GTM Preview mode and GA4 DebugView before publishing.