Redirecting UnsubscribePage.html to custom preference center w/token | Community
Skip to main content
New Participant
May 30, 2024
Solved

Redirecting UnsubscribePage.html to custom preference center w/token

  • May 30, 2024
  • 1 reply
  • 1665 views

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?

 

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by SanfordWhiteman

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.

1 reply

SanfordWhiteman
New Participant
May 30, 2024

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!

NickWa7Author
New Participant
June 3, 2024

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
SanfordWhitemanAccepted solution
New Participant
June 3, 2024

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.