Need help! with POST URL setup

Anonymous
Not applicable

I am really lost right now...A vendor of ours has created a form/landing page that will be featured on various websites. She has asked that I send a POST URL to her, in addition to the fields that she should map to (including hidden fields). Well, I went to an article for guidance, and it ended up confusing me more.

I believe I was able to create the POST URL, which I sent to her, https://app-ab05.marketo.com/index.php/leadCapture/save​, but I'm confused when in the article it say, Note: The body of the POST to a Marketo form must be URL encoded. What does this mean???

Also, I am totally lost in regards to which fields to send her to map to. The article says "Go to Admin > Field Management and click the “Export Field Names” button to download a spreadsheet with the API field names," which I did, but then I'm not sure which fields to send her because there are three different types: REST API, SOAP API and Friendly Label. Within each of those types, the fields are completely different with different spacing, lowercase vs. uppercase, etc.

Also, the article says I should send "(1) munchkinId – This field is used for your Munchkin Account ID, (2) formid – This field indicates which form in Marketo has been submitted" and  "1) Email – this field is used as the primary key for deduplication. and  (2) _mkt_trk – this field carries the cookie information." I do not know where to find these two (they weren't in the spreadsheet I exported). Also, her question to me was do these fields have blank variables--I don't know how to respond...Please help!!!

pastedImage_13.png

pastedImage_14.png

15 REPLIES 15
Anonymous
Not applicable

Hi Laura,

Here are the steps you might want to follow. I tried to keep it simple here.

1> Assume that you want to create a landing page with form in Marketo to capture all the fields the vendor wants to capture on their form(s). Create a working landing page that with form in Marketo.

2> Open this landing page in your browser, view html source. Copy the html source.

You will have html  something like,

<li  class='mktFormReq mktField' ><label>Company Name:</label><span class='mktInput'><input class='mktFormText mktFormString mktFReq' name="Company" id="Company" type='text' value=""  maxlength='255' tabIndex='4' /><span class='mktFormMsg'></span></span></li>

<li  class='mktFormReq mktField' ><label>Work Email:</label><span class='mktInput'><input class='mktFormText mktFormEmail mktFReq' name="Email" id="Email" type='text' value=""  maxlength='255' tabIndex='5' /><span class='mktFormMsg'></span></span></li>

<li  class='mktFormReq mktField' ><label>Work Phone:</label><span class='mktInput'><input class='mktFormText mktFormPhone mktFReq' name="Phone" id="Phone" type='text' value=""  maxlength='255' tabIndex='6' /><span class='mktFormMsg'></span></span></li>

and so on....

Each of the fields your form need to ask will have html like 'name="Company"' or name="Phone" and so on for each field.

These are the field names you need to give to your vendor.

As you already know, there are additional mandatory fields such as munchkinId and formid needed.

3> Your vendor will write the code which will do the http post to this form with these fields. She will take care of encoding the http request. You do not have to do anything there.

4> When she submits the form for trial run, you can see these submits when you write a smart list listening to that form submit.

Hope this helps

Rajesh

http://www.Linkedin.com/in/RajeshTalele

Anonymous
Not applicable

Rajesh, are you saying that the fields the developer needs are the ones highlighted in orange below?

<form class='mktoForm mktoNoJS' action='http://pages.jerusalemprayerteam.org/index.php/leadCapture/save' method='post'>

  <div class='mktoFormRow'>

  <div class='mktoFormCol'>

  <label class="mktoLabel" for='FirstName'>

  First Name:  </label>

  <input type="text" class='mktoField mktoTextField' name='FirstName' id='FirstName'>

  </div>

  </div>

  <div class='mktoFormRow'>

  <div class='mktoFormCol'>

  <label class="mktoLabel" for='LastName'>

  Last Name:  </label>

  <input type="text" class='mktoField mktoTextField' name='LastName' id='LastName'>

  </div>

  </div>

  <div class='mktoFormRow'>

  <div class='mktoFormCol'>

  <label class="mktoLabel" for='Email'>

  Email Address:  </label>

  <input type="text" class='mktoField mktoTextField' name='Email' id='Email'>

  </div>

  </div>

  <div class='mktoFormRow'>

  <div class='mktoFormCol'>

  <label class="mktoLabel" for='LeadSource'>

  Source:  </label>

  <input type="text" class='mktoField mktoTextField' name='LeadSource' id='LeadSource'>

  </div>

  </div>

  <div class='mktoFormRow'>

  <div class='mktoFormCol'>

  <label class="mktoLabel" for='salemID'>

  Salem ID:  </label>

  <input type="text" class='mktoField mktoTextField' name='salemID' id='salemID'>

  </div>

  </div>

  <span style="display:none;"><input type="text" name="_marketo_comments" value=""></span>

  <span class='mktoButtonWrap'><button type='submit' class='mktoButton'>Submit</button></span>

  <input type="hidden" name="lpId" value="1290" />

  <input type="hidden" name="subId" value="144" />

  <input type="hidden" name="lpurl" value="http://pages.jerusalemprayerteam.org/Capital-Petition.html?cr={creative}&amp;kw={keyword}" />

  <input type="hidden" name="formid" value="1228" />

  <input type="hidden" name="ret" value="" />

  <input type="hidden" name="munchkinId" value="591-HWU-361"/>

  <input type="hidden" name="kw" value=""/>

  <input type="hidden" name="cr" value=""/>

  <input type="hidden" name="searchstr" value=""/>

  <input type="hidden" name="_mkt_disp" value="return"/>

  <input type="hidden" name="_mkt_trk" value=""/>

  </form>

Thank you,

Laura

SanfordWhiteman
Level 10 - Community Moderator

You see, Laura, this is why copy-and-paste leads to confusion.  It's not just the orange fields, but neither do they need all the fields from the LP version of the form.  If you send them the embed code, nothing can be miscommunicated.  The embedded form contains the minimum fields necessary to post from an external site to Marketo.

Anonymous
Not applicable

Point well taken Sanford...I did send her the embed code, but didn't get any feedback from her on whether she derived the fields or not. I will try again with her.

Also, it sounds like she is planning to include the munchkin code.

Thank you,

Laura

SanfordWhiteman
Level 10 - Community Moderator

What about the prefill question?

Anonymous
Not applicable

No, I just wasn't sure that in the event we have a lead already in the database who fills out the form, we would want to use the prefill option. I guess it's more of a best practices question. Is it best to use prefill on forms? There is one case where we used--with the unsubscribe form--and ran into issues where whenever someone tried to unsubscribe, it defaulted to their original status as still being subscribed.

Thanks,

Laura

SanfordWhiteman
Level 10 - Community Moderator

If you're on non-Marketo LP, you won't be able to use prefill unless you have a very Marketo-savvy developer.  So in your case you don't have a choice.

As for best practices when you have that choice, there's no one answer.  To some marketers, remembering someone's email address/firstname/lastname (at minimum) helps leads feel wanted, while others feel it's creepy.  Some companies prohibit "authentication" based only on an email address (i.e. not a password nor other auth factors), while others don't specifically care one way or the other.  To me, remembering entries within the same browser is fine, while remembering data across browsers is questionable (identifying them across browsers is a different question from actually pulling up their data and showing it to them. and even progressive profiling can be used without pushing existing data to the browser).

SanfordWhiteman
Level 10 - Community Moderator

It'll be more maintainable to send the URL of the LP as the guide, or to send the embed code.

When the required form fields change (and this will eventually happen) they'll automatically update in the live form. Sending HTML fragments is sure to end in sadness.  I never want to receive HTML via email (don't even like seeing it on a forum unless it's properly formatted or is very short).  First thing I do is copy the HTML into a live site to see if it actually works, so there's no reason to add an extra step!

Anonymous
Not applicable

Sorry to sound so naive, but what do you mean by "when the required form fields change"?

Another question is, on the form I created, do I need to have the hidden fields set to prefill for them to extract the desired data?

Thank you Sanford!

Laura

SanfordWhiteman
Level 10 - Community Moderator

I mean you must expect your underlying form field needs to change: that's just life.  Sending the developer a page that dynamically adjusts to the fields you need (specified in Marketo's Form Editor, where names and types are automatically filled in) guarantees you never to copy/paste/waste time.  Every time they view your "guide" form it will always tell them everything they need to include on their form.

As for the prefill question, I don't understand.  Are they expecting to read the lead's current field values from Marketo?

SanfordWhiteman
Level 10 - Community Moderator

The easiest way to deliver what she needs is by creating a mockup of the form itself in Forms Editor, then sending her the embed code.  In fact you need to have such a form if you are going to give her a Form ID!   By sending her the embed code, she can see for herself all the form names, including proper capitalization and mandatory hidden fields.  There can't be any confusion that way.

The only thing that she might not get straight away (if she's not a Marketo developer) is the _mkto_trk/_mkt_trk cookie.  This only applies if the site is running Munchkin.  Is it?

As for form encoding, URL-encoded is the default so I'm sure she's already using it.

If you have more questions, just hit me up at https://purechat.me/sanford.  I'm around!

Anonymous
Not applicable

Thank you Sanford, would this be the form embed code?

<script src="//app-ab05.marketo.com/js/forms2/js/forms2.min.js"></script>

<form id="mktoForm_1231"></form>

<script>MktoForms2.loadForm("//app-ab05.marketo.com", "591-HWU-361", 1231);</script>

If so, how can she tell which fields are in it?

Thanks again!

SanfordWhiteman
Level 10 - Community Moderator

You didn't mention whether the site is running Munchkin.

Anonymous
Not applicable

Sorry, I haven't found out yet...I will reply as soon as I find out.

Thanks so much!

Laura

SanfordWhiteman
Level 10 - Community Moderator

She adds that code on a test page and it embeds your form #1231.