Passing form Elements into the Data Layer for GTM tracking

  • 12 August 2020
  • 1 reply
  • 158 views

Hi,

I have setup GA tracking through GTM, but when a form is submitted the form elements and classes are undefined and I cannot pick them up to create specific events.

This is the page https://discover.octopuswealth.com/retirement-guide/

Research has suggested that this is possible, but I cannot work out how.

Thanks

James


1 reply

Userlevel 7
Badge +3

Hey @Jamessha,

This is one of those things that is hard to troubleshoot just based on your initial post.

Is it possible to create events based on form input/interaction - Yes.

However, the actual implementation of how you go about doing it and how you have your whole setup implemented matters.

Are you implementing GTM through Unbounce’s Global Script Manager or manually inserting it on the page? Are you using the built in Form Submit event or are you “listening” for the gtm.formSubmit?
What exactly does your GTM debugger show you when you submit a form (what fires and what doesn’t)?

There are probably another dozen questions like the ones above before you can start troubleshooting this properly.
Based on our experience helping clients with their GTM implementations, in can be something simple or it might be something more involved.

A quick check and it seems that not much goes into the dataLayer (screenshot) + you have multiple page views firing.

Unfortunately, you are the only one who can unravel this simply because we don’t have access to your GTM account.

Best,
Hristian

Reply