Skip to content

Track leads and customers from AI in Salesforce

AI assistants now send real buyers to company websites, but most CRM setups cannot say which assistant sent which lead, or what that lead was worth. This guide shows a four-step way to capture AI referral data with every form submission, push it into Salesforce, and run reports that separate AI traffic from AI revenue. The tracking product is referred to below as the tracking tool.

What you are trying to measure

A visitor can arrive from ChatGPT, Claude, Gemini or another assistant, fill in a contact form, and become a lead. Analytics may show the visit, but the CRM often has no record of the source. The goal is to make each lead carry its own origin: the channel, the AI tool, the referring domain and the landing page. Once those values live in Salesforce, you can compare AI against organic search, paid search and paid social on leads, customers, close rate and revenue.

Four steps from form to Salesforce

The workflow is: install the tracking snippet, add hidden fields to your forms, let the tool fill those fields on each visit, and sync the submission into Salesforce. Each step below names the exact field values you should expect to see.

1. Install the snippet and add hidden fields

After signing up for the tracking tool, place the provided snippet on your website. Then add these hidden fields to every lead capture form: Channel, Channel Drilldown 1, Channel Drilldown 2 and Channel Drilldown 3. Most form builders let you drag in a hidden field type or hide an existing field through settings. The exact steps differ by builder, so check your builder's documentation for hidden-field support.

2. The snippet fills the fields on each visit

When someone lands on your site, the snippet examines referral signals similar to those used by web analytics tools. It classifies the visit into a channel such as AI Referral, Organic Search, Paid Search or Paid Social, and stores that result in the visitor's browser. When the visitor later submits a form, the stored values are written into the hidden fields, including which AI tool referred them.

3. The form submission captures the AI data

On submit, your form tool records the hidden field values next to the lead's name, email and other answers. If the tracking tool supports your builder, the hidden fields will be captured with the submission. Common builders in this category include Gravity Forms, Calendly, Contact Form 7, Wix Forms, Webflow Forms, Typeform, Jotform and Zoho Forms, though you should verify current support for your specific builder before relying on it.

4. Push the data into Salesforce

Use your form builder's native Salesforce integration or an automation tool such as Zapier to send the submission into Salesforce. Once the fields land on the lead or contact record, you can build reports in Salesforce itself, in a BI tool such as Tableau, Looker Studio or Microsoft Power BI, or by connecting an AI assistant to Salesforce and asking questions like how many AI leads arrived this month.

Field map: what each hidden field holds

The table below shows the values you should expect for an AI referral, using a law-firm example where a visitor asked ChatGPT for a contract lawyer and clicked through to a blog post.

Four reports worth building

Once AI referral data is in Salesforce, these four reports answer different questions. Use them together rather than relying on any single one.

Leads by Channel

Count leads per month grouped by channel. This shows whether AI is a thin slice of your lead flow or already competing with established channels. The side-by-side view is what makes it useful: when AI turns out to be matching a paid channel you spend real money on, that comparison should shape how you split budget and time.

Customers by AI tool

Count new customers per month grouped by the AI tool that referred them. ChatGPT, Claude and Gemini do not behave identically; one may surface your content more often, or send visitors who convert at a better rate. Looking at paying customers rather than raw traffic tells you which assistants are worth the effort of staying visible and well cited in.

Close rate by channel

Divide customers by leads for each channel. Lead volume alone can mislead. As an illustration of the kind of pattern this report can reveal, AI referral leads might close at 35%, organic search at 10% and paid search at 7%. If your data looks like that, one AI lead is worth several paid-search leads, and that should change where you put the next dollar. It often happens because people who arrive from an AI tool have already had their questions answered and come in better qualified.

Revenue from AI by landing page

Group customers and revenue by landing page for AI referrals only. This shows which content pieces AI tools cite when sending actual buyers rather than curious visitors. When most of your AI-driven revenue traces back to a handful of posts, that is a practical pointer for what to commission next.

Choosing your sync path

Before building reports, confirm how form data will reach Salesforce. Use this checklist:

  • Does your form builder have a native Salesforce integration that maps custom fields?
  • If not, does an automation tool such as Zapier cover the same fields without loss?
  • Are the four hidden fields mapped to Salesforce fields on the lead or contact object?
  • Will the sync preserve the values on the record after conversion from lead to contact?
  • Can the reporting layer read those fields directly, or does it need a joined dataset?

Three different failures to tell apart

When AI numbers look wrong, the cause is usually one of three distinct problems.

  • Not recorded: the hidden fields are missing from the form, or the snippet is not installed, so no AI value reaches the submission.
  • Recorded but not reported: the values arrive in Salesforce but no report groups by channel or AI tool, so the data sits unused.
  • Reported but no revenue: leads and customers are counted, but the revenue field is not linked, so the report shows volume without value.

Diagnose which one you have before changing the setup.

AI referral field values (law-firm example)
FieldValue for an AI referralWhat it tells you
ChannelAI ReferralThe visitor arrived from an AI tool
Channel Drilldown 1ChatGPT (or whichever AI tool sent them)Which assistant referred the lead
Channel Drilldown 2chatgpt.comThe referring domain
Channel Drilldown 3NoneNo deeper level exists for an AI referral
Landing Pageabbottslaw.com/blog/contract-lawyers-sydneyThe page the visitor first saw
Landing Page Group/blogThe content group used for reporting

Values shown are illustrative for the example scenario; actual values depend on the referring tool and the page the visitor landed on.

Frequently asked questions

Does this work if the visitor returns later without clicking an AI link?

The snippet stores the channel result in the visitor's browser when they first arrive. When they later submit a form, the stored value is written into the hidden fields, so a returning visitor can still be attributed to the original AI referral.

What if my form builder is not on the supported list?

The tracking tool works with a range of form builders, scheduling tools and chat products, including Gravity Forms, Calendly, Contact Form 7, Wix Forms, Webflow Forms, Typeform, Jotform and Zoho Forms. Check your builder's documentation for hidden-field support before assuming it will work.

Why is Channel Drilldown 3 always None for AI referrals?

There is no deeper level of detail to capture for an AI referral, so the field comes through as None. The tool name and referring domain are already captured in Drilldown 1 and Drilldown 2.

Can I report on AI revenue without a BI tool?

Yes. Salesforce's own reporting can group by channel and landing page and sum revenue, provided the revenue field is populated on the record. A BI tool such as Tableau, Looker Studio or Microsoft Power BI is optional.