Prefill forms on external pages help | Community
Skip to main content
August 10, 2016
Question

Prefill forms on external pages help

  • August 10, 2016
  • 3 replies
  • 4447 views

I'm trying to figure this out. I've followed this page:

http://developers.marketo.com/blog/external-page-prefill/

...and the links within.... I'm still at a loss on how to pull this off. Is there a code example I can follow somewhere?

I was able to get the auth and endpoint setup along with the token (which seems to go invalid a lot) - I was able to paste in the address bar and see proper data come back into the browser (<host>/rest/v1/leads.json?filterType=cookie&filterValues=<cookie>&fields=email,firstName,lastName,company&access_token=<token>) - but where do I go from here? I am quite certain I have all the pieces setup and ready to go, but don't know how to put them all together to get forms to be prefilled.

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

3 replies

SanfordWhiteman
Level 10
August 10, 2016

You cannot access the REST API directly from the browser.  The security impact would be catastrophic.

The intent of that blog post is to describe a way that custom server-side code can be used as a gateway between the browser and your Marketo database. However, it is still a very bad idea unless you build in deliberate security and rate-limiting features. Ultimately, you shouldn't create any architecture that uses one API call in response to one uncontrolled end-user action.  You don't have enough calls for that.

August 10, 2016

So, if I understand correctly, utilizing a method of pre-filling form fields on an external page is not a very good idea?

SanfordWhiteman
Level 10
August 10, 2016

Utilizing a method is not a bad idea, but using that method is a bad idea (especially if you are not a server-side developer).

Level 10
August 11, 2016

Andrew Yaple

We have a couple of Marketo Add-ons which can help you with this. The external landing pages where you want the pre-fill to work, which platform are they built on?

Level 2
August 16, 2016

Is there a straight-forward way to do this with ZenDesk?

SanfordWhiteman
Level 10
August 16, 2016

In which direction? zE.identify() can bring data into the ZenDesk widget. Please be specific about where the user will and won't be identified in you scenario.

I should mention that the add-on noted above, however attractive, is still using the methods recommended against in my first post.

February 14, 2018

One work around that I've done in the past is to use a Marketo form and populate it on the landing page via an iframe. It's not an ideal solution, but it allows you to use the pre-fill functionality of a Marketo form on the page that you desire, without the security concerns.

SanfordWhiteman
Level 10
February 14, 2018

This is a much more reasonable solution than people give it credit for -- I'd much rather see IFRAMEs than these other fragile solutions.