Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@measureschool
Created February 4, 2019 13:45
Show Gist options
  • Star 6 You must be signed in to star a gist
  • Fork 3 You must be signed in to fork a gist
  • Save measureschool/ae71aa19c9b2abac16b26d44a7c545bc to your computer and use it in GitHub Desktop.
Save measureschool/ae71aa19c9b2abac16b26d44a7c545bc to your computer and use it in GitHub Desktop.
<script>
document.addEventListener( 'wpcf7submit', function( event ) {
window.dataLayer.push({
"event" : "formSubmit",
"formId" : event.detail.contactFormId,
"fields" : event.detail.inputs
})
});
</script>
@anishtkuriakose-83
Copy link

What is the difference between wpcf7mailsent and wpcf7submit? What if I use wpcf7mailsent instead of wpcf7submit?

@measureschool
Copy link
Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment