Google Analytics
Google Analytics
If you want to correctly track AddToCarts with your gtag script, you have to listen to the Smootify Add To Cart event and send the event using the gtag
utility of Google, as example you can use the snippet below:
This is the correct way to track the add to cart, since a click on the button will not ensure you that the product is purchasable or not.
Naturally, be sure you have the consent to track!
If you do not want to customize the code in any way, you can also just enable the Automatic Event Tracking