I am trying to pick up the selected value for a drop down field on a form when the form is submitted. Through the developer console in Chrome, I can see the value I want in the GTM dataLayer. It is inside the gtm.element[1] in the screenshot.
However, when I access that with dataLayer[5]["gtm.element"] the console returns the HTML for the form itself without the JSON structure or rest of the data I need to access.
Is there a way to access gtm.element and keep the JSON structure in the first screenshot?
from Access Google Tag Manager dataLayer field values on gtm.formsubmit


No comments:
Post a Comment