I'm trying to send a target to Yandex.Metric on successful submission of Gravity Forms form.
For Contact Form 7, the code for such a target submission looks like this (and it works correctly):
<script type="text/javascript">document.addEventListener( 'wpcf7mailsent', function( event ) {yaCounterXXXXX.reachGoal('form');}, false );</script>
I have tried so, but the goals do not come:
<script type="text/javascript">
jQuery(document).on('gform_confirmation_loaded', function(event){
yaCounterXXXXX.reachGoal('form');
});
</script>
I would be grateful for any help. Thanks in advance.