Showing: 451 - 465 of 505

You have successfully subscribed!
This email has been registered
and was unguarded. `product-add-to-cart` only exists on product pages, so on home / collection / cart / search / blog it threw "Cannot read properties of null (reading 'addEventListener')". It also pushed an undefined `item`, so the "Added to Cart" event never tracked anything even on product pages — it threw a ReferenceError on click instead. Now guarded, and moved inside . `item` is still undefined upstream, so the payload is omitted rather than throwing; wire in a real payload if this event is wanted. */ window._learnq = window._learnq || []; (function () { var btn = document.getElementById('product-add-to-cart'); if (!btn) return; btn.addEventListener('click', function () { try { window._learnq.push(['track', 'Added to Cart']); } catch (e) {} }); })();