SOLVED

Re: Non-Marketo form data capture using munchkin code

Go to solution
akshat_goyal
Level 3

Non-Marketo form data capture (using munchkin code?)

Hi,

 

Is there any way we can capture non-marketo form data using munchkin code or we can add any script in webpage that sends form data in marketo. 

 

And what will be the steps for us to capture form data in Marketo as well apart from just the click (using munchin code)? Here basically we have click event at form submission on our web page, but we want to capture who submitted the form so, probably Name and email address and company we want to capture .

 

3 ACCEPTED SOLUTIONS

Accepted Solutions
Darshil_Shah1
Level 10 - Community Advisor + Adobe Champion

Re: Non-Marketo form data capture using munchkin code

Hi @akshat_goyal, the best way is to use the ghost form or submit a hidden marketo form in the background. Here’s the full documentation re that on the Marketo Developers site. Alternatively, you can also post the form data to Marketo’s form submit API endpoint, but that being an API call to Marketo doesn’t scale well and bottlenecks under a large number of form fills (consumes calls from your API quota, rate limits, and concurrency). The former background form submission using the form2 JS is the best way to make a form submission to marketo via a non-Marketo page. Additionally, just to clarify both the methods will log a Fill out Form activity in Marketo, and any campaigns listening for it/smart list filter based on it will operate normally as if people filled out the Marketo form. There are similar threads already in the community around this if you want to search. Let us know if you have questions.

View solution in original post

SanfordWhiteman
Level 10 - Community Moderator

Re: Non-Marketo form data capture using munchkin code

You don’t need to worry about Munchkin. Munchkin is not a dependency for forms.

View solution in original post

SanfordWhiteman
Level 10 - Community Moderator

Re: Non-Marketo form data capture using munchkin code

Moreover, the code in that blog post is not ideal. You should be using the whenReady event:

 

// run this when you have to data to shoot over to Marketo
MktoForms2.whenReady(function(readyform){

  // populate fields
  readyForm.addHiddenFields({
    "Email" : email_value_from_visible_form_or_page_data,
    "FirstName" : first_value_from_visible_form_or_page_data,
    "LastName" : last_value_from_visible_form_or_page_data
  });

  // after the hidden Marketo form has submitted, don’t redirect 
  readyForm.onSuccess(function(submittedValues,thankYouHref){
     return false;
  });
  
  // submit to Marketo
  readyForm.submit()
});

 

 

 

View solution in original post

7 REPLIES 7
Darshil_Shah1
Level 10 - Community Advisor + Adobe Champion

Re: Non-Marketo form data capture using munchkin code

Hi @akshat_goyal, the best way is to use the ghost form or submit a hidden marketo form in the background. Here’s the full documentation re that on the Marketo Developers site. Alternatively, you can also post the form data to Marketo’s form submit API endpoint, but that being an API call to Marketo doesn’t scale well and bottlenecks under a large number of form fills (consumes calls from your API quota, rate limits, and concurrency). The former background form submission using the form2 JS is the best way to make a form submission to marketo via a non-Marketo page. Additionally, just to clarify both the methods will log a Fill out Form activity in Marketo, and any campaigns listening for it/smart list filter based on it will operate normally as if people filled out the Marketo form. There are similar threads already in the community around this if you want to search. Let us know if you have questions.

akshat_goyal
Level 3

Re: Non-Marketo form data capture using munchkin code

Hi @Darshil_Shah1  Thanks for your help, this docs that you shared is nice but I did not get this part of the article. 
how to implement this in munchkin code ? and how to fetch form data here in this code? 

akshat_goyal_0-1705692435888.png

 

SanfordWhiteman
Level 10 - Community Moderator

Re: Non-Marketo form data capture using munchkin code

You don’t need to worry about Munchkin. Munchkin is not a dependency for forms.

SanfordWhiteman
Level 10 - Community Moderator

Re: Non-Marketo form data capture using munchkin code

Moreover, the code in that blog post is not ideal. You should be using the whenReady event:

 

// run this when you have to data to shoot over to Marketo
MktoForms2.whenReady(function(readyform){

  // populate fields
  readyForm.addHiddenFields({
    "Email" : email_value_from_visible_form_or_page_data,
    "FirstName" : first_value_from_visible_form_or_page_data,
    "LastName" : last_value_from_visible_form_or_page_data
  });

  // after the hidden Marketo form has submitted, don’t redirect 
  readyForm.onSuccess(function(submittedValues,thankYouHref){
     return false;
  });
  
  // submit to Marketo
  readyForm.submit()
});

 

 

 

SanfordWhiteman
Level 10 - Community Moderator

Re: Non-Marketo form data capture using munchkin code

akshat_goyal
Level 3

Re: Non-Marketo form data capture using munchkin code

@SanfordWhiteman  @Darshil_Shah1 

 

If I use Marketo Background form feature, does it capture proper data in Marketo or when the lead got synced from dynamics it will just fetch the value from the form and show in Marketo active logs? 

SanfordWhiteman
Level 10 - Community Moderator

Re: Non-Marketo form data capture using munchkin code

Not sure you understand: this is an actual Marketo form post.

 

It’s not “pending data” or anything like that. It’s immediately available in the Activity Log for the lead.