Hide values in UTM parameters when using Token | Community
Skip to main content
Level 3
March 15, 2023
Solved

Hide values in UTM parameters when using Token

  • March 15, 2023
  • 2 replies
  • 2255 views

HI All,

 

We are trying to pass the field values to utm parameters using tokens and use those values to auto-populate the field values on a form that lives on non-landing page. Concern is when we use token it shows the actual value in URL which is visible to on user end.

 

How can we hide the values on user end but still be able to capture the field information to prefill the form.

 

For instance :firstname={{lead.First Name}}&lastname={{lead.Last Name}}&email={{Lead.Email Address}}

 

Regards

Ani

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by SanfordWhiteman

How can we hide the values on user end but still be able to capture the field information to prefill the form.


Do the 2 pages have a private domain suffix in common? (i.e. pages.example.com and www.example.com have example.com in common). If so, you can use a cookie to persist the data, or if they’re exactly the same domain, you should use Local Storage.

 

Otherwise, the answer’s of course No, because they need to be in the URL. To have them be available from JavaScript on the next page, you must use a standard HTTP GET. (An HTTP POST would not expose them in the URL, but they also would not be readable to be used in Pre-Fill.)

 

Also, a very important note that you cannot simply embed {{lead.tokens}} - or any tokens - in query strings. They must be URL-encoded.

2 replies

Darshil_Shah1
Community Advisor and Adobe Champion
Community Advisor and Adobe Champion
March 15, 2023

Instead of passing PII for prefilling forms in the URL and trying to hide them from the end user (which still has inherent vulnerability as non-hidden PII in the URL), why don't you use Sandy’s DTO/DTP form fill approach that can prefill data on Marketo/external LPs? Check out Sandy’s post on form prefill here.

SanfordWhiteman
SanfordWhitemanAccepted solution
Level 10
March 15, 2023

How can we hide the values on user end but still be able to capture the field information to prefill the form.


Do the 2 pages have a private domain suffix in common? (i.e. pages.example.com and www.example.com have example.com in common). If so, you can use a cookie to persist the data, or if they’re exactly the same domain, you should use Local Storage.

 

Otherwise, the answer’s of course No, because they need to be in the URL. To have them be available from JavaScript on the next page, you must use a standard HTTP GET. (An HTTP POST would not expose them in the URL, but they also would not be readable to be used in Pre-Fill.)

 

Also, a very important note that you cannot simply embed {{lead.tokens}} - or any tokens - in query strings. They must be URL-encoded.

amishraAuthor
Level 3
March 22, 2023

Thank you for the response and yes private domain suffix in common but i am not sure how to create cookie and pass the field values.

Tokens are URL-encoded and for now we would let values to display in URL as time spam is very short to finish the project.