How to set a goal of "Add to cart"?

0 like 0 dislike
36 views
Hello! can't configure Google They goal.

Created the following goal:

Category= Cart
Action = Add


In the woocommerce item cards added:

var button = document.getElementById("addToCart"); button.addEventListener( 'click', function( event ) { ga('send', 'event', 'Cart', 'Add')}, false );

Button finds. Errors in the console. But the goal is not added.
by | 36 views

1 Answer

0 like 0 dislike
perhaps this button labeled event
ev.stopImmediatePropagation()
by
110,608 questions
257,186 answers
0 comments
33,945 users