Creating a Landing Page with Tokens based on LeadID

Amy_Lepre
Level 7

Creating a Landing Page with Tokens based on LeadID

Hi,

Here's my scenario:

A lead takes an action on our site and we send the lead owner an email with details about the lead. We have this part working fine.

Now we want to add a link to a feedback landing page in the email. On the landing page, we have tokens that display the lead's name, email address, etc. However, those tokens are being populated with the lead owner's data instead of the lead's data. We need the tokens on the landing page to be specific to the lead - NOT the lead owner.

My thinking is that we need to grab the lead ID or some other type of identifying information and pass that value to the landing page then have the tokens populate based on the lead ID rather than the lead owner that is viewing the page, but I am not sure how to make this happen.

Thoughts, ideas? 

Thanks!
Tags (1)
6 REPLIES 6
Anonymous
Not applicable

Re: Creating a Landing Page with Tokens based on LeadID

In the alert email, you can pass the lead attributes in the URL link as a parameter. Then, on the form, specify "Get value from URL Parameter" for the respective fields.

For example, the link in the email should be something like:

http://your.domain.com/page.html?field1={{lead.field1}}&field2={{lead.field2}}
Anonymous
Not applicable

Re: Creating a Landing Page with Tokens based on LeadID

Have you tried using a PURL? I haven't done this, so it's just a guess.

Otherwise, I don't think there is a way to switch the context from the owner to the lead in the standard out-of-box landing page.  This might be able to be done with the SOAP API, but again it's a guess.
Jep_Castelein2
Level 10

Re: Creating a Landing Page with Tokens based on LeadID

I think the key is that you shouldn't be pre-filling the landing page, so remove the munchkin from the landing page (it's a PHP include in the landing page template). The token approach suggested by Charlie would be a good solution, however, you'll need some JavaScript to put URL parameter values into the form. But I think that's the cleanest solution. 

The PURL could potentially work, but it wouldn't be very reliable for John Smith or other generic names. Also, it would actually cookie the sales rep as John Smith, so you'd have to clear the cookie afterwards, to avoid that the sales rep's web activity is being logged on the lead record. 
Amy_Lepre
Level 7

Re: Creating a Landing Page with Tokens based on LeadID

Hi again.

Thanks for your earlier replies. I have this working for the most part now, but am coming up against a problem with the cookies that Jep touched on in his response.

First, my solution as it stands today:

  • Lead takes an action on our site, we capture it and when certain criteria are met, we pass this lead on to a lead owner via an alert
  • The alert sends the lead values via tokens & includes a link to a feedback landing page
  • The link to the landing page is built with the query parameters & tokens as suggested by Charlie above
  • The form fields on the landing page populate from the values in the querystring with the exception of the required "Lead Feedback" field. All fields except Lead Feedback are set to read-only using JS
  • Lead record is updated with the data that is populated/entered from the form
  • User goes to TY page after form submission

All this works great. The problem is the lead owner is now being associated with the lead. For example, we have a lead - Jane Smith - who we pass on to the lead owner - John Doe. John clicks the link in the email and is taken to the LP with form that is populated with Jane's info. Jane's feedback field gets updated, but Marketo now thinks John is Jane. The next time John fills out a form on a regular Marketo LP, it is pre-populated with Jane's info.

I removed the munchkin code from the template on the landing page and thank you page. I set the form to not pre-populate in the form settings. I see there is another cookie being set on the LP and TY page: RSMKTO1 I'm not sure how to remove that or even if that is my problem. 

Thoughts?
Jep_Castelein2
Level 10

Re: Creating a Landing Page with Tokens based on LeadID

Use JavaScript to blank out the hidden form field _mkt_trk, which contains the sales rep's cookie ID (which they may have gotten at another page that has the Munchkin). 
Amy_Lepre
Level 7

Re: Creating a Landing Page with Tokens based on LeadID

That's definitely the right solution, but I had a really hard time getting it to work using JS. I just took the Marketo form off the page and added it in manually using a custom HTML block. This is what non-JS experts have to resort to. 🙂

Thanks for your help, Jep!