Form pre-fill on Non Marketo pages with background form submission | Community
Skip to main content
New Participant
October 7, 2021
Solved

Form pre-fill on Non Marketo pages with background form submission

  • October 7, 2021
  • 1 reply
  • 4375 views

Background

We use custom forms on non-Marketo pages which then submit to Marketo in the background. This works great and gives us lots of flexibility especially with A/B tests. The team now would like a pre-fill feature for all users. The idea is that if the visitor is known, we should pre-fill the form with their info (name, email, company, e.t.c.). This applies to all types of visitors.

 

Plan

Previously, I've looked into using _mkto_trk as described in this article: https://developers.marketo.com/blog/external-page-prefill/. In a nutshell, I'd be checking for the existence of that cookie on page load before Munchkin loads and sets a new cookie for the anonymous visit. If it exists, then that would indicate that the user has been cookied in the past. Then I'd go ahead hit the leads db to retrieve the known users info (if known) via Marketo's REST API. In doing this, I'd at least cut down the number of requests made per visit since it'd only happen when the user has been cookied prior to the current visit. 

 

Question is, is the above plan reasonable? What are other options for pre-filling forms? How else do you identify users (name, email, phone, e.t.c.) ? I'm happy to explore custom options like storing session data in localStorage and looking that up in subsequent visits.

 

Thank you internet in Marketoverse. 

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by SanfordWhiteman
There's only one way to do this that doesn't crumble under the slightest pressure (natural or malicious):

https://blog.teknkl.com/pre-fill-any-site-any-form/

Any other method isn't vouchsafeable.

1 reply

SanfordWhiteman
SanfordWhitemanAccepted solution
New Participant
October 8, 2021
There's only one way to do this that doesn't crumble under the slightest pressure (natural or malicious):

https://blog.teknkl.com/pre-fill-any-site-any-form/

Any other method isn't vouchsafeable.
Jo_Pitts1
Community Manager
October 8, 2021

@tonym ,

Follow @sanfordwhiteman 's blog - but be VERY VERY detail focussed.  There are a couple of moving parts that I often don't get quite right though moving to fast!

TonyMAuthor
New Participant
October 8, 2021

The blog post is well written and clearly explains what the code does. I do see what you mean though, lots of moving pieces!