Is there a way to have a Marketo form pre-fill if it's linked to from a Marketo landing page, that would be arrived at from a Marketo email (and so with mkt_tok)?
We are looking at developing a preference centre that houses a couple of email subscription options. We were also looking to have a separate unsubscribe page/form that would be a global unsubscribe, so the idea was to have copy on the unsubscribe page highlighting this and a link to manage preferences instead if preferred. However I'm not aware of a way to have the preference centre form pre-fill for a lead if they navigate there from the unsubscribe page (accessed from Marketo email) - only if they access the preference centre directly from the email. Is there a way to achieve this? Or is the only option to combine the two into one?
Solved! Go to Solution.
I tried to add a link to the landing page but I only had the option to mark it as track link, not add mkt_tok (as you do in the email editor).
Right, there’s no feature like that — understandably, as it would break the security approach of removing the mkt_tok on load.
What you can do is
Use this HTML:
<a class="mktReTok" href="https://pages.example.com/unsubscribe">This link will have the original mkt_tok added</a>
And this JS:
document.addEventListener("DOMContentLoaded",function(){
const arrayify = getSelection.call.bind([].slice);
arrayify(document.querySelectorAll("a.mktReTok"))
.forEach(function(link){
link.addEventListener("click",function(){
this.search += ( this.search ? "&" : "" ) + "mkt_tok=" + window.__mktTokVal;
});
});
});
Hello,
I don't know a direct way of doing this, but you can do it with the 2 following steps
1. Create a trigger campaign for the e-mails. If the person clicks the unsubscribe link you update the preferences field value.
2. In the forms you enable the pre-fill of the preferences field
You should never update data based only on a Clicked Email, as you'll be responding to mail scanners, not just humans.
I don't understand the rest of your post... how would that accomplish Pre-Fill?
you're right, I thought forms were still using munchkin code to pre-fill but now it is only the e-mail token. Sorry!
However I'm not aware of a way to have the preference centre form pre-fill for a lead if they navigate there from the unsubscribe page (accessed from Marketo email) - only if they access the preference centre directly from the email. Is there a way to achieve this? Or is the only option to combine the two into one?
It’s easy to make this happen if they’re both Marketo LPs. Is that the case?
Yep, both Marketo landing pages. I tried to add a link to the landing page but I only had the option to mark it as track link, not add mkt_tok (as you do in the email editor).
I tried to add a link to the landing page but I only had the option to mark it as track link, not add mkt_tok (as you do in the email editor).
Right, there’s no feature like that — understandably, as it would break the security approach of removing the mkt_tok on load.
What you can do is
Use this HTML:
<a class="mktReTok" href="https://pages.example.com/unsubscribe">This link will have the original mkt_tok added</a>
And this JS:
document.addEventListener("DOMContentLoaded",function(){
const arrayify = getSelection.call.bind([].slice);
arrayify(document.querySelectorAll("a.mktReTok"))
.forEach(function(link){
link.addEventListener("click",function(){
this.search += ( this.search ? "&" : "" ) + "mkt_tok=" + window.__mktTokVal;
});
});
});
Thanks so much!
Hi,
where do you out that code?
You can put it in the <head> or anywhere else, doesn’t matter as it waits for the page to be ready.