R
R
Roman Govorov2019-03-29 13:26:19
Analytics
Roman Govorov, 2019-03-29 13:26:19

How to set 2 goals in Yandex metrics on one button?

I'm trying to do something like this:

$(document).ready(function() {
        $('.baner-fon .submit').attr('onclick', 'yaCounter36909335.reachGoal(\'send_zayavka\'); return true;');ym(36909335, \'reachGoal\', \'send_baner\'); return true;');
    });

Also tried like 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;';
        });
    });

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question