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>
See what gets captured
Every touchpoint, automatically tracked and ready for your CRM.
How it works
Three steps. No configuration required.
Add the script
Drop the script tag anywhere on your site. That's it.
Visitor arrives
Attribution data is captured automatically and stored in the browser.
Form submits
Hidden fields are injected and sent straight to your CRM.
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.
Built-in debug panel
Inspect captured data, monitor form injections and troubleshoot in real-time, all from a draggable overlay (try it).
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>