The purpose of the metric through the function?

Good day, there is a site on the EP, there is the Form Maker module, respectively, to access the code for the form itself is not present, the module has a javascript tab with the content (below), can I use js to set a goal ?
// Occurs before the form is loaded
function before_load() {

}

// Occurs just before submitting the form
function before_submit() {

 // IMPORTANT! If you want to interrupt (stop) the submitting of the form, this function should return true. You don't need to return any value if you don't want to stop the submission.
}

// Occurs just before resetting the form
function submitted() {

}
// Occurs after the form is submitted and reloaded
after_submit function() {

}
March 23rd 20 at 19:23
1 answer
March 23rd 20 at 19:25
Don't understand the problem, there are js hooks in the names which all said if they really work with the desired form, go to the Doc I.metrics, code to js

How to test that the hooks work, write:
function before_load() {
console.log('before_load');
}
function before_submit() {
console.log('before_submit');
}
after_submit function() {
console.log('after_submit');
}

open the page, press f12 (developer tools), then a console tab, press ctrl + shift + r (reset thus, the page cache).
When the form is loaded in the console write before_load, before submitting the form before_submit, after after_submit.
If the console is blank, the hooks at work, and need a different approach, any of at least 10 ways.
If the hooks work, then there (in before_submit || after_submit) you need to paste the code from the link above (reachgoal.html).

If something is not clear from the above, then you need to find someone who is even slightly versed in the web.

Find more questions by tags Yandex.MetricaJavaScript