I've implemented enhanced ecommerce tracking in Google UA by populating the dataLayer with as far as I can see the correct data.
Here is the html of the actual datalayer script:
<script type="text/javascript">
dataLayer.push({
'ecommerce': {
'purchase': {
'actionField': {
'id': 'ZW10317808', // Transaction ID. Required for purchases and refunds.
'affiliation': 'Online Store',
'revenue': '9.95', // Total transaction value (incl. tax and shipping)
'tax':'0.00',
'shipping': '0.00',
'coupon': '',
'products': [
{
'name': 'Test product', // Name or ID is required.
'id': 'ZCMNR010',
'price': '9.95',
'brand': 'Brand',
'category': '',
'variant': '',
'quantity': 1
//, 'coupon': '' // Optional fields may be omitted or set to empty string.
}
]
}
}
}
});
</script>
And here is a sample output from the console so it appears (to me) that the values are all making to the dataLayer:
dataLayer
[
0: {
[functions]: ,
__proto__: { },
ecommerce: {
[functions]: ,
__proto__: { },
purchase: {
[functions]: ,
__proto__: { },
actionField: {
[functions]: ,
__proto__: { },
action: "purchase",
affiliation: "Online Store",
coupon: "",
id: "ZW10317808",
products: [
0: {
[functions]: ,
__proto__: { },
brand: "Brand",
category: "",
id: "ZCMNR010",
name: "Test Product",
price: "9.95",
quantity: 1,
variant: ""
},
length: 1
],
revenue: "9.95",
shipping: "0.00",
tax: "0.00"
}
}
}
},
1: {
[functions]: ,
__proto__: { },
event: "gtm.js",
gtm.start: 1408351886007
},
2: {
[functions]: ,
__proto__: { },
ecommerce: {
[functions]: ,
__proto__: { },
checkout: {
[functions]: ,
__proto__: { },
actionField: {
[functions]: ,
__proto__: { },
step: "Order Confirmation"
}
}
},
event: "checkout"
},
3: {
[functions]: ,
__proto__: {
[functions]: ,
__proto__: null
},
event: "gtm.dom"
},
4: { },
length: 5
]
The transaction is listed in UA but with 0.00 revenue, 0 items, etc. This transaction was from last week so unlikely to be data latency.
Also the checkout step tracking isnt showing in the reports either. I've enabled the enhanced tracking in the GA view and deployed the plugin view the setting in GTM.
I'm scratching my head. Hopefully a fresh pair of eyes can spot something obvious.
Thanks if you can help.
Thanks