Marketo Forms

If you're using Marketo forms to record customer sign-ups in PartnerStack (for example, if your "get a demo" or "contact us" form is powered by Marketo), you'll want to combine PartnerStackJS with the Marketo Forms JavaScript API. Please refer to their documentation for the most up-to-date information on accessing data from forms.


PartnerStackJS (Step 1) is required

Before continuing, please ensure that Step 1 of the snippet setup has been completed correctly. Customizing this example to fit your needs helps with Step 2 of the snippet setup only.

If you want to send customer data into PartnerStack on form submit, a great way to do that could be through the onSubmit handler provided in the Forms API:

// Please update values appropriately.
// See:
MktoForms2.loadForm("//", "your_munchkin_id", 12, function(form) {
    // Add an onSubmit handler
        // Get the form field values
        var vals = form.vals();
        // Set customer data object in PartnerStackJS: = vals.Name; = vals.Email;
        // In this case, email is the customer identifier for my business = vals.Email;
        // Send data to PartnerStack:

The original example can be found in Marketo's developer documentation. Please customize these to fit your program needs. For example:

  • You may wish to use the onSuccess handler instead. The example here uses onSubmit as the triggering event to send information to PartnerStack
  • Here we're using Name and Email, but you may want to use different fields from your Marketo form to populate the information in PartnerStack.