GTM Hack – Passing Hidden Form Fields to GTM

Passing the value of a form field into Google Tag Manager is pretty straight forward with the dataLayer and the dataLayer variable. But since things vary a bit case to case, I’d like to show one example which you can adapt. The basics are: If you have any formSubmit trigger present in your container, then on submit of any form, a gtm.form object will be passed into the dataLayer. This object contains all the information, especially hidden fields and whatever the visitor filled out. Those values in turn can be retrieved in GTM using a dataLayer variable. Alright, for sake […]

GTM Hack – Passing Hidden Form Fields to GTM Read More