A simple integration allows you make use of Salesforce's Web-to-Lead forms for campaign and source tracking as well as Pardot's micro-level web analytics. The integration allows for a dual post of form data to both Salesforce and Pardot almost simultaneously.
- Navigate to Marketing > Forms > Form Handlers.
- Click + Add Form Handler.
- Enter a Name. This is only used internally.
- Optional: add Tags.
- Select a Campaign with which to associate the Form Handler.
- Mark Enable data forwarding to the success location. Once Pardot receives the post, the exact same data post will be transferred to the location specified as the Success Location.
- Mark any other form handler options as desired. See this article for more details and notes about form handlers.
- Enter the URL for your Salesforce post address as the Success Location:
- Enter the page on which the form currently resides for your Error Location. Visitors are redirected here upon a submission error.
- Optionally add Completion actions or an Autoresponder email (alternatively this could be sent via Salesforce's web-to-lead form) and users to be notified upon submission.
- Select the Pardot Prospect Field that should be used to record data submitted to this field. You also have options under the Basic tab to make the field required or change its Data Format. Under the Advanced tab you can set the error message of the field and whether the field should be enabled to 'Maintain the initial value upon subsequent form submissions' or not. Note: for fields that allow multiple values to be entered such as checkboxes and multi-selects, you will need to add a  after each input name. For example, an input name of software would be entered as 'software'
- Click Save Changes.
- For each input field on the target form that will be captured, click Add Another Field and repeat steps 11-12 until you have added all of the fields you wish to include in your form handler.
- Click Create Form Handler to save. Click on the name of your newly created form handler.
- Click View form handler code to see the post address for the form handler.
In Your Salesforce Web-to-Lead Source Code:
Note: Using this method may cause duplicate leads if you use completion actions to assign prospects in Pardot, because Pardot will create a lead for an assigned prospect at the same time that Web-to-Lead creates a lead. Keep in mind that Web-to-Lead forms create a new lead each time they are filled out, which can also cause duplicates.
- In your HTML for the Web-to-Lead form, change the post URL to the Pardot form handler URL that you learned by clicking View form handler code.
- Change the return URL to be the URL of your confirmation page, where the visitor will be redirected upon submission.
- Keep the rest of the source code as is.
- Your form submissions will now post to both Salesforce and Pardot nearly simultaneously. Salesforce posts do have a slight delay and you may see data in Pardot a few minutes before the lead appears in your CRM system.
Need more? Start a conversation with other Pardot users in our Success Community