Re: Using a Token to display a database field

Ashley_Rodwell
Level 1

Using a Token to display a database field

I want to use a token to display a database field, I have it setup as below;

1.PNG

But it renders as the below on the page;

2.PNG

Does anyone know of a way to use a token to display a database field?

I did enter "{{lead.Membership Package}}" on the template HTML, but it wasnt displaying the values on test users, despite the field having data in.

4 REPLIES 4
Michael_Florin
Level 10

Re: Using a Token to display a database field

Your first setup must fail, as you cannot use a token within a token.

But if you put {{lead.Membership Package}} in the HTML, and this field has a value for your test member, that value should be displayed. How did you test this? You can either

  • preview your email and use "View by person"
  • send the email in a real send email flow step
  • send email as a sample and populate the Person field
Ashley_Rodwell
Level 1

Re: Using a Token to display a database field

Sorry, I should have been more clear in the content.

This is for a Landing Page, not an email. 

Michael_Florin
Level 10

Re: Using a Token to display a database field

Ah, okay. Doesn't make that big a difference. To test, send a real email from an email sending flow step to your test person with a link to that landing page in it. After clicking the link you should see that landing page with a populated token. The email link needs to be tracked, so the LP URL after clicking the link needs to look something like this: 

www.yourdomain.com/landingpage/?mkt_tok=verylongstring

SanfordWhiteman
Level 10 - Community Moderator

Re: Using a Token to display a database field

The email link needs to be tracked, so the LP URL after clicking the link needs to look something like this: 

 

www.yourdomain.com/landingpage/?mkt_tok=verylongstring

Unfortunately, by the time you look at the URL the mkt_tok is stripped off on Marketo LPs, even if it was properly tracked.

Without asking someone to go too deep into the technical weeds, It's probably sufficient to see if the link was rewritten to bounce off the tracking (branding) domain. Even though tracking doesn't absolutely guarantee the mkt_tok was attached, by default if the link was tracked it's also mkt_tok-enized.