Server-side Form Post or API? How are You Capturing Data? | Community
Skip to main content
February 27, 2015
Question

Server-side Form Post or API? How are You Capturing Data?

  • February 27, 2015
  • 4 replies
  • 4497 views
Working on a process where we will use a non marketo form to capture data within a lightbox and then pass it back to Marketo.

I've read Jep's great layout of the Server-Side App Method. Is this updated and still a best practice?
https://community.marketo.com/MarketoResource?id=kA650000000GsXXCA0
  • Any drawbacks or considerations?
  • Leverage Fills out Form for triggers? If so, do you always have to create a different Marketo form to tell the dfference between a demo submission and a WP submission?
  • Support for URL parameters and hidden fields?
  • Any other recommendations like soap API?


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

4 replies

Grant_Booth
Level 9
February 27, 2015

Hi Jeff,

We have a more updated and thorough article on this at the Developer's Blog:

http://developers.marketo.com/blog/server-side-form-post/

Justin_Cooperm2
Level 10
February 27, 2015
There isn't sample code on that blog post but here is what it would look like (also make sure the "app-aba" part of the url is aligned with what it is for your subscription):
 
<form id="myform" action="app-aba.marketo.com/index.php/leadCapture/save" method="POST">
<input type="hidden" name="munchkinId" value="Your_Munchkin">
<input type="hidden" name="formid" value="Your_Form">
<input type="hidden" name="Field_You_Want_Updated" value="New_Value">
</form>

Then call submit via JavaScript:

document.getElementById('myform').submit();

Level 4
November 19, 2015

Does this still work?

Justin_Cooperm2
Level 10
November 19, 2015

Yes it does. Are you having difficulties?

February 27, 2015
Hey Jeff, 

We use the SOAP API to sync data submitted in our app's registration form to Marketo. You need to do a SOAP call to create the record then a Munchkin associateLead call to link the cookie with the new record. 

It works well generally and is flexible. One thing to watch out for is we have occassionally had to troubleshoot race conditions between the two calls and sometimes the cookie not linking properly which caused us to lose web activity. We were able to resolve them though.  

I also was quite interested in the server-side form post method because of it's ability to link with the cookie in one step and also simulate an actual form fill out in Marketo. I believe you would need different forms for different purposes so you can differentiate them in Marketo. 

Also check out this recent thread which has some interesting technical discussion of the merits of the two approaches:

http://community.marketo.com/MarketoDiscussionDetail?id=90650000000Q1wEAAS
SanfordWhiteman
Level 10
February 27, 2015
@Jeff Coveney In the thread @Justin Norris linked to, consider my comment about using a client-side form post to Marketo using the same data you gather in your non-Marketo form.  

Unless you are altering data on your server, there may not be any reason to do server-side anything.  You can use a totally home-built form (or from another fancy form builder) and as long as you have the ability to add another JS onSubmit event to it, you can cross-post the data to Marketo as well.