SOLVED

Placing email address into CTA of webinar invite to send person to non-Marketo LP

Go to solution
Fethi_Erimcag
Level 2

Placing email address into CTA of webinar invite to send person to non-Marketo LP

Hi,

 

Similar question as inserting the lead.Id in the CTA url. 

I would like to insert the email address of the lead however I have tried 2 ways; and cannot seem to get the email address to show in the URL once the CTA is clicked. 

 

I have tried creating an Email Script token, then selecting Email Address under Person>Standard Objects. Upon selection, it generates ${lead.Email} within the token. I tried placing the token into my CTA url however it did not work. 

 

I tried removing the token and inserting the following:  

${lead.Email}

{{lead.Email}}

{lead.Email}

                          into the url - all following my non-Marketo LP. (using bbc as example) - www.bbc.com/${lead.Email} however here I lose the email address in the url. {{lead.Email}} returns an error saying it doesn't exist. While www.bbc.com/{lead.Email} returns the following URL: 

http://www.bbc.co.uk/%7Blead.Email%7D?mkt_tok=e 

 

I am trying to follow the logic of www.bbc.com/{{lead.Id}} (which worked) however cannot seem to get the email address. 

 

thank you

1 ACCEPTED SOLUTION

Accepted Solutions
SanfordWhiteman
Level 10 - Community Moderator

Re: Placing email address into CTA of webinar invite to send person to non-Marketo LP

Tokens have specific names in different contexts, and guessing isn't going to work.

 

The standard {{lead.token}} for the Email Address field is {{lead.Email Address}}.

 

However, you should not use the {{lead.token}} directly in a URL because it will not be properly escaped. You create a Velocity token with the full link content, including the opening and closing <a> (and with the field checked off in the tree of course).

 

<a href="https://www.example.com/?email=${esc.url($lead.Email)}">Link Text</a>

 

Then include the name of the Velocity {{my.token}} in the email {{my.Link With Email}}.

View solution in original post

3 REPLIES 3
SanfordWhiteman
Level 10 - Community Moderator

Re: Placing email address into CTA of webinar invite to send person to non-Marketo LP

Tokens have specific names in different contexts, and guessing isn't going to work.

 

The standard {{lead.token}} for the Email Address field is {{lead.Email Address}}.

 

However, you should not use the {{lead.token}} directly in a URL because it will not be properly escaped. You create a Velocity token with the full link content, including the opening and closing <a> (and with the field checked off in the tree of course).

 

<a href="https://www.example.com/?email=${esc.url($lead.Email)}">Link Text</a>

 

Then include the name of the Velocity {{my.token}} in the email {{my.Link With Email}}.

Fethi_Erimcag
Level 2

Re: Placing email address into CTA of webinar invite to send person to non-Marketo LP

Thank you for the response. 

 

I followed your instructions - i replaced the "example" with "bbc" for now 

created the token and inserted in the CTA of the email however CTA in the email sent to my inbox does not look right. 

(see below/attached)

 

cta email address on email 2.JPG

cta email address on email 1.JPG

cta email address on email.JPG

SanfordWhiteman
Level 10 - Community Moderator

Re: Placing email address into CTA of webinar invite to send person to non-Marketo LP


i replaced the "example" with "bbc" for now 

Why? If that's not your domain, don't use it. example.com is a domain specifically standardized for use in examples. It is not a privately owned domain.

 


cta email address on email.JPG


Looks like you're trying to place the <a> generated by the Velocity code inside another <a> that's in your template. This will always lead to broken HTML, it's never allowed.

 

You need your template to expect the entire <a> to be output from the Velocity {{my.token}}.