---
schema_version: "1"
id: 776facd0f474c3d220217e3b60b45cf4ac361396379290a47c06e8fd0022eecb
title: Integrate Form Handlers with Web-to-Lead Forms
collection: admin
version: current
locale: en-us
portal_url: https://docs.salesforce.com/admin/current/en-us/mktg/264-0-0/pardot_forms_integrate_web_to_lead.md
canonical_url: https://help.salesforce.com/s/articleView?id=mktg.pardot_forms_integrate_web_to_lead.htm&release=264.0.0&type=5
source_site: help.salesforce.com
content_type: documentation
content_hash: e80485d3941477a68e82f926cb27c5f4e4d2c2f7bbc4e4b13243c94658b1a2a4
description: Use a form handler with an existing Salesforce Web-to-Lead form to track campaigns and sources in the micro-level web analytics available in Account Engagement. The integration posts form data to both Salesforce and Account Engagement almost simultaneously.
products:
  - Marketing
  - Marketing Cloud Account Engagement
release: "264"
---
# Integrate Form Handlers with Web-to-Lead Forms

Use a form handler with an existing Salesforce Web-to-Lead form to track campaigns and sources in the micro-level web analytics available in Account Engagement. The integration posts form data to both Salesforce and Account Engagement almost simultaneously.

### Required Editions

<table class="slds-table slds-table_bordered slds-max-medium-table_stacked slds-m-bottom_small edition"><colgroup><col></colgroup><tbody><tr class=""><td class="slds-cell-wrap" style="vertical-align:top;">Available in: <span>All Account Engagement Editions</span></td></tr></tbody></table>

<table class="slds-table slds-table_bordered slds-max-medium-table_stacked slds-m-bottom_small permission">
        <colgroup>
          <col style="width:50%">
          <col style="width:50%">
        </colgroup>
        <thead class="slds-text-title_caps ">
          <tr class="">
            <th scope="colgroup" class="slds-cell-wrap" colspan="2" style="text-align:center;vertical-align:top;" id="d38248e62">User Permissions Needed</th>
          </tr>
        </thead>
        <tbody>
          <tr class="">
            <td data-label="User Permissions Needed" class="slds-cell-wrap" style="vertical-align:top;" headers="d38248e62 ">To create a form handler:</td>

            <td class="slds-cell-wrap" style="vertical-align:top;" headers="d38248e62 ">
              <span>Account Engagement Administrator or Marketing
                role</span>
            </td>

          </tr>
        </tbody>
      </table>

We don’t recommend using this method if you use completion actions to assign prospects. Duplicate records are created when both the completion action and Web-to-Lead form create prospects.

1. Open the Form Handlers page.
    - In Account Engagement, select **Marketing** | **Forms** | **Form Handlers**.
    - In the Lightning app, select **Content** and then select **Form Handlers**.
2. Click **\+ Add Form Handler**.
3. Name the form handler.
4. Select a folder.
5. Select a campaign.
6. Mark **Enable data forwarding to the success location**. When Account Engagement receives the post, the same data post is transferred to the success location.
7. From the Success Location dropdown, select **Specific URL** and enter the Salesforce post address URL from your Web-to-Lead form code.
    
    - Forwarding to Salesforce production—Typically, the success location in this scenario looks something like https://webto.salesforce.com/servlet/servlet.WebToLead?encoding=UTF-8.
    - Forwarding to a Salesforce sandbox—Typically, the success location in this scenario looks something like https://MyDomainName\--SandboxName.sandbox.my.salesforce.com/servlet/servlet.WebToLead?encoding=UTF-8.
8. From the Error Location dropdown, select **Specific URL**, and enter the URL for the form. Visitors are redirected here upon a submission error.
9. Add and map form fields. Repeat these steps for each field on your form.
    1. Click **+Add New Field**.
    2. Enter External Field Name. The name is specified by the ‘name=’ attribute of the input tag in the HTML of your external form. External field name is case-sensitive.
    3. Select the appropriate prospect field.
    4. Save your changes.
10. Click **Create Form Handler**.
11. In the Summary section, copy the endpoint URL.

In your Web-to-Lead form source code, change the post URL to the form handler’s endpoint URL, and change the return URL to your confirmation page.