I am looking at the "Shopping Behaviour" data in Google Analytics and realised that there are no sessions with add to cart but there are sessions with checkout. How is that possible? A person who has attempted or completed checkout should must add product to the cart first right? Can anyone please help me understand this?GA - Shopping Behaviour Screenshot
Asked
Active
Viewed 2,060 times
-1
-
I’m voting to close this question because its not programming related may be better suited for https://webapps.stackexchange.com/ – Linda Lawton - DaImTo Jun 30 '20 at 05:59
1 Answers
0
This is because you are sending Enhanced Ecommerce checkout
interactions info to Analytics but not add
to cart info.
Example to measure checkout (ecommerce --> checkout --> step --> products):
<script>
function onCheckout() {
dataLayer.push({
'event': 'checkout',
'ecommerce': {
'checkout': {
'actionField': {'step': 1, 'option': 'Visa'},
'products': [{
'name': 'Triblend Android T-Shirt',
'id': '12345',
'price': '15.25',
'brand': 'Google',
'category': 'Apparel',
'variant': 'Gray',
'quantity': 1
}]
}
},
'eventCallback': function() {
document.location = 'checkout.html';
}
});
}
</script>
https://developers.google.com/tag-manager/enhanced-ecommerce#checkoutstep
Example to measure add to cart (ecommerce --> add --> product):
dataLayer.push({
'event': 'addToCart',
'ecommerce': {
'currencyCode': 'EUR',
'add': { // 'add' actionFieldObject measures.
'products': [{ // adding a product to a shopping cart.
'name': 'Triblend Android T-Shirt',
'id': '12345',
'price': '15.25',
'brand': 'Google',
'category': 'Apparel',
'variant': 'Gray',
'quantity': 1
}]
}
}
});
https://developers.google.com/tag-manager/enhanced-ecommerce#cart

Michele Pisani
- 13,567
- 3
- 25
- 42