L
L
latyshevstanislav2017-11-05 22:32:33
Google Analytics
latyshevstanislav, 2017-11-05 22:32:33

Target event via js (YD+GA)?

Good afternoon!
There is a showcase of goods. There are two buttons in the showcase:
- "Order" [order_loop] when clicked, a card with a product opens in which the button is nested
- "Make an order" [#zakaz]
~ The site is made on wordpress
~ The showcase is made through the woocommerce plugin (bootstrap elements)
59ff66de4ec98731804239.png
1) Is it possible using js to call the target event when clicking on the buttons?
2) What to write in js?
I tried the method below, the method does not work:
$(".order_loop").on("click", (function() {
ga("send", "event", "order", "order");
yaCounter45419106.reachGoal( "order");
return true;
}));
$("#order").
ga("send", "event", "order", "order");
yaCounter45419106.reachGoal("order");
return true;
}));

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question