Hi,
I would like to trigger the GA4 “purchase” event through Piwik PRO TMS.
We use the Piwik PRO order_confirmation datalayer.
I created 1 datalayer variable per element.
And bellow event I would like to push:
<script>
gtag("event", "purchase", {
transaction_id: {{ DLV | Ecommerce | order_id }},
value: {{ DLV | Ecommerce | grand_total }},
currency: "EUR",
items: [
{
item_id: {{ DLV | Ecommerce | product.sku }},
item_name: {{ DLV | Ecommerce | product.name }},
item_category: {{ DLV | Ecommerce | product.catagory }},
price: {{ DLV | Ecommerce | product.price }},
quantity: {{ DLV | Ecommerce | product.quantity }},
}]
});
</script>
Make it sense?
If I have several products in my purchase, is it going to automatically add more item?
Many thanks,