Associate Leads from external site to Marketo Landing Page | Adobe Higher Education
Skip to main content
Cory_Colt
Level 2
September 17, 2019
Domanda

Associate Leads from external site to Marketo Landing Page

  • September 17, 2019
  • 2 risposte
  • 6115 visualizzazioni

We created a "manage subscription" form and created a marketo landing page for it. The form is set to prefill the form fields. We're having an issue getting the form to populate with the user's information. 

Currently we have a website separate from Marketo, but we're trying to integrate our website with some Marketo functionality. We're trying to provide a user with a link "Manage Subscriptions and Preferences" which takes them to a marketo landing page we created with the custom form referenced above.

How do we accomplish this functionality to allow the user to click on the link, but then be taken to a marketo landing page with the form populated already with the user's information? 

What I've done: 

I'm using the Associate Lead REST API functionality to associate the lead, so I'm sending a POST request with the user's marketo ID and munchkin cookie information. I'm getting back a status code of 200 (OK), but the form still isn't populating. 

This seems like such common functionality that I'm a little confused as to why it's not called out in the documentation. I've spent HOURS and HOURS at this point going through the documentation, but I'm at a loss on this one. Any help would be greatly appreciated.

2 risposte

SanfordWhiteman
Level 10
September 17, 2019

Munchkin session association doesn't mean native form Pre-Fill works. (It never meant that on external sites, though it's quite recently that it stopped meaning it on Marketo LPs as well.)

Native Pre-Fill only works in response to clicks on Marketo-tracked email links.

To extend Pre-Fill, use my JS library: nation.marketo.com/groups/newyork-user-group/blog/2018/05/04/form-pre-fill-external-sites-no-limits-youre-welcome 

Jay_Jiang
Level 10
September 18, 2019

Can your application just append the user's data as a query string to the email preference centre url?

An alternative to Sandford's script, and if you're associate api call is working, take a look at nation.marketo.com/thread/50485-pre-fill-workaround if you decide to keep your preference centre as a marketo landing page

Cory_Colt
Cory_ColtAutore
Level 2
September 18, 2019

Jay, this is actually what I was hoping I could do is pass the marketo user id or some other data as a query string over to the landing page and have it populate the form based on looking up the user's data with the data I'm sending it. However, I can't find any documentation on this type of functionality. Instead, it seems like you're supposed to associate the lead (which I am currently doing), but it still doesn't populate the form. According to Sanford, this functionality isn't readily available out of the box.

Do you know of a way to just send some user data along with the query string to have the landing page pre-fill the form based on what's in the query string? 

SanfordWhiteman
Level 10
September 18, 2019

It's not that you can't pass values in the query string. It's that AutoFill (not Pre-Fill, which is different, as described above) from URL params only natively works for hidden fields.

If you search, I've posted several examples of how to roll your own AutoFill for visible fields using a URI library, URI.js or my FormsPlus library (which includes URI.js). Such as here: MktoForms2 :: KV HTML w/Auto-Fill and Cascade v1.1.0