10
votes
Form Submission tracking
Would like to have an option to create a dataLayer event with dynamic values such as Form name
This would happen when a form is successfully submitted.
window.dataLayer = window.dataLayer || [];
window.dataLayer.push({
'event': 'form_success',
'form_name': 'Contact Us' // This should be the name of the form
});
One Comment
Leave a Reply
You must be logged in to post a comment.



and add all fields firstname, mail etc to that event too 🙂