Wire the GA4 Google Tag
GTM → Tags → New → Google Tag. Paste your G-XXXXXXXXXX. Trigger: Initialization — All Pages. Save.
That single tag gives you automatic page_view + session_start + first_visit. You don't need a separate config tag.
From a blank GTM container to a verified GA4 purchase event with full ecommerce items — dataLayer push, variables, trigger, GA4 Event tag, DebugView verification.
GTM → Tags → New → Google Tag. Paste your G-XXXXXXXXXX. Trigger: Initialization — All Pages. Save.
That single tag gives you automatic page_view + session_start + first_visit. You don't need a separate config tag.
On the order confirmation page, push the GA4-spec purchase event into the dataLayer. The shape matters — Google reads exact key names.
<script>
window.dataLayer = window.dataLayer || [];
window.dataLayer.push({ ecommerce: null });
window.dataLayer.push({
event: "purchase",
ecommerce: {
transaction_id: "ORD-12345",
value: 89.50,
currency: "GBP",
tax: 14.92,
shipping: 4.99,
coupon: "SUMMER10",
items: [
{
item_id: "SKU_001",
item_name: "Resistance Bands",
item_brand: "Trevill",
item_category: "Fitness",
price: 29.00,
quantity: 1
}
]
}
});
</script>Trigger: Custom Event, event name purchase. Variables: nothing extra needed — the GA4 Event tag reads the ecommerce object straight from the dataLayer.
Tags → New → Google Analytics: GA4 Event. Measurement ID: your G-XXXXXXXXXX. Event Name: purchase. Open More Settings → Ecommerce and tick Send Ecommerce data, Data Source: Data Layer. Trigger: CE – purchase.
GA4 → Admin → DebugView. In another tab, hit Preview in GTM and complete a test purchase. Within 30s you should see purchase in the DebugView stream with value, currency, items populated. Click the event → Items tab — check each item_id and price.
GA4 → Admin → Events. Find purchase and toggle Mark as key event. It now shows in Monetisation → Ecommerce purchases (24h delay), and can be imported into Google Ads as a conversion.