Someone from a marketing agency recently asked me to add some code to all ‘add to cart’ button in a WooCommerce store. However, the code was setup more like something you’d put in the <head> of the website than on a button. It was setup like this:
<script type=”application/javascript” src=”https://website.com/tracking.js” data-goal=”abcd1234″ ></script>
Surely adding this to a button wouldn’t actually do anything on click, right? I suggested they track these clicks in GTM instead using the CSS class (which I provided). Just want to make sure I’m right here, since I’ve never actually seen this done before.
[ad_2]