How to put YandexMetrics goal code on a form on the condition of filling the form

Hi. This is my first topic and I apologize if I ask not clear. I will try to explain)
I need to put a goal code on a form on a form fill condition. The problem is that Webflow that I need to connect Yandex Metrics. I found a lot of information on the forum how to connect GA, but nothing about Yandex Metrics.
Maybe it is not possible at all? Or I need to connect third-party integration via API.
The code that I need to put:
ym(53144686,‘reachGoal’,‘order’)

Yandex documentation says:
"in order for the goal to be reached directly when the form is submitted, it must be set to the event responsible for submitting the form. In the simplest case, this is the onsubmit event.

The code would be like this:

<input name="name" placeholder="Ваше имя" required> <br>

<input type="email" name="mail" placeholder="Ваш email" required="Введите Ваш email"> <br>

<button>Отправить</button>

Thanks for any help!


Here is my site Read-Only: LINK