I'm trying to create a Form Submit event in Google Tag Manger. We're embedding our forms on WordPress and I can clearly see thier on inspect element:
However, when I'm looking at the GTM debugger, I see the following in the Data Layer:
This makes it very hard to find a variable for me to lean on when specifying the form ID / Element / Click.
Anybody knows what needs to be done here? Do I need to create a new variable? if so where and how do I send this information using GTM?
Hi Yifat Danieli,
We track Marketo form fills by tracking the onClick event for the Submit button on the webpage. GTM is listening for the onClick of the submit button and then captures the page url.
Mmm, that's not really right. Using the DOM event, you'll get false positives whenever someone *attempts* to submit the form and fails validation.
You should use the Forms JS API 'onSuccess' listener, which fires when the form has actually been submitted.