A
A
and7ey2015-12-17 13:17:41
Yandex.Metrica
and7ey, 2015-12-17 13:17:41

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});

But I can’t find it in the Metrics interface, which shows the number of clicks.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
G
Guzel Sharafutdinova, 2015-12-24
@gy3elka

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
You can also view the Link Map and Click Map in Yandex.Metrica reports. On the left, click on Maps and choose either one or the other. BUT the exact number of clicks on the button in this case is difficult to obtain. Since the Link Map will only show how many clicks were made on the link. If you have several buttons with the same link, then the number of transitions will be total for the link. And in the Heat Map, you can only see if there were many clicks on the button relative to other clicks on the page using the heat map.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question