SOLVED

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

Go to solution
Jeremy_Caverly
Level 2

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

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.

1 ACCEPTED SOLUTION

Accepted Solutions
SanfordWhiteman
Level 10 - Community Moderator

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

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.

View solution in original post

8 REPLIES 8
Jeremy_Caverly
Level 2

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

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

SanfordWhiteman
Level 10 - Community Moderator

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

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

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

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.

SanfordWhiteman
Level 10 - Community Moderator

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

Forms dedupe on Email (or Email + another field if you have that set up by Support), not on ID.

I assume you're talking about a flow that moves across private domains. Otherwise, if you associate the cookie and that same cookie is present on the Mkto domain, you don't need to include the Email address at all.

Jeremy_Caverly
Level 2

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

Ok I think I'm following.

If we want to go the route of:

go.lovemycreditunion.org/sprint-cash-rewards-50k-sweeps-entry.html?email=[base64 encoded email address]

Where/when do we implement the code you referenced in the previous answer? Is that somewhere in the HTML in the Marketo Form Settings? In the HTML of the Marketo LP?

SanfordWhiteman
Level 10 - Community Moderator

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

On the Marketo LP, just inside the closing </body> tag.

Jeremy_Caverly
Level 2

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

Not having any luck on test page here: go.cusolutionsgroup.com/Sprint-Sweeps-Roll-Up_TEST-Email-Complete.html

Made a new Page Template with that code inside /body tag. Any ideas?

SanfordWhiteman
Level 10 - Community Moderator

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

You forgot to wrap it in a <script>!