G
G
geektimer2019-07-25 10:28:57
JavaScript
geektimer, 2019-07-25 10:28:57

Do I need to return a value in the metric target call function?

I just want to clarify, maybe I don’t understand something ..
The Yandex docks say how to set the goal correctly, but there are always two options in the examples:
1) onclick="ym(XXXXXX, 'reachGoal', 'TARGET_NAME', goalParams); "
2) onclick="ym(XXXXXX, 'reachGoal', 'TARGET_NAME', goalParams); return true;"
Is it necessary to return `true` on an event? I couldn't find a definitive answer to this question.
Although, usually the value returned by the event handler is ignored . Exception is return false and event.preventDefault()

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question