Answer the question
In order to leave comments, you need to log in
Why does the target code for Yandex Metrica prevent the code from executing further?
Good day. I set the goal for the Yandex metric. Event - a successful order followed by a redirect. Before the redirect, I insert the metric code. In the metric, it shows that the target is reached, but the redirect does not occur, in addition:
else if (response.data['msorder']) {
console.log('in');
yaCounter35933265.reachGoal('ORDER'); return true; // отправляем в метрику
console.log('out');
document.location.href = /\?/.test(document.location.href)
? document.location.href + '&msorder=' + response.data['msorder']
: document.location.href + '?msorder=' + response.data['msorder'];
}
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question