N
N
Natalie2018-01-31 19:20:46
Yandex.Metrica
Natalie, 2018-01-31 19:20:46

How to set up multiple NM targets on multiple CF7 forms?

I wrote this code:
<script>
document.addEventListener( 'wpcf7mailsent', function( event ) {
if ( '123' == event.detail.contactFormId ) {
ga('send', 'event', 'order2400', 'Submit ');
yaCounter££££££.reachGoal('order2400');
}
if ( '456' == event.detail.contactFormId ) {
ga('send', 'event', 'order2800', 'Submit' );
yaCounter££££££.reachGoal('order2800');
}
if ( '789' == event.detail.contactFormId ) {
ga('send', 'event', 'order_end', 'Submit') ;
yaCounter££££££.reachGoal('order_end');
}
}, false );
script>
Not working, tell me what's wrong?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
T
tyzberd, 2018-01-31
@tyzberd

here https://github.com/wp-plugins/contact-form-7/blob/... no wpcf7mailsent, but wpcf7:mailsent
How to set Google Analytics goals?

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question