Answer the question
In order to leave comments, you need to log in
How to track a click on a button in Yandex.Metrica?
I am currently using the following code -
var yaParams = {pdfDownload: 1};
var yaCounter1234567 = new Ya.Metrika({id: 1234567, params:window.yaParams});
Answer the question
In order to leave comments, you need to log in
You can set the target to click a button. You need to build the following event trigger code in the button:
onclick="yaCounterXXXXXX.reachGoal('Click_on_button'); return true;"
More details here https://yandex.ru/support/metrika/reports/add-goals.xml Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question