Passing tokens to external URL on form submit | Community
Skip to main content
Kim_Koserski1
Level 2
September 8, 2021
Solved

Passing tokens to external URL on form submit

  • September 8, 2021
  • 1 reply
  • 2499 views

Has anyone been able to successfully resolve a lead. or my. token when passed from a Marketo landing page to an external URL? We want to pass a string field on the person record to an external landing page on form submit, and have tried using an Email Script my. token on both the landing page and form, but the value isn't resolving (ex. www.website.com?string_token={{my.string-token}}).

 

The only thread I've found on this topic appears to have been deleted so any help is appreciated. Thanks!

Best answer by SanfordWhiteman
Do you mean field values that were on the form, or actual {{lead.tokens}} (which can include fields not on the form)?

The former you do like so: https://blog.teknkl.com/append-fields-to-thank-you-url/

The latter takes considerably more complex code because you have to wait for the session to be associated.

{{my.tokens}} are pretty easy but they must be output safely into the page using their standard HTML encoding, then read again and URI-encoded.

1 reply

SanfordWhiteman
SanfordWhitemanAccepted solution
Level 10
September 8, 2021
Do you mean field values that were on the form, or actual {{lead.tokens}} (which can include fields not on the form)?

The former you do like so: https://blog.teknkl.com/append-fields-to-thank-you-url/

The latter takes considerably more complex code because you have to wait for the session to be associated.

{{my.tokens}} are pretty easy but they must be output safely into the page using their standard HTML encoding, then read again and URI-encoded.
Kim_Koserski1
Level 2
September 10, 2021

Thanks for your response Sanford!

 

We're looking to pass the value of a hidden form field to the thank you page. The flow we envision is that someone arrives on the Marketo landing page and that hidden field is captured from the URL parameter, then passed again on to the thank you page which is on another domain.