Passing Known Lead/Person From Our Website to "Supplemental" Form on Marketo LP | Community
Skip to main content
Jeremy_Caverly
Level 2
April 11, 2019
Solved

Passing Known Lead/Person From Our Website to "Supplemental" Form on Marketo LP

  • April 11, 2019
  • 1 reply
  • 4925 views

I feel like I've read 30+ posts/topics and still can't seem to figure this one out.

https://lovemycreditunion.org

Goal Path/Outcome:

  • Person registers for our Sprint program via our 4-5 step PHP web app.
  • At Step 2, we PushLead update via REST API with First Name, Last Name and Email Address
  • We get back Marketo ID in API response and store in app code
  • At final registration step we PushLead update with several Custom Fields we've collected
  • Person arrives at Registration Complete/Confirmation page, still on LoveMyCreditUnion.org
  • To enter them into a new sweepstakes, I need 2 more fields from them so we'll link them to a Marketo-hosted LP with the additional fields (Postal Code and a Accept Terms boolean check-box)

What do I need to append to the URL that links them from Registration Complete page on our web app to the Marketo LP to make sure that Marketo Form submission on that LP is stitched/appended to their record?

I've tried appending Base64 encoded ?email= in a URL parameters string with hidden email field on the form and that's not working.

Is the only solution to do an associateLead call to the Javascript API while they're moving through my web app and we know their email address? Can we query the REST API for a mkt_tok to append to the URL that takes them to the Marketo LP? I'm worried I'll have LP/Form submissions in my DB with only Postal Code and Check Box Boolean and none of the other data we just collected in our web app properly joined in Marketo DB.

Best answer by SanfordWhiteman

I've tried appending Base64 encoded ?email= in a URL parameters string with hidden email field on the form and that's not working.

A URL param will work fine, but it can't be Base64-encoded because Marketo will simply use the Base64-encoded value! There's no awareness that the string should be treated in any special way.

You can transform the hidden field after it's populated:

MktoForms2.whenReady(function(form){

var currentValues = form.getValues();

form.setValues({

Email : atob(currentValues.Email)

});

});

There are some other optimizations I would probably do to your workflow but if your concern is how to pass in an obfuscated hidden field, this is how.

1 reply

Jeremy_Caverly
Level 2
April 11, 2019

*fingers crossed* "San the Man" @Sanford Whiteman​ happens across this one.

SanfordWhiteman
SanfordWhitemanAccepted solution
Level 10
April 11, 2019

I've tried appending Base64 encoded ?email= in a URL parameters string with hidden email field on the form and that's not working.

A URL param will work fine, but it can't be Base64-encoded because Marketo will simply use the Base64-encoded value! There's no awareness that the string should be treated in any special way.

You can transform the hidden field after it's populated:

MktoForms2.whenReady(function(form){

var currentValues = form.getValues();

form.setValues({

Email : atob(currentValues.Email)

});

});

There are some other optimizations I would probably do to your workflow but if your concern is how to pass in an obfuscated hidden field, this is how.

Jeremy_Caverly
Level 2
April 11, 2019

Very much want to know of any improvements we can make end-to-end.

Does it need to be email address or can we use another unique Custom Field like we can for lookupField on API calls? Only reason we assumed obfuscation was to not send PII into Google Analytics. I started this thinking we'd send id=[the lead's Marketo ID] but I couldn't find that in the Fields selection to set as a hidden field.