1. create a new 'custom field' named 'lastFormURLTitle'
2. create a hidden field in the form using this field 'lastFormURLTitle'. Does Form Pre-fill have to be disabled?
3. embed the form into the page. Add the extra script you provided.
4. create the smart campaign including the email that includes the token for 'lastFormURLTitle'
You don't need 2. The JavaScript adds the field to the form as a hidden field. It doesn't need to be added in Form Editor. And no, Pre-Fill doesn't matter.
4. is up to you -- the goal is to get the title of the page of where the last form fillout happened onto a lead field.
Thank you Sanford, I will build and test.
Also what kind of custom field should it be? String?
Yes, String.
Hey Sanford, the trigger.webpage token didn't work for us as we embed our forms using custom tokens.
Doesn't matter how you embed the form -- if the form is a Marketo form the {{trigger.tokens}} accompany the Filled Out Form activity, always.