i tried all the snippet recommended by klaviyo but couldn’t do please give me some suggestions and don’t suggest me to contact support team via paid plan if possible please provide me a solution here.
I used this code :
<script type="text/javascript">
var _learnq = _learnq || n];
var classname = document.getElementsByClassName("gTmP6we7jf gp-button-base rounded-none max-w-full relative group inline-flex items-center justify-center no-underline transition-colors duration-300 disabled:btn-disabled disabled:opacity-30 disabled:pointer-events-none hover:bg-g-highlight gp-button-atc");
var addToCart = function() {
_learnq.push(q'track', 'Added to Cart', item]);
}; for (var i = 0; i < classname.length; i++) {
classnameai].addEventListener('click', addToCart, false);
}
</script>
My web url is :