Pass Page Title and/or URL as hidden field in form

Trying to pass the Course Title and/or URL as a hidden field when a user submits a form. Anyone have any step-by-step on best practices to do this in AC?

Thanks.

  • Stu

You can use Google Tag Manager to do this quite easily if you’re short on dev resources. The page URL is a standard variable in GTM, you can then use a custom html tag that selects the correct hidden field based on the name attribute of the AC form and assign it the value of the GTM variable. See screenshot attached. You can contact me if you’re looking for more help.

Hi, I was trying exactly that method and is strange because if I check the console in the URL with document.getElementsByName(‘field[16]’).value , the URL is saved on the hidden field 16 but after click on send form I go to the AC and the hidden field data is not there. Do you know why?.