Track Lead Source in Attio: A Practical Setup Guide
Website analytics can tell you which pages people visit, but it cannot tell you which marketing channel produced a particular lead, opportunity or customer. To answer that question, the source information has to travel with the person through your form and into Attio. This guide explains how to capture that data, what it contains, and how to turn it into reports you can act on.
Why analytics alone is not enough
Google Analytics and similar tools are built around website visitors, not individual records in a CRM. They can show traffic patterns, but they do not attach a source to a named lead once that person submits a form. If you want to know which channel produced a closed customer, the source needs to be stored on the record itself. The approach below uses a lead-source tracking tool to read the visitor's origin, write it into hidden form fields, and pass those values into Attio alongside the lead's name and email.
The four-step setup
The workflow has four stages. First, install the tracking code and add hidden fields to your lead capture forms. Second, let the tool populate those fields with channel and drilldown values. Third, submit the form so the data reaches Attio. Fourth, build reports from the stored values. Each stage is described below.
Step 1: Install the code and add hidden fields
After signing up for a trial, you receive a piece of code to place on your website. It can usually be added directly through your site settings or through a tag manager such as Google Tag Manager. Once the code is live, add hidden fields to every form that captures leads. The fields to create are: Channel, Channel Drilldown 1, Channel Drilldown 2, Channel Drilldown 3 and Channel Drilldown 4. Most form builders let you drag a hidden field type into the form or mark an existing field as hidden in the settings. The exact method varies by tool, so check your form builder's documentation if the option is not obvious.
Step 2: How the hidden fields get filled
When a visitor arrives, the tracking code examines technical signals similar to those used by analytics platforms to determine where the visit originated. It then classifies the visitor into a channel such as Organic Search, Paid Search or Paid Social and stores that classification in a cookie in the browser. When the visitor later completes a form, the stored values are written into the hidden fields. This means the source is captured at the point of form submission, not reconstructed afterwards.
Step 3: Sending the data to Attio
On submission, your form tool collects the hidden field values together with the lead's name, email and any other fields you have configured. That combined record is then sent to Attio. The tracking tool works with the main form builders, including Gravity Forms, Contact Form 7, Wix forms, Webflow forms and Typeform, so the same pattern applies across platforms.
Step 4: Reporting inside or outside Attio
Once the source values are stored on Attio records, you can report on them using Attio's built-in reporting tools or an external analytics tool such as Microsoft Power BI or Looker Studio. Useful questions include which channels produce the most leads, what proportion convert to opportunities, and how many customers each channel has generated.
What data is captured
Two categories of data are passed to Attio: marketing channel data and landing page data. The channel data identifies the broad source and then drills down through up to four levels of detail. The landing page data records the first page the lead saw and the category that page belongs to.
Marketing channel data in practice
For a paid search visit, the channel field might read Paid Search, with drilldowns identifying Google, the campaign name and the specific ad. For an organic search visit, the channel might read Organic Search, with drilldowns identifying Google, the Google domain and, where available, the keyword used. The exact values depend on the UTM parameters attached to the ad or link. The table below shows the two examples side by side.
Landing page data
The landing page field records the first page a lead sees, such as a specific blog post, together with the page category, such as Blog. This lets you compare performance at the category level and then drill into individual posts to see which ones generate leads and customers.
Three reports worth building first
Start with leads by channel. This shows the volume each channel produces and helps you decide where to direct budget. Next, look at opportunities by Google Ads campaign if you run paid search; this reveals which campaigns produce leads that sales accepts. Finally, if you advertise on Facebook, break customers down by network (Facebook, Instagram, Messenger) to see where your ad spend is most effective. The reports below are illustrative examples of the format, not benchmarks.
A pre-launch checklist
Before you rely on the data, confirm the following: the tracking code is present on every page that hosts a lead form; all five hidden fields exist on each form and are spelled consistently; a test submission from a known source produces the expected channel and drilldown values in Attio; and a direct visit is recorded as Direct rather than left blank. If a field is empty, check that the form is passing the value through to Attio before assuming the tracking code is at fault.
Wrap-up
Capturing lead source in Attio is a matter of connecting three things: a script that identifies the visitor's origin, hidden fields that carry the values through the form, and a reporting layer that turns those values into decisions. Once the pipeline is in place, you can see which channels, campaigns and pages actually produce customers rather than just traffic.
| Field | Paid search example | Organic search example |
|---|---|---|
| Channel | Paid Search | Organic Search |
| Channel Drilldown 1 | ||
| Channel Drilldown 2 | Brand Campaign | www.google.com |
| Channel Drilldown 3 | Free trial ad | Attio CRM |
| Channel Drilldown 4 | — | — |
Values depend on the UTM parameters used and on whether keyword data is available.
Frequently asked questions
What is the difference between a missing source and a Direct source?
A missing source means the hidden field was empty at submission, which usually points to a form or integration problem. A Direct source means the visitor arrived without a referrer or campaign parameter and was correctly classified as direct traffic. Check the field mapping before treating a blank as a tracking failure.
Do I need to add all four drilldown fields?
The setup described here uses Channel plus four drilldown fields. If your form builder limits the number of hidden fields, you can start with Channel and the first drilldown, but you will lose some campaign detail.
Can I report on lead source outside Attio?
Yes. The source values are stored on the Attio record, so you can use Attio's reporting tools or export the data to a tool such as Microsoft Power BI or Looker Studio.