Email Token within a href Tag in the Global Unsubscribe

Conor_Fitzpatri
Level 6

Email Token within a href Tag in the Global Unsubscribe

Hi There,

I realize I already asked about using the email token within the global unsubscribe (Thanks to both Josh Hill and Alicia B for their answers!), but this is a slightly different application. I’m trying to use the email address token within a URL in the global unsubscribe html code.

We are trying to use an external unsubscribe form (not a Marketo form) that first updates our proprietary system and then SFDC (and in turn Marketo). Therefore, I’m trying to pass the email address as a parameter in the external unsubscribe URL. The code I’m using in the global unsubscribe admin is as follows:

<div align="center"><span style="font-size:10px; font-family:Arial, Helvetica, sans-serif; color:#595958; width:650px;">This email was sent to {{lead.Email Address}}. If you no longer wish to receive these emails, click on the unsubscribe link and follow the instructions on the page to opt-out: <a href="http://ourformsurl.com&q3={{lead.Email Address}}">Unsubscribe</a></span></div>

When sending to collegues, "This email was sent to {{lead.Email Address}}" renders as expected with the user's email address populated in place of the token. However, on the external form, instead of the user’s email address, this value was passed: ${lead.vEMAIL_ADDRESS_80230}? (The number in this value changes depending on the Lead the email is sent to.)

Is it not possible to put a token within a href tag in the global unsubscribe?

I should also mention that I tried adding the above code to the body of the email and everything rendered perfectly, even passing the email address to the external form. It just seems to fail in the global unsubscribe. I really would rather not go and edit each email template so any help would be greatly appreciated!

Thanks,

Conor
Tags (1)
2 REPLIES 2
Jim_Thao7
Level 9

Re: Email Token within a href Tag in the Global Unsubscribe

I'm not sure if this works or not, but what I do see in your link is that your url parameter starts with "&".  It should be "?", like this: http://ourformsurl.com?q3={{lead.Email Address}}

"&" is only used for additional url parameters and "?" is used for the initial one. 

SanfordWhiteman
Level 10 - Community Moderator

Re: Email Token within a href Tag in the Global Unsubscribe

You noticed the q is from 2 years ago, right?

Anyway, while you're right that the URL is malformed*, that doesn't cause the {{object.vNAME_NUMBER}} error.  Most likely the problem is that 2 years ago the {{lead.token}} couldn't be used in the global unsubscribe, but now it can.

* To be pedantic, since we're on a zombie thread anyway, the first "?" isn't part of the query string. It separates the path from the query string. Query params are a consistent "&"-delimited list, and a URL with a "?" but nothing after it has no query string.