Is my assumption regarding tracking and button clicks correct?

[ad_1]

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]

 

This site will teach you how to build a WordPress website for beginners. We will cover everything from installing WordPress to adding pages, posts, and images to your site. You will learn how to customize your site with themes and plugins, as well as how to market your site online.

Buy WordPress Transfer