Hi.
I’m trying to send a custom dimension with a Ecommerce purchase.
But can’t get it to work.
I have an action dimension setup on id 1.
And using this Custom html:
<script>
window._paq = window._paq || [];
var ecommerce = {{PurchaseInfo}};
// Custom Dimension orderType
window._paq.push(['setCustomDimension', 1, {{orderType}}]);
// Product Array
ecommerce.products.forEach(item => {
_paq.push(['addEcommerceItem',
item.sku,
item.name,
item.categories,
item.price,
(item.quantity || 1)
]);
});
// Order Array - Parameters should be generated dynamically
window._paq.push(['trackEcommerceOrder',
ecommerce.id,
ecommerce.revenue,
(ecommerce.orderSubTotal || 0),
(ecommerce.tax || 0),
(ecommerce.shipping || 0),
(ecommerce.discount || false)
]);
</script>
Looking in the analytics debugger, it looks like its working.
But looking in the Matomo UI, it’s not!
Any sugestions here?