SOLVED

Re: Hidden email fields in Typeform

Go to solution
kristen_19
Level 1

Hidden email fields in Typeform

Hi all!

We're planning on sending an email from Marketo to known users linking to a Typeform survey. Typeform says it's able to capture things like email address using hidden fields (so survey takers won't have to type theirs in).

 

Here's the structure Typeform has for including emails in a hidden field:

 

typeform hidden fields - marketo.png

 

They've got specific instructions for Hubspot, Mailchimp, and others, but nothing for Marketo. What should we include here in place of the [xxxxx] to ensure known Marketo emails are captured? (We don't have an integration or anything, but I feel like this should be doable?) 

 

Appreciate the help - thanks!

1 ACCEPTED SOLUTION

Accepted Solutions
SanfordWhiteman
Level 10 - Community Moderator

Re: Hidden email fields in Typeform

Create a new Velocity (Email Script) {{my.token}}.

 

Check off the Person » Email Address field in the tree on the right:

SanfordWhiteman_0-1738348944319.png

 

Then paste this code into Script Editor (subbing in your Typeform info, of course):

 

<a href="https://example.typeform.com/to/abc123#email=${esc.url($lead.Email)}">Take the survey</a>

 

 

 

Typeform expects you to pass the field in the hash (after the #), not the query string as you might be familiar with from other services. But either way you must be in the habit of properly URL-encoding Marketo fields, which is why you use Velocity’s ${esc.url} here.

View solution in original post

8 REPLIES 8
Miray
Level 4 - Champion

Re: Hidden email fields in Typeform

Hi @kristen_19 

I've never used Typeform for surveys, but from what I understand, the XXXX in the URL won't capture the person's email address unless you have some sort of connection between the tools. Most likely, you need to use a custom or personalized survey URL for each email recipient to capture their responses without asking for their email address.

SanfordWhiteman
Level 10 - Community Moderator

Re: Hidden email fields in Typeform

Create a new Velocity (Email Script) {{my.token}}.

 

Check off the Person » Email Address field in the tree on the right:

SanfordWhiteman_0-1738348944319.png

 

Then paste this code into Script Editor (subbing in your Typeform info, of course):

 

<a href="https://example.typeform.com/to/abc123#email=${esc.url($lead.Email)}">Take the survey</a>

 

 

 

Typeform expects you to pass the field in the hash (after the #), not the query string as you might be familiar with from other services. But either way you must be in the habit of properly URL-encoding Marketo fields, which is why you use Velocity’s ${esc.url} here.

kristen_19
Level 1

Re: Hidden email fields in Typeform

thanks so much, I really appreciate it!

 

I added the token and checked off Email Address under person, but I'm seeing this in response. I'm assuming I set it up incorrectly?

 

marketo no variable.jpg

 

 

SanfordWhiteman
Level 10 - Community Moderator

Re: Hidden email fields in Typeform

You need to put the {{my.token}} in the email editor.

 

This looks like you pasted the code in the editor?

kristen_19
Level 1

Re: Hidden email fields in Typeform

Sorry, this is the first time I've done this so want to make sure I did it right -

 

  • I added the token to the email program 
  • I pasted the link into the email
  • Tested it out by sending it to a "person"
  • when it didn't work (no email in the URL, and nothing captured in Typeform) I took a look at the code, and wasn't sure if the error meant anything

 

SanfordWhiteman
Level 10 - Community Moderator

Re: Hidden email fields in Typeform

Sorry, what do you mean by “I pasted the link into the email?“

 

You need to create the {{my.token}} using the code above (and checking off the field in the tree).

 

Then the {{my.token}} goes in the email. Marketo replaces the {{my.token}} dynamically when it sends. (Just as it replaces {{lead.tokens}}.)

 

Make sure you’re not using Send Sample but a real email (maybe you already covered that).

kristen_19
Level 1

Re: Hidden email fields in Typeform

Thanks so much for your responses - I so appreciate it (and finally got it after smacking my forehead). Thank you!

SanfordWhiteman
Level 10 - Community Moderator

Re: Hidden email fields in Typeform

Great!