SOLVED

Redirecting UnsubscribePage.html to custom preference center w/token

Go to solution
nwarr
Level 2

Redirecting UnsubscribePage.html to custom preference center w/token

We are working on implementing a custom preference center outside of Marketo. I have been looking at ways to repurpose this landing page to retrieve their preference center token, then forwarding them to a tokenized URL.

  • Customer clicks Unsubscribe/Manage Preferences {system.UnsubscribeLink}
  • Customer lands on Marketo LP UnsubscribePage.html
  • Ideally Mkto passes tokenID from record, then via JS, forwards them to preferencecenter.com/{{lead.tokenID}}

 

<script>
  setTimeout(function() {
    window.location.href='https://www.preferencecenter.com/{{lead.tokenID}}'
  }, 7000);
</script>

 

 

The redirect works, but the token does not appear until the page is visited a second time or refreshed prior to redirect. Is there any way we can force this token to appear on the first visit for all users who have a {lead.tokenID}? Can we leverage the form prefill for this kind of functionality despite this not being a form page?

 

1 ACCEPTED SOLUTION

Accepted Solutions
SanfordWhiteman
Level 10 - Community Moderator

Re: Redirecting UnsubscribePage.html to custom preference center w/token

OK. Always best to describe what you expect your code to do in order to contrast those expectations with observed behavior.

 

In any case there's zero reason for a {{lead.token}} to not output a value if the person has that field populated. {{lead.tokens}} would be useless if you couldn't rely on a tracked Marketo link to result in personalized output.

View solution in original post

4 REPLIES 4
SanfordWhiteman
Level 10 - Community Moderator

Re: Redirecting UnsubscribePage.html to custom preference center w/token

Don’t understand that incredibly long 7 second delay. What exactly are you expecting to happen in that period?

 

The {{lead.token}} will always be available when viewing a mkt_tok_enized link — assuming of course it has a value in in Marketo. And even if it weren’t available, waiting 7 seconds won’t do anything because the page is already rendered!

nwarr
Level 2

Re: Redirecting UnsubscribePage.html to custom preference center w/token

Displaying a short message about our new preference center experience vs redirecting immediately which can be a confusing experience, especially if the tokenized version of the link does not work. I am confident however, that the number of seconds is the least important part of the issue we're trying to resolve.

SanfordWhiteman
Level 10 - Community Moderator

Re: Redirecting UnsubscribePage.html to custom preference center w/token

OK. Always best to describe what you expect your code to do in order to contrast those expectations with observed behavior.

 

In any case there's zero reason for a {{lead.token}} to not output a value if the person has that field populated. {{lead.tokens}} would be useless if you couldn't rely on a tracked Marketo link to result in personalized output.

nwarr
Level 2

Re: Redirecting UnsubscribePage.html to custom preference center w/token

Thank you -- we will continue to test, otherwise I will consider this closed as it sounds like the methods being used are correct.