S
S
SKrasavin2017-12-22 09:43:48
JavaScript
SKrasavin, 2017-12-22 09:43:48

How to execute two JS events for Yandex.Metrica?

The site has many links to another site.

<a onclick="yaCounter1534611.reachGoal('pr-site-4'); return true;" onclick="yaCounter1534611.reachGoal('perehod-na-dilerov'); return true;" href="ссылка на сайт" target="_blank" rel="nofollow">ссылка на сайт</a>

The metric refuses to count targets for the second event. The first event counts the transition to a specific site, and the second event counts the transitions to sites in the general statistics. At the moment, the second event does not work, but the first one does. How to set up correctly so that both are considered?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
E
Eugene, 2017-12-22
@SKrasavin

<a onclick="yaCounter1534611.reachGoal('pr-site-4'); yaCounter1534611.reachGoal('perehod-na-dilerov'); return true;" href="ссылка на сайт" target="_blank" rel="nofollow">ссылка на сайт</a>

O
oh, 2017-12-22
well @AnneSmith

if it is impossible to write one event in one line, then try using another event, there is a whole zoo
of such events like blur / focusout

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question