Answer the question
In order to leave comments, you need to log in
How to set a goal in Yandex Metrica?
On the page https://yandex.ru/support/metrika/reports/add-goals.xml to the JavaScript goal an example:
<html>
...
<form action="" method="get" onsubmit="yaCounterXXXXXX.reachGoal('ORDER', function () {
alert('Данные успешно отправлены');
}, <Контекст, доступный по ключевому слову this внутри callback-функции>); return true;">
...
</form>
...
</html>
Answer the question
In order to leave comments, you need to log in
for a simple goal,
onsubmit="yaCounterXXXXXX.reachGoal('ORDER'); return true;"
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question