Skip to main content
Tie lead form submissions on your website back to the marketing touchpoints that drove the visit, so form fills show up in Invoca reporting with full attribution.
Just want attribution, not automatic SMS follow-up? This guide is for accounts that only want form fills tied to marketing attribution. If you also want Invoca’s AI Messaging Agent to automatically text new leads, see AI Messaging Agent: Lead Form Follow-Up Guide instead — it covers this same form and webhook setup, plus the AI Agent configuration.

Overview

Lead Form Attribution connects form submissions on your website to the marketing data Invoca already tracks for that visitor’s session. When a prospect submits a lead form, Invoca ingests the submission, identifies the originating web session, and associates the submission with that session’s attribution data in reporting, such as the ad, keyword, or campaign that drove the visit. At a high level: a visitor fills out your lead form, Invoca captures attribution data tied to that web session, your system sends the form submission to Invoca via API or CRM webhook, and Invoca links the submission to the originating session so it appears in reporting with full attribution.

Prerequisites

Before you begin, you’ll need:
  • A live Invoca Tag already running on the pages hosting your lead forms.
  • The ability to add a hidden field to your lead form’s HTML.
  • A way to send a server-side HTTP request to Invoca after each form submission (either directly, or through your CRM).

Step 1: Configure your lead form

Lead Forms are created and managed in the Lead Forms section of the Invoca platform. To create one, navigate to Lead Forms, select New Form, and give it a descriptive name that identifies its purpose, such as “New Patient Appointment.” If your account includes the agentic suite, you may see an AI Agent toggle; leave it off if you only want this form to track attribution.

Step 2: Save and get your webhook URL

Once you save the form, Invoca displays a unique Webhook URL in the format https://api.invoca.net/leads/{form_id}. This URL is how form submission data reaches Invoca, and it’s also available later from the Lead Forms table or the form’s own page.

Step 3: Enable attribution tracking

To tie submissions back to attribution data, add a hidden <input> element to your lead form’s HTML. Invoca automatically populates it as long as the field uses one of these identifiers containing invoca_attribution_id: its name attribute, id attribute, class attribute, or a data-invoca_attribution_id data attribute. Example:
If this is your first Lead Form, re-publish your Invoca Tag so it can detect the new form and start inserting the attribution ID (formatted as <network_id>/<tag_id>/<invoca_id>). Submissions missing this field won’t carry attribution data. Note that some lead forms hosted on third-party platforms may not support hidden fields, so attribution won’t be captured for those submissions.

Step 4: Submit form data to Invoca

Once a lead submits your form, send that data to Invoca via a server-side HTTP request, using one of two methods:
  • Direct API integration: send a POST request to your form’s Webhook URL with a JSON body. The only field that must be present for attribution to work is event_data.invoca_attribution_id; everything else (name, email, phone number, or any other Customer Data Field or Signal) is optional.
  • CRM webhook via middleware: if your CRM can’t make direct API calls, Invoca supports a middleware layer that converts your CRM’s webhook format and field names into the JSON Invoca expects. This is configured by the Invoca team on a per-customer basis; contact your account representative to set it up.
Phone numbers should be submitted in E.164 format (for example, +13035550100); incorrectly formatted numbers may fail to process. For the full list of supported request fields, see the API field reference in AI Messaging Agent: Lead Form Follow-Up Guide — the same ingestion endpoint and fields apply here.

Reporting

Form fill activity appears in Invoca reporting as a Form Fill Event, tied to the originating web session and the marketing touchpoint that drove it. Events typically appear in near real-time.

Frequently asked questions

My lead form is on a third-party platform and I can’t add a hidden field. Can I still send data? Yes, but without the attribution ID field, the submission won’t be tied to a web session or marketing touchpoint. If attribution matters for that source, direct traffic to a form on your own site instead.
Last modified on September 30, 2026