Pardot Knowledge Base

Integrating Pardot with Salesforce Web-to-Lead forms

Last Updated: Nov 23, 2016 | Print this Article

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.

In Pardot:

    1. Navigate to Marketing > Forms > Form Handlers.
    2. Click + Add Form Handler.
    3. Enter a Name. This is only used internally.
    4. Optional: add Tags.
    5. Select a Campaign with which to associate the Form Handler.
    6. 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.
    7. Mark any other form handler options as desired. See this article for more details and notes about form handlers.
    8. Enter the URL for your Salesforce post address as the Success Location:
    9. Enter the page on which the form currently resides for your Error Location. Visitors are redirected here upon a submission error.
    10. 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.
    11. 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[]'
    12. Click Save Changes.
    13. 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.
    14. Click Create Form Handler to save. Click on the name of your newly created form handler.
    15. Click View form handler code to see the post address for the form handler.

In Your Salesforce Web-to-Lead Source Code:

  1. 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.
  2. Change the return URL to be the URL of your confirmation page, where the visitor will be redirected upon submission.
  3. Keep the rest of the source code as is.
  4. 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.

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.

Need more? Start a conversation with other Pardot users in our Success Community