Answer the question
In order to leave comments, you need to log in
How to add a Yandex Metrica goal to a button using js?
How to add a Yandex Metrica goal to a button using js?
Answer the question
In order to leave comments, you need to log in
Add a class and a date attribute with a target to the button, and in js, when you click on a btn with a class, just call the desired method with the target that was in the date attribute.
You can set at least 200 different targets, everyone will work out
<button onclick="// тут вызов функции">Кнопка</button>
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question