X
X
xonar2020-06-23 20:59:51
Yandex.Metrica
xonar, 2020-06-23 20:59:51

Why doesn't the Yandex Metrica goal work?

Good evening.

There is an old WordPress site, from the old version of Contact Form 7. There, the goals are set in a separate tab in this way.

on_sent_ok: "yaCounter21782506.reachGoal('FOOTER-FORM');"


But, the goal does not come. Error in console.

Reach goal. Counter: 21782506. Goal id: FOOTER-FORM. Params:  undefined

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Anton, 2020-06-23
Semenov

Because read the doc on the site: https://contactform7.com/dom-events/

var wpcf7Elm = document.querySelector( '.wpcf7' );
 
wpcf7Elm.addEventListener( 'wpcf7submit', function( event ) {
yaCounter21782506.reachGoal('FOOTER-FORM');
}, false );

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question