D
D
Darkness2019-06-19 13:38:27
JavaScript
Darkness, 2019-06-19 13:38:27

How to correctly specify (call) Yandex Metrika in the angular function?

I don't understand how can I call the ym function in this function?
My function is called upon successful sending, I did it here, but the function itself does not want to be an error.
Simple question, but I don't know what to write here to make it work:

sendYM() { // позже вызывается при успешной отправки сообщения
    window.ym(xxxxxxx, 'reachGoal','success_send '); return true;  //также пробовал просто ym, но это также не работает .. нужно просто заставить работать
  }

Error : Property 'ym' does not exist on type 'Window'
Is there any way to specify an exception?
Thanks for the help!

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Anton Shvets, 2019-06-19
@Xuxicheta

Something I'm stupid, your problem may be simpler.
Try A general https://ourcodeworld.com/articles/read/337/how-to-...window['ym']

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question