Integration with Marketo Forms
If you are using Marketo web forms to capture leads on your website, you need to do a minor customization to the web forms so that the two fields required by the AdIntel App are populated properly when the visitor clicks the submit button. The update of the two AdIntel fields is done in the onSubmit() handler of the standard javascript code provided by Marketo.
Prerequisites:
- You have included the following AdIntel javascript on your web site, just before the body tag:
- Marketo is integrated with your Salesforce CRM org and is configured to push leads captured from web forms to Salesforce.
Procedure:
- Create the web form as you normally do with the Marketo Lead Management form designer (Form Editor 2.0).
- Add the AdIntel fields ads__landing_url__c and ads__referral_url__c as hidden fields to the form. It is assumed that the names of the two AdIntel fields in the generated HTML are ads__landing_url__c and ads__referral_url__c. In case Marketo creates different names for these two fields, please adapt the javascript accordingly.
- Do any other necessary customizations and approve the form.
- Right click the form in the tree menu and select “Embed Code“.
- In the javascript code, implement/modify the onSubmit handler as shown in the example below.
- Save the code and make a test to check that the AdIntel fields are being populated.
- Done. AdIntel is now integrated with your Marketo web form. Please repeat this procedure for all other Marketo forms.
Example:
Reference: Marketo Forms 2.0