I have tried to add the 'added to cart' snippet to my site code to track add to cart events but it does not seem to be working - my code does not have an id, but a class, so I tried to use the secondary snippet in the following article:
var _learnq = _learnq || ;
_learnq.push(['track', 'Added to Cart', item]);
My code for the add to cart button the shopify prestige theme is:
<button type="submit" class="ProductForm__AddToCart Button Button--primary Button--full" data-action="add-to-cart"><span>Add to cart</span></button>
I'm wondering what change i need to make to get the snippet to work? I've tried using various bits from the class field in the code above but I can not get it working.
Can anyone help please?