Hi all Marketo Ninjas,
Facing a strange issue,
No Token values are showing up on landing pages, though they work in emails.
So we need to display the email address of the user on a landing page and are using the {{lead.Email Address:default=edit me}} token.
Any assistance on this is appreciated.
Thanks - Manish
Can you explain the use case? Is it within a form to prepopulate an email field?
If so, is the form being embeded on a Marketo hosted landing page, or your own site?
Hi Chris,
The token is in the body of the landing page populated using the rich text
editor. The use case is to show the user her/his email address before they
unsubscribe using a form beneath this text.
With Best Regards
Manish Khemani
Lead - Marketing Automation & Analytics
Tata Consultancy Services
Mailto: manish.khemani@tcs.com
Website: http://www.tcs.com
Hey Manish,
I have good news and bad news. The good news is, this is the expected behavior of Marketo. Think about it, if you could just plop a token value onto the code of a landing page and get it to resolve the stored value, that's a pretty huge security flaw. Anyone could modify your page code and just swipe stored values from your database, not a great experience.
Bad news is, you either have to change your form to incorporate the field into the form itself and accept the times the field will and won't prefill, or do a bit of dev work to get it working exactly as you currently have it designed.
So, here's the thing. If it's a Marketo hosted page and your goal is to show the person's email address to them before they unsubscribe, I would recommend simply adding email address as a field on your form, enabling prefill on that form field in the form options in Marketo, and you're basically good to go. So long as you have the link tracked and the mkt_tok enabled for the unsubscribe link in your email assets, it will prefill as desired when a user lands on the page. Marketo used to ALWAYS prefill cookied users on landing pages, but back in June they "upgraded" prefill and removed this feature. Here's a good piece of documentation that shows when prefill will work (and when it won't) on a Marketo landing pages with the newer rules.
If this option isn't acceptable, you have to do some dev work to enable prefill all the time on your landing pages. The easiest way (which I myself use) is Sanford Whiteman's method which you can read about on his blog here. Basically, some simple-ish code work needed and you have to get a single javascript file hosted on your web server, but otherwise the implementation is all Marketo-based. The good news is, if you do this, you can drop the prefill code anywhere on your parent domain and form prefill will always work across your entire website, not just Marketo hosted pages.
Hope this helps,
Chris
Many Thanks Chris,
But is there a way I can make a field read-only in the form; It's one of
our security requirements (& hence I had taken the token option).
With Best Regards
Manish Khemani
Lead - Marketing Automation & Analytics
Tata Consultancy Services
Mailto: manish.khemani@tcs.com
Website: http://www.tcs.com
Not natively that I know of, but just quickly searching the community came up with this thread that has some ideas.
Looks like you can inject some code on the landing page to lock the fields if they're populated. This is the piece of code needed to add. Maybe that will get you what you need?
MktoForms2.whenRendered(function(form) {
/* array of the fields you want to mark read-only */
var lockFilledFields = ["FirstName", "Email"];
/* ---- NO NEED TO EDIT BELOW THIS LINE! ---- */
This is the standard use case for {{lead.tokens}}, and the value absolutely should display in a Marketo-hosted Landing Page if the pageview is associated with a lead.
However, if your link tracking is broken for some reason and someone doesn't have an existing associated Munchkin session, then they'll land on your page anonymously. In this case a token like {{lead.Email Address}} will not have a value.
I have checked the 'include mkt_tok' option on the hyperlink of the this (Unsubscribe) page which has the email address token.
One question here - When a user clicks on this link from his email (manish.khemani@tcs.com) and lands on the Unsubscribe page which is cookied on a different email address e.g. Khemani.manish@gmail.com, what value will the token display?
I have checked the 'include mkt_tok' option on the hyperlink of the this (Unsubscribe) page which has the email address token.
And do you see the mkt_tok (you will have to view-source the tracked link to see it)?
When a user clicks on this link from his email (manish.khemani@tcs.com) and lands on the Unsubscribe page which is cookied on a different email address e.g. Khemani.manish@gmail.com, what value will the token display?
The email address of the already-associated lead: khemani.manish@gmail.com.
You said you weren't seeing any values, though. So that's a more fundamental question.
I have checked the 'include mkt_tok' option on the hyperlink of the this (Unsubscribe) page which has the email address token.
And do you see the mkt_tok (you will have to view-source the tracked link to see it)?
When a user clicks on this link from his email (manish.khemani@tcs.com) and lands on the Unsubscribe page which is cookied on a different email address e.g. Khemani.manish@gmail.com, what value will the token display?
The email address of the already-associated lead: khemani.manish@gmail.com.
You said you weren't seeing any values, though. So that's a more fundamental question.