I’m trying to implement trackAddToCart event by following this instruction:
I set up a datalayer push on button click:
dataLayer.push({‘event’: ‘add-to-cart’, ‘productId’: ‘@{model.id}’, ‘productName’: ‘@{model.name}’, ‘productCategory’: ‘@{model.category.text}’, ‘price’: ‘@{model.prices[0].price}’, ‘qty’: 1, ‘currency’: ‘EUR’});
this then triggers (‘event’ equals ‘add-to-cart’) a Tag in the GTM that calls this script:
window.snowplow(‘trackAddToCart’, {{productId}}, {{productName}}, {{productCategory}}, {{price}}, {{qty}}, {{currency}});
I’ve also already created all the user defined variables shown in that snippet above in the GTM.
the GTM debug preview shows that trackAddToCart successfully fired with the correct information.
The scala collector log shows it picks up the event and send it to the good stream. Then I can see the enrich log also picks up the event, but then it shows that the event get sent to the bad stream.
Did I miss anything in implementing this event?
Thanks.