Created
October 23, 2017 15:24
-
-
Save aarondicks/9d451508e5535b0f0309c4d3d8aa2b69 to your computer and use it in GitHub Desktop.
Companion snippet to the following: https://www.impression.co.uk/blog/8197/wordpress-contact-form-7-event-listeners-gtm/ This is a Google Tag Manager Tag example
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
<script> | |
document.addEventListener( 'wpcf7mailsent', function( event ) { | |
dataLayer.push({'event': 'form_submitted'}); | |
}, false ); | |
</script> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment