Form Attribution: Know Which Marketing Drives Your Leads
Every form submission has a source. AttributionHub captures channel, campaign, keyword, landing page, and referrer data automatically, so every lead arrives with full marketing context in your CRM.
Why Form Attribution Matters
Without attribution, your marketing and sales teams are flying blind. You know how many leads you got. You don't know which budget produced them.
Prove Marketing ROI
Connect ad spend to real leads. Attribution shows which campaigns generate form submissions, not just clicks or impressions.
Optimize Budget Allocation
Stop funding channels that drive traffic but no conversions. Double down on the campaigns that actually produce form leads.
Shorten Sales Cycles
When your CRM shows the lead source, sales reps know how the prospect found you and can tailor their pitch accordingly.
Improve Lead Quality Reporting
Track which sources produce high-quality leads that convert to customers, not just contacts that fill out a form and disappear.
How Form Attribution Works
Attribution tracking captures context at two moments: when a visitor first arrives on your site, and when they submit a form. The gap between those two events can be seconds or weeks. Read the full technical breakdown in the how it works documentation.
Step 1: Capture on Arrival
When a visitor lands on any page of your site, the AttributionHub script reads the URL
parameters and referrer. For paid traffic,
this means UTM parameters like utm_source=google and utm_campaign=spring-promo.
For organic or social traffic,
it means the referrer domain and path.
The data is classified into one of 20+ marketing channel groups and stored in the visitor's browser using first-party storage. It persists across page views and even across sessions for returning visitors.
Step 2: Populate Hidden Form Fields
When the visitor reaches a form — a contact form, demo request, quote form, or newsletter signup — the attribution script reads the stored data and injects it into hidden fields on the form. These fields are invisible to the visitor but submitted along with the form. This works with all major form builders including HubSpot, Gravity Forms, Typeform, Webflow, and standard HTML forms.
Step 3: Data Arrives in Your CRM
The form submission lands in your backend with the attribution values attached. Your CRM, marketing automation platform, or data warehouse receives the lead's name, email, message, and their full marketing journey: source, medium, campaign, keyword, landing page, and referrer. Learn how to send attribution data to your CRM.
Try Form Attribution in the Playground
Want to see form attribution in action before installing anything? The AttributionHub Playground is an interactive demo where you can simulate visitor journeys from different traffic sources — Google Ads, organic search, social media, email campaigns, and more. Watch how the attribution script detects the channel, captures UTM parameters, and populates hidden form fields in real time.
You can simulate multiple visits to see how first-touch and last-touch attribution work across sessions, inspect the raw localStorage data, and preview exactly what your CRM would receive. No account or installation required.
Learn more in the playground documentation.
What Attribution Fields to Capture
| Field | Parameter | What It Tells You |
|---|---|---|
| Channel | ah_channel | Paid Search, Organic, Email, Social, Direct, Referral |
| Source | utm_source | google, facebook, newsletter, linkedin |
| Medium | utm_medium | cpc, organic, email, social |
| Campaign | utm_campaign | Campaign name from your ad platform |
| Keyword | utm_term | Search keyword that triggered the ad |
| Landing Page | ah_landing_page | First page the visitor saw on your site |
| Referrer | ah_referrer | The site that sent the visitor to you |
First Touch vs. Last Touch Attribution
Most businesses need both types of attribution data.
First-touch attribution credits the original source that brought the visitor to your site. It answers the question: how did this person first discover us? This is valuable for understanding which channels build awareness and fill the top of your funnel.
Last-touch attribution credits the most recent source before form submission. It answers: what marketing touchpoint pushed this person to convert? This is valuable for optimizing conversion-focused campaigns and landing pages.
AttributionHub captures both automatically. Your hidden fields receive first-touch and last-touch values so you can analyze both in your reporting. See the full list of available fields in the field reference.
Common Use Cases for Form Attribution
B2B Lead Generation
Know whether enterprise demo requests come from paid LinkedIn campaigns, organic search, or partner referrals — and allocate budget accordingly.
SaaS Free Trial Signups
Track which blog posts, ads, and landing pages produce trial signups that later convert to paying customers.
Service Business Inquiries
Tie contact form submissions to Google Ads campaigns. See cost per lead by keyword and cut underperforming ad groups.
Event & Webinar Registrations
Understand whether registrations come from email marketing, social promotion, or organic search to plan future promotion spend.
Ecommerce Quote Requests
For high-ticket or custom products, attribution data in quote forms shows which channels attract serious buyers.
Multi-Location Businesses
Compare form attribution by landing page to see which locations generate leads through paid vs. organic channels.
Form Attribution Across Platforms
Form attribution works with any form tool that supports hidden fields. AttributionHub integrates with all major form builders and platforms without requiring custom development or platform-specific plugins.
Supported platforms include Gravity Forms, WPForms, Contact Form 7, HubSpot Forms,
Webflow Forms, Typeform, Formstack, Marketo, Pardot, and standard HTML <form> elements.
The attribution script is platform-agnostic: it reads the DOM and auto-populates any
field whose name matches a known attribution parameter. See the
form integrations guide
for setup instructions for your specific platform.
Getting Started with Form Attribution
Setting up form attribution takes minutes. Follow these steps or read the full installation guide.
-
Add the script — Copy the AttributionHub JavaScript snippet into your website's header. It loads asynchronously and won't affect page performance.
-
Add hidden fields — Add hidden fields to your forms matching the attribution parameter names. Start with channel, source, medium, campaign, landing page, and referrer.
-
Tag your campaign links — Add UTM parameters to your ad, email, and social media links. Use the UTM builder to generate properly formatted URLs.
-
Verify the setup — Submit a test form and check that the attribution data appears in your form backend. The verification guide walks you through the testing process.
Frequently Asked Questions
Does form attribution require third-party cookies?
No. AttributionHub uses first-party browser storage (localStorage and sessionStorage)
to persist attribution data. It works even when third-party cookies are blocked or when
a visitor has declined cookie consent banners. Learn more about
privacy and compliance.
What happens if a visitor comes back days later?
First-touch attribution is stored for up to 90 days by default. If a visitor discovered your site from a Google Ad two weeks ago and submits a form today after returning through direct navigation, the form will still record the original Google Ads source as the first-touch attribution.
How do I see attribution data in my CRM?
Once hidden fields are submitted, the values arrive in your CRM or database like any other form field. Map the hidden field names to custom properties in HubSpot, Salesforce, Pipedrive, or your platform of choice to make attribution data available in contact records, deal views, and reports.
Can I track form attribution across a multi-step funnel?
Yes. Attribution data is stored at the browser level and follows the visitor across multiple pages. Whether the form is on the landing page or three steps deep in a wizard flow, the attribution fields will be populated from the original visit context.
Can I try form attribution before installing?
Yes. The AttributionHub Playground lets you simulate visitor journeys and see how form attribution works in real time. You can test different traffic sources, watch hidden fields populate, and inspect the captured data — all without creating an account or installing anything.
Is form attribution the same as conversion tracking?
They're complementary but different. Conversion tracking (Google Ads, Meta Pixel) tells your ad platform that a conversion happened so it can optimize bidding. Form attribution captures the full source context inside your own data — your CRM, database, or analytics tool — so you own it permanently and can analyze it without depending on ad platform reporting. Read more about conversion tracking vs. attribution.
Add Attribution to Your Forms Today
Install AttributionHub in minutes and start capturing marketing source data in every form submission — no developer required.
Get Started Free