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


Warning: count(): Parameter must be an array or an object that implements Countable in /home/styllloz/public_html/qa-theme/donut-theme/qa-donut-layer.php on line 274
0 like 0 dislike
46 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 | 46 views

1 Answer

0 like 0 dislike
perhaps this button labeled event
ev.stopImmediatePropagation()
by
110,608 questions
257,187 answers
0 comments
40,796 users