Last active
December 24, 2017 06:55
-
-
Save kadai/4112c077fa0b97ac2fe6189d7e9f10a1 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 ) { | |
location = 'https://dtorrer.com/url-destino'; | |
}, false ); | |
</script> | |
<?php | |
} | |
add_action( 'wp_footer', 'dtorrer_agregar_seguimiento_envio' ); | |
?> |
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', 'Forma de Contacto', 'submit' ); | |
}, false ); | |
</script> | |
<?php | |
} | |
add_action( 'wp_footer', 'dtorrer_agregar_seguimiento_envio' ); | |
?> |
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 ) { | |
/* PRIMER FORMULARIO */ | |
if ( 'ID_Formulario' == event.detail.contactFormId ){ | |
location = 'https://dtorrer.com/url-destino'; | |
} | |
/* SEGUNDO FORMULARIO */ | |
if ( 'ID_Formulario2' == event.detail.contactFormId ){ | |
location = 'https://dtorrer.com/url-destino2'; | |
} | |
}, 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