Toggle color theme

Capture marketing attribution automagically for your website.

A lightweight, plug-and-play solution to add UTM tags, ad click IDs, referral sources, and more to your forms. Know exactly where your leads come from.

<script src="https://cdn.jsdelivr.net/npm/form-attribution@latest/dist/script.min.js" defer></script>
Try the builder

See what gets captured

Every touchpoint, automatically tracked and ready for your CRM.

UTM Parameters
utm_source google
utm_medium cpc
utm_campaign spring_sale_2026
utm_content hero_cta
Ad Click IDs
gclid EAIaIQobChMI...
fbclid IwAR3xZ9...
Session Data
landing_page /pricing
referrer_url google.com
first_touch 2026-01-07T14:32:00Z

How it works

Three steps. No configuration required.

1

Add the script

Drop the script tag anywhere on your site. That's it.

2

Visitor arrives

Attribution data is captured automatically and stored in the browser.

3

Form submits

Hidden fields are injected and sent straight to your CRM.

Photo of Ben Sabic, the creator of Form Attribution

Hey, I'm Ben 👋

Chartered Marketer

After years of setting up marketing attribution manually for clients, I got tired of the same repetitive work — copying UTM parameters, wiring up hidden fields, debugging form submissions.

So I built Form Attribution to solve it once and for all. One script, zero configuration, and it just works.

It's open source because good tooling should be accessible to everyone. If it saves you time, that's a win.

For Developers

Built-in debug panel

Inspect captured data, monitor form injections and troubleshoot in real-time, all from a draggable overlay (try it).

Form Attribution
Active Storage: Session Forms: 3
URL Parameters 9 captured
utm_source google
utm_medium cpc
utm_campaign spring_sale_2026
utm_content hero_cta
gclid EAIaIQobChMI...
fbclid IwAR3xZ9...
Metadata
landing_page /pricing
referrer_url google.com
first_touch 2026-01-07T14:32:00Z
#contact-form Injected
#newsletter Injected
.search-form Excluded
14:32:18 Captured 9 parameters
14:32:18 Injected into 2 form(s)
14:32:17 Initialized
14:32:17 Debug overlay loaded
Live data view See all captured UTMs and metadata
Form inspector Click to highlight any tracked form
Activity log Track events with timestamps
data-debug="true" Double-click to copy Copied!

Frequently asked questions

Everything you need to know about Form Attribution.

What forms does this work with?

Form Attribution works with virtually any HTML form! Custom forms, HubSpot, Webflow, WordPress, and more. If it's a standard form element, we'll inject the hidden fields automatically.

Do I have to add hidden form fields myself?

No. The script automatically detects forms on your page and injects hidden fields with the captured attribution data. No manual setup required.

Will this slow down my website?

No. The script is tiny and loads from a global network with hundreds of datacenters worldwide. It is optimized for performance and will not block rendering.

Is it privacy-compliant (GDPR, CCPA)?

Form Attribution respects Global Privacy Control (GPC) and Do Not Track (DNT) preferences by default. No data is sent to third parties, everything stays in the user's browser until it is sent alongside their form submission. However, compliance depends on your specific use case and jurisdiction. We recommend updating your privacy policy accordingly and consulting with a legal expert.

How long is attribution data stored?

By default, data is stored temporarily (cleared when the browser closes). You can configure local storage for longer persistence or cookies for cross-subdomain tracking.

Can I customize which parameters are captured?

Absolutely. Use the data-extra-params attribute to capture custom URL parameters, or data-click-ids="true" to automatically capture ad platform click IDs (gclid, fbclid, etc.).

Is this really free?

Yes, 100% free and open source under the Apache 2.0 license. No usage limits, no premium tiers, no catch. Use it on as many sites as you want.

Ready to capture every lead source?

Add the little script tag and never lose attribution data again.

<script src="https://cdn.jsdelivr.net/npm/form-attribution@latest/dist/script.min.js" defer></script>

Need help getting started?