Google, Yandex goal using jquery, why is it not working?

Hello, I want to hang on the buttons Yandex goals clicking
The website https://eskacapital.com click on the button to apply
so I write, I think correctly
$('.home-form').click(function() {
 ga('send', 'event', 'knopka', 'click');
 yaCounter51077987.reachGoal('oformit_glavnya'); return true;
 });


and here's the console error
spoiler
my.js:404 Uncaught ReferenceError: is not defined yaCounter51077987
 at HTMLButtonElement.<anonymous> (my.js:404)
 at HTMLButtonElement.dispatch (jquery.js:5183)
 at HTMLButtonElement.elemData.handle (jquery.js:4991)
(anonymous) @ my.js:404
dispatch @ jquery.js:5183
elemData.handle @ jquery.js:4991
my.js:404 Uncaught (in promise) ReferenceError: yaCounter51077987 is not defined
 at HTMLButtonElement.<anonymous> (my.js:404)
 at HTMLButtonElement.dispatch (jquery.js:5183)
 at HTMLButtonElement.elemData.handle (jquery.js:4991)
 at Object.trigger (jquery.js:8249)
 at HTMLButtonElement.<anonymous> (jquery.js:8327)
 at Function.each (jquery.js:354)
 at jQuery.fn.init.each (jquery.js:189)
 at jQuery.fn.init.trigger (jquery.js:8326)
 at mfp-ajax.js:115
(anonymous) @ my.js:404
dispatch @ jquery.js:5183
elemData.handle @ jquery.js:4991
trigger @ jquery.js:8249
(anonymous) @ jquery.js:8327
each @ jquery.js:354
each @ jquery.js:189
trigger @ jquery.js:8326
(anonymous) @ mfp-ajax.js:115
Promise.then (async)
load @ mfp-ajax.js:112
dispatch @ jquery.js:5183
elemData.handle @ jquery.js:4991
tag.js:1 Failed to load resource: net::ERR_CONNECTION_TIMED_OUT

March 19th 20 at 09:11
0 answer

Find more questions by tags jQueryJavaScript