SOLVED

Pre-fill embedded form with email address

Go to solution
Melissa_Day
Level 3 - Champion Alumni

Pre-fill embedded form with email address

We are hosting embedded Marketo forms on our website. When a user fills it in, a thank you page loads. If the user did not opt-in on the prior page's form, a query string vaue "opt-in" is updated to "no," which triggers a dynamic section of the web page to display soliciting the opt in. This section includes a single field form to capture email address and opt the user in. 

 

Because the user would have just filled out a form on the previous page, we'd like to populate the field with the email that had just been submitted. Originally, we were passing the email value in the query string, however that went against GA compliance since we would have been capturing PII in our web analytics. 

 

Is there another way to leverage the Custom HTML for Known Visitor or other Marketo-based capability to enable this functionality?

1 ACCEPTED SOLUTION

Accepted Solutions
SanfordWhiteman
Level 10 - Community Moderator

Re: Pre-fill embedded form with email address

If the TY page is on the same domain as the initial LP, then store the Email Address in session storage. If it's not exactly the same domain but shares a common parent domain, use a cookie.

If neither of the above apply, you could encrypt (not merely encode, I mean truly encrypt, though it doesn't have to use any kind of advanced algorithm) the Email Address on the LP, and pass the encrypted form in the URL. Then the TY page knows the password to decrypt. Then you've successfully hidden the PII in GA, because someone who has only the GA hit cannot determine the original value. Of course there's no practical security claim in the browser since the password is known on both sides, but the GA logs are compliant.

View solution in original post

6 REPLIES 6
SanfordWhiteman
Level 10 - Community Moderator

Re: Pre-fill embedded form with email address

If the TY page is on the same domain as the initial LP, then store the Email Address in session storage. If it's not exactly the same domain but shares a common parent domain, use a cookie.

If neither of the above apply, you could encrypt (not merely encode, I mean truly encrypt, though it doesn't have to use any kind of advanced algorithm) the Email Address on the LP, and pass the encrypted form in the URL. Then the TY page knows the password to decrypt. Then you've successfully hidden the PII in GA, because someone who has only the GA hit cannot determine the original value. Of course there's no practical security claim in the browser since the password is known on both sides, but the GA logs are compliant.
Lucas_Metherall
Level 4

Re: Pre-fill embedded form with email address

Hi All, 

 

This is the clsoest thread to what we are experiencing with our unsubscribe form. We have an API between our Drupal site and MKTO, and this works fine for the campaign form fills on Drupal, using Drupal forms, sending data back to MKTO. Somehow the Unsubscribe form stopped actioning the unsubscribe though, but that is a different issue for a different time.

 

We have since embedded a MKTO unsub form on the Drupal site, and that works perfectly. Except for the odd person who inputs a different, or wrong, email address, and that simply creates a new unsubscribed lead in MKTO. 

 

Since we already have the API in place, and prefilling email addresses worked on the Drupal form, how can we do the same with the MKTO form embedded on the Drupal site? If we can pre-fill the form people have less chance of making this mistake..

 

Thanks,

SanfordWhiteman
Level 10 - Community Moderator

Re: Pre-fill embedded form with email address

SanfordWhiteman
Level 10 - Community Moderator

Re: Pre-fill embedded form with email address

Know what though? Somehow I forgot to include this option: why don't you strip the query params (history.replaceState works in everything but IE 8 & 9) before sending the GA hit? Or use the location.hash instead of the query string (hash isn't sent to GA unless you want it to be).

SanfordWhiteman
Level 10 - Community Moderator

Re: Pre-fill embedded form with email address

@Melissa_Day please check responses.

Melissa_Day
Level 3 - Champion Alumni

Re: Pre-fill embedded form with email address

Thank you very much for the suggestions! I am going to work with our web dev team to see how they want to move forward, then will mark the solution 🙂