Shopbox Analytics
API Component Analytics
When implementing with the API we are able to track product card clicks as we are sending back URL params with the API response URLs. However, if you implement an add-to-cart button this can only be tracked if you add some additional elements which allow us to pick it up.
For the add-to-cart button
Here we require a sb-add-to-cart class and a data-url attribute, where its value should be the url handle (not full URL), example is "/product-url", of the product currently displayed in the card.
Example of modified code for a carousel would look like this: