Created
December 24, 2017 17:47
-
-
Save kadai/144bcd345d0f2c192f37c14000c16bf0 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
function dtorrer_agregar_seguimiento_envio() { | |
?> | |
<script type="text/javascript"> | |
document.addEventListener( 'wpcf7mailsent', function( event ) { | |
ga( 'send', 'event', 'Contact Form', 'submit' ); | |
location = 'https://dtorrer.com/url-destino'; | |
}, false ); | |
</script> | |
<?php | |
} | |
add_action( 'wp_footer', 'dtorrer_agregar_seguimiento_envio' ); | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment