Created
June 22, 2022 15:26
-
-
Save engarifulislam/c76eb205915f9268f39595bfa84d7a09 to your computer and use it in GitHub Desktop.
Contact Form 7 Submitted Listener For 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> | |
document.addEventListener( 'wpcf7mailsent', function( event ) { | |
window.dataLayer.push({ | |
"event" : "contactForm7Submitted", | |
"formId" : event.detail.contactFormId, | |
"response" : event.detail.inputs | |
}) | |
}); | |
</script> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment