Last active
April 5, 2018 08:48
-
-
Save Macuzzin/b281ece8b8149f7880696a4b712667e3 to your computer and use it in GitHub Desktop.
Data Layer Push Event for Tracking Contact Form 7 Submissions with Google Tag Manager
This file contains hidden or 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> | |
// CF7 Submit Trigger | |
document.addEventListener( 'wpcf7mailsent', function( event ) { | |
dataLayer.push({'event': 'Contact Form Submitted'}); | |
}, false ); | |
</script> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment