window.ms.bind('ms.entity.carts.add_product_success', function (event) {
var product = event.data.data.product;
dataLayer.push({
'event': 'addToCart',
'ecommerce': {
'currencyCode': ms.user.currency.name,
'add': { // 'add' actionFieldObject measures.
'products': [
{ // adding a product to a shopping cart.
'name': product.name,
'id': product.sku,
'price': product.price,
'brand': product.brand,
'category': product.category,
'quantity': 1
}
]
}
}
});
});
This website uses cookies to ensure you get the best experience on our website. Learn more