Following - I've tried creating my own datalayer push script but I can't figure out how to get it to fire correctly. If I get this right I'll let you know.
This is where I'm at but no joy yet. My syntax is definitely wrong, and I have no idea how to pass the variables I need without breaking the front end. Any help would be amazing.
<script>
dataLayer.push({
'event': ‘gtm.CompletedOrder’,
'ecommerce': {
'purchase': {
'actionField': {
'id': ‘{{orderNumber}}’,
'revenue': {{total}}, // Total transaction value (incl. tax and shipping)
'shipping': {{shipping_price}}
},
'products': [{
'name': '{{title}}',
'id': '{{id}}', // just a guess here.
'price': {{price}},
'variant': '{{prop_title}}',
'quantity': {{quantity}}
}] //not sure if passing an array like this will work - just a thought.
}
}
});
</script>