Answer the question
In order to leave comments, you need to log in
Why are the goals not achieved in Yandex Metrics?
Hello! WordPress site with contact form 7 plugin installed . I connected the Yandex metric, set up the goal and connected wiretapping to the form, but I can’t understand why the goals don’t reach .. I
tested various forms from the site, they are sent correctly.
<!-- Yandex.Metrika counter -->
<script type="text/javascript" >
(function(m,e,t,r,i,k,a){m[i]=m[i]||function(){(m[i].a=m[i].a||[]).push(arguments)};
m[i].l=1*new Date();k=e.createElement(t),a=e.getElementsByTagName(t)[0],k.async=1,k.src=r,a.parentNode.insertBefore(k,a)})
(window, document, "script", "https://mc.yandex.ru/metrika/tag.js", "ym");
ym(41441674, "init", {
clickmap:true,
trackLinks:true,
accurateTrackBounce:true,
webvisor:true
});
</script>
<noscript><div><img src="https://mc.yandex.ru/watch/41441674" style="position:absolute; left:-9999px;" alt="" /></div></noscript>
<!-- /Yandex.Metrika counter -->
<script type="text/javascript">
document.addEventListener( 'wpcf7mailsent', function( event ) {
ym(41441674, 'reachGoal', 'weddings'); return true;
});
</script>
Answer the question
In order to leave comments, you need to log in
1. Perhaps the outdated version of the plugin was. There is a method onSendOk. You can try through it.
2. non-Ajax mod. https://contactform7.com/faq/dom-event-doesnt-work/
3. There may be some errors, see if the target is sent via ?ym_debugg
By the way, there is also an error in the confirmation form, understand why it requires me to agree with the rules I couldn’t) I didn’t look more precisely) In the form of a connection in a header . Sometimes it passed, and sometimes not ... it gave out that I had to agree with the rules ... as if after some time this hidden tick was removed by the timer
Faced a similar problem. A couple of hours later, I discovered that FireFox, on which the testing of achieving goals took place, got a new thing - " Tracking protection " - it, in turn, was turned on for me, and blocked the Yandex tag.js, and the Facebook pixel. Thus, they were not loaded, there were no errors, as well as the achievement of goals.
Pay attention to this when testing.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question