Undefined variables in GTM data layer on form submission



I’m using an event listener in GTM (per this page: https://documentation.unbounce.com/hc/en-us/articles/203814014-How-Do-I-Integrate-Google-Tag-Manager-With-Unbounce) to record an event when someone submits the form on my landing page: https://www.benlcollins.com/advanced-formulas-course/

gtm.formSubmit shows up in GTM preview, but all of the Form fields (classes, Element, ID etc.) are undefined.

I have scoured this forum/web but not been able to figure out yet.

Any ideas what I’m missing?




Not sure if this will be of any help, but I experienced the same issue a copy of days ago. Turns out our developer had only implemented the GTM code into the head section, and forgotten to add the second snippet to the body.


Thanks for the note! I’ll double check that.