GA4 eCommerce gives you the full sales funnel. Here is how to set it up through Google Tag Manager.
The steps
- Create a GA4 property in Google Analytics
- Create a GTM container and install it on the site
- Push the data layer for each event
- Build the GTM tags, triggers and variables
- Verify in GA4 DebugView
Data layer events
view_item (product view)
dataLayer.push({
event: 'view_item',
ecommerce: {
currency: 'UAH',
value: 1500,
items: [{
item_id: 'SKU-001',
item_name: 'Product name',
price: 1500,
quantity: 1
}]
}
});
purchase
dataLayer.push({
event: 'purchase',
ecommerce: {
transaction_id: 'ORDER-123',
value: 1500,
currency: 'UAH',
items: [{ item_id: 'SKU-001', price: 1500, quantity: 1 }]
}
});
GTM configuration
Tag: GA4 Event → Event Name: {{DLV - event}} → the ecommerce parameters.
Trigger: Custom Event → event name matches RegEx: view_item|add_to_cart|purchase
Want this set up? GA4 for OpenCart or GA4 for WordPress.