Track Where Your Website Leads Come From
Your website generates leads. Do you know which traffic sources produce them? AttributionHub captures the source, campaign, and landing page behind every form submission — automatically and without cookies.
The Question Every Marketing Team Asks
"Where did this lead come from?"
It's the most fundamental question in marketing, and most businesses still can't answer it well. Your website gets traffic from dozens of sources — Google search, paid ads, social media, email campaigns, partner links, direct visits. Some of those visitors fill out a form and become leads. But when the lead appears in your inbox or CRM, the traffic source is missing.
You see a name, an email, maybe a phone number and a message. You don't see that this person found you through a Google search for "best accounting software" or that they clicked a LinkedIn ad promoting your webinar.
This gap between traffic data and lead data is what website lead tracking solves.
What Does It Mean to Track Website Leads?
Tracking website leads means capturing the marketing context behind each form submission on your website. This includes:
- Traffic source: Which website or platform sent the visitor (Google, Facebook, a partner blog)
- Marketing channel: The type of traffic (organic search, paid search, social, email, referral, direct)
- Campaign: The specific campaign name, if the link was tagged with UTM parameters
- Keyword: The search term the visitor used, for paid search traffic
- Landing page: The first page the visitor saw on your website
- Referrer: The full URL of the page that linked to your site
When this data is captured in your form submissions, every lead in your CRM carries the full story of how they found you.
Answer "Where Do Our Leads Come From?"
Replace guesswork with data. See the exact breakdown of lead volume by traffic source, campaign, and channel — not just traffic volume, but actual form submissions.
Justify Marketing Spend
Show stakeholders which campaigns produce real leads. Budget conversations become data-driven when you can prove that a specific channel generated a specific number of leads.
Find Hidden Opportunities
Discover lead sources you did not expect. A blog post ranking for a long-tail keyword, a niche directory listing, or an old email campaign might be quietly generating leads.
Stop Wasting Budget
Identify channels that drive traffic but no leads. A social media campaign with 10,000 impressions and zero form submissions is a signal to reallocate those dollars.
Three Ways to Track Lead Sources
There are a few approaches, ranging from unreliable to fully automated.
Approach 1: The "How Did You Hear About Us?" Dropdown
The simplest method: add a dropdown to your form asking visitors how they found you. Better than nothing, but it has well-known problems:
- Visitors often choose the wrong option or pick the first one
- They may not remember their actual path to your site
- The options you list may not match how they actually found you
- Self-reported data is inconsistent and hard to analyze at scale
Approach 2: Cross-reference with Google Analytics
GA tracks traffic sources at the session level. You can see which channels send visitors, but you can't connect a specific GA session to a specific lead. GA tells you "50 visitors came from LinkedIn today." It doesn't tell you which of those 50 submitted your form.
Approach 3: Capture Source Data in Form Submissions (the right way)
The most reliable approach: capture traffic source data in hidden form fields at the moment of submission. This is what AttributionHub does automatically.
The visitor never sees the hidden fields, but the data gets submitted alongside their name, email, and message. Your CRM or form backend gets the lead's contact info and their complete traffic source history.
How AttributionHub Does It
AttributionHub handles lead source tracking with a small JavaScript snippet that takes care of the entire process.
Detection
When a visitor arrives on your website, the script reads the URL to detect UTM
parameters (utm_source, utm_medium, utm_campaign, utm_term, utm_content)
and advertising click IDs (gclid, fbclid, msclkid, ttclid, li_fat_id).
It also reads the HTTP referrer to identify the source website.
Classification
The raw data is classified into a marketing channel group — Organic Search, Paid Search, Social, Email, Referral, Direct, or one of 15+ other channel types. This classification follows GA4-compatible rules, so your channel breakdown matches what you see in Google Analytics.
Storage
Attribution data is stored in the visitor's browser using first-party localStorage.
No cookies are used. The data persists across page views and across return visits for
up to 90 days. AttributionHub stores three attribution snapshots:
- First-touch: The original source that brought the visitor to your site
- Last-touch: The most recent source before form submission
- Last-non-direct: The most recent non-direct source, preserving campaign data when a visitor returns through direct navigation
Population
When the visitor reaches a form, AttributionHub scans for hidden fields and populates them with the stored attribution data. This works automatically with all major form builders including HubSpot, Gravity Forms, Webflow, Typeform, Contact Form 7, and HTML forms.
A Real Example
Here's what a form submission looks like with attribution tracking enabled:
| Form Field | Value | What It Means |
|---|---|---|
| Name | Jane Smith | Submitted by the visitor |
| [email protected] | Submitted by the visitor | |
| Channel | Paid Search | Auto-classified by AttributionHub |
| Source | Came from Google | |
| Medium | cpc | Paid click (cost per click) |
| Campaign | b2b-demo-q1 | From the B2B Demo Q1 campaign |
| Keyword | lead tracking tool | Searched for "lead tracking tool" |
| Landing Page | /features | Landed on the features page |
This tells you everything about Jane's journey: she found you through a Google Ads campaign targeting "lead tracking tool" and landed on your features page. Sales can reference her interest area. Marketing can credit the campaign.
See Lead Tracking in Action
Want to see how website lead tracking works before committing to a setup? The AttributionHub Playground is an interactive demo that lets you simulate visitor arrivals from different traffic sources. You can watch the attribution script detect channels, store source data, and populate hidden form fields — all in real time. Simulate multiple visits to see how first-touch and last-touch attribution handle returning visitors.
No account or installation required. See the playground documentation for a guided tour.
Who Benefits Most
B2B Companies with Long Sales Cycles
B2B buyers often visit your site multiple times over weeks before filling out a form. Without tracking, you lose the original source. AttributionHub's first-touch attribution preserves the campaign that started the relationship, even when the visitor comes back through a different channel later.
Agencies Managing Client Lead Generation
Marketing agencies need to report lead sources to clients. With attribution in each form submission, you can give clients clear per-lead source data instead of aggregate traffic data that doesn't tie back to business results.
SaaS Companies Tracking Free Trial Signups
Know whether trial signups come from product review sites, Google Ads, organic blog content, or social media. Connect signup source data to downstream conversion data to calculate true customer acquisition cost by channel.
Local Businesses with Multiple Traffic Sources
Local businesses often run Google Ads, maintain social media profiles, list on local directories, and invest in local SEO simultaneously. Lead tracking reveals which of these produces actual inquiries — not just website visits.
Ecommerce Companies with Quote or Contact Forms
For high-ticket or custom products that require a conversation before purchase, lead source tracking shows which marketing channels attract serious buyers versus casual browsers.
Getting Started with Lead Tracking
Step 1: Install the Script
Add the AttributionHub JavaScript snippet to your website. It loads asynchronously and won't slow down your pages. See the installation guide for your platform.
Step 2: Add Hidden Fields
Add hidden fields to your forms matching the attribution field names. Start with the core fields: channel, source, medium, campaign, landing page, and referrer. The field catalog lists all available fields.
Step 3: Tag Your Campaign Links
Add UTM parameters to your ad links, email links, and social media links. Un-tagged traffic from organic search and referrals is still tracked automatically through referrer detection.
Step 4: Submit a Test Lead
Visit your site through a campaign link and submit a form. Verify that the attribution data appears in your form backend or CRM. The verification guide explains what to check.
Frequently Asked Questions
How is this different from just looking at Google Analytics?
Google Analytics reports on anonymous website sessions. Lead tracking captures source data at the individual level, attached to real people who submitted your forms. GA tells you how much traffic you got. Lead tracking tells you which traffic produced leads.
Does this work for phone calls or chat inquiries?
AttributionHub tracks web-based form submissions. For phone calls, you would need a call tracking tool. However, if visitors interact with a web chat or chatbot that collects information through form fields, the attribution data can be captured.
What if someone visits from multiple devices?
Attribution data is stored per browser/device. If a visitor researches on their phone and submits a form on their laptop, the desktop session's attribution data is captured. Cross-device tracking requires user login, which is outside the scope of client-side attribution.
Can I track leads from organic search keywords?
Search engines (Google, Bing) no longer pass the search keyword in the referrer
URL for organic traffic. AttributionHub captures the referrer domain and landing
page, which tells you that the lead came from organic search and which page they
landed on. For paid search keywords, the utm_term parameter captures the
keyword.
How much historical data do I need before making decisions?
You need enough leads to see a pattern. For most businesses, two to four weeks of tracked leads provide a useful initial picture of which channels produce results. The more leads you generate, the faster you reach statistical significance.
Is my lead source data private and secure?
All data is stored in the visitor's own browser and submitted through your own forms to your own backend. AttributionHub never collects, stores, or sends your lead data to third-party servers. Your data stays yours. See the privacy documentation for details.
Start Tracking Your Website Leads
Install AttributionHub and know where every lead comes from. Setup takes minutes, works with all major form builders, and requires no cookies.
Get Started Free