Can't see Form ID in GTM for Embed Forms

Yifat_Danieli
Level 3

Can't see Form ID in GTM for Embed Forms

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:

pastedImage_0.png

However, when I'm looking at the GTM debugger, I see the following in the Data Layer:

pastedImage_1.png

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?

2 REPLIES 2
Gerard_Donnell4
Level 10

Re: Can't see Form ID in GTM for Embed Forms

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.

Thanks,

Gerard

SanfordWhiteman
Level 10 - Community Moderator

Re: Can't see Form ID in GTM for Embed Forms

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.