we created a new subscription center that lives outside of /unsubscribepage.html
now we want to reference this new URL with our {{system.unsubscribeLink:default=edit me}} token
can we do this?
Hi Malik,
This and many other questions are answered in Greg's legendary post: https://nation.marketo.com/t5/Champion-Program-Blogs/The-comprehensive-guide-to-setting-up-the-unsub...
5-Use a different URL for the unsubscribe pageMay be you want to use a different URL for this page, or even have various URLs for various contexts. In fact, nothing mandates you to always use the {{system.unsubscribeLink}} or the /UnsubscribePage.html URL. Any Marketo LP URL will do the job here, as long as it is appended with the "?mkt_unsubscribe=1" to indicate to Marketo that this is an unsubscribe link. You should also add the &mkt_tok=##MKT_TOK## to make the click on the link carry the token value and enable cookie value reconciliation. Please also note that, in order to prevent Marketo to track the click on the link, you will have to add class="mktNoTrack" to the <a> tag.
The following is a perfect unsubscribe link in an email template:
<tr><td>This email was sent to {{lead.Email Address}}. In order to stop receiving our spammy emails <a href="http://mktolpsubdomain.company.com/myniceunsubpage.html?mkt_unsubscribe=1&mkt_tok=##MKT_TOK##" class="mktNoTrack" target="_blank">click here.</a></td><tr>
As you can see, it takes no token and not event the /UnsubscribePage.html URL.
This method will be necessary in a multi language / international roll out: you will need to have multiple, different Unsubscribe pages for each language and the Marketo default or {{system.unsubscribeLink}} token can only link to one of them.
Also please note that the unsub code can be added to snippets, which in turn can be added to the emails for maximum flexibility.
Thanks Sanford. This method does not auto-populate email address. How can I use this method but also make it so when a user clicks the link that their email address is auto-filled?
You don't need the manual mkt_tok=##MKT_TOK## on that link (there are probably a few things that work differently since that post was written).
As it's just a regular tracked link, as long as you're not redirecting it and it's a Marketo LP, it'll have Pre-Fill natively.
I am adding the following code to our email template
<a href="https://www.ourwebsite.com/email-subscription-center.html?mkt_unsubscribe=1&mkt_tok=##MKT_TOK##" class="mktNoTrack style="color:#666666;text-decoration:none;">Email Preference Center</a>
however, when testing in in an email test, I do not see email address auto-populating.
Any idea why this might be? Thanks again.
That's 'cuz you're turning off tracking. Pre-Fill requires either (a) a tracked link or (b) a separate JS helper.
Try this:
<a href="https://www.ourwebsite.com/email-subscription-center.html?mkt_unsubscribe=1" style="color:#666666;text-decoration:none;">Email Preference Center</a>
Hey Sanford,
That didn't seem to work. In fact, even after we added Marketo's universal unsubscribe footer back into our emails for testing, the autofill of email address does not work.
Does autofill not work for sample emails? Do I have to send an actual email?
EDIT: nevermind, I figured out the issue. The way our designer created our unsubscribe page, the form was directly embedded onto the page rather than using Marketo's feature of adding a form, and I think that's what was throwing things off. Thanks Sanford!
Ah yes — although FYI if you were to use my Pre-Fill JS, that works even if the form is not a named mktoForm element inthe LP template.
Although I always recommend using the mktoForm element unless there's some reason you don't want the end user to be able to change the form ID.