How to install 2 goals in Yandex Metrica on a button?

Trying to do something like that:
$(document).ready(function() {
 $('.baner-fon .submit').attr('onclick', 'yaCounter36909335.reachGoal(\'send_zayavka\'); return true;');ym(36909335, \'reachGoal\', \'send_baner\'); return true;');
 });

Also tried this:
$('.submit').attr('onclick', 'yaCounter36909335.reachGoal(\'send_zayavka\'); return true;');
$(document).ready(function() {
 $('.baner-fon .submit').attr('onclick', function(i, val) {
 return val + 'ym(36909335, \'reachGoal\', \'send_baner\'); return true;';
});
 });
March 19th 20 at 09:09
0 answer

Find more questions by tags Yandex.MetricaAnalyst