Track this add to cart click

Trying to track this button click (add to cart)

< button type=“submit” title=“Order” class=“action primary tocart” id=“product-addtocart-button”>Order

with this trigger

But i must be doing something wrong since it’s not working (switching to click id is not moving the needle as well).

Thxs

Hello @dave

Click element would be used for object. In this case I can suggest you to use
Click ID or Click Classes instead and match it with parameters from your button.

example:
Click ID - matches - product-addtocart-button

If you aren’t sure what variables are visible for object you are clicking, there is also another method. You can always open debug mode → connect to tested website → go to “Events” instead of tags → select from list action you just did → check variables visible by tag manager

Thxs @jfidala for the fast reply. When checking events there is no click id visable:

Class is changing when element is clicked and I think it’s gone for brief second - but I’ve noticed in console that there is stg.formSubmit with each Add to cart button pressed.

Maybe you can do Form submission trigger instead and set Form URL to starts with"https://www.matthys.net/en/checkout/cart/add/ ?

1 Like