UTM tracking is the foundation of channel attribution, but most explanations either stay too abstract to act on or assume you're already running a full tracking stack. This guide covers what UTM parameters and click IDs actually capture, what first-touch versus last-touch means in practice, and how to get this working on a SaaS site without writing custom tracking code.
What UTM Parameters Actually Capture
UTM parameters are just query string values appended to a URL - utm_source, utm_medium, utm_campaign, and a couple of less common ones. When someone clicks a link with ?utm_source=newsletter&utm_medium=email, a tracking script reads those values off the URL and records them against that visit.
The catch is that UTM parameters only work when a link actually has them - which means you need to remember to tag every outbound link from every campaign. That works fine for planned campaigns you control (an email newsletter, a paid ad), but it does nothing for traffic that shows up without any tags at all.
That's where automatic referrer classification fills the gap.
Referrer Classification: Attribution Without Manual Tagging
Most channel attribution isn't based on UTM tags at all - it's based on reading the referrer header the browser sends and matching it against known domains. A visit arriving from google.com with no UTM tags gets classified as organic search. One arriving from linkedin.com gets classified as social. This is the same channel-grouping logic used by most standard analytics platforms, and it's what makes attribution work even for traffic nobody remembered to tag.
A solid attribution setup layers three signal types, in this priority order:
- UTM parameters - explicit and most reliable, when present.
- Click IDs - platform-specific identifiers like
gclid(Google Ads),msclkid(Microsoft Ads),twclid(Twitter/X), andfbclid(Facebook) that get appended automatically by ad platforms, even without UTM tags. - Referrer domain matching - classifies organic search (Google, Bing, DuckDuckGo, Yahoo), social (Instagram, Facebook, Twitter, LinkedIn, Reddit, YouTube, TikTok), and known referral sources (Hacker News, Product Hunt, and similar) automatically.
A fourth category - generic referral parameters like ref, via, and aff - covers the informal tagging scheme most affiliate and referral tools use, which doesn't fit neatly into UTM or click-ID conventions but is common enough to be worth recognizing on its own.
First-Touch vs. Last-Touch: What Each One Answers
| First-touch | Last-touch | |
|---|---|---|
| What it captures | The channel from a visitor's very first visit | The channel from the visitor's most recent visit before converting |
| Best for | Understanding what originally created awareness | Understanding what triggered the final action |
| Typical use case | Attributing a signup to the campaign that introduced the brand | Attributing a signup to a retargeting ad or reminder email |
Neither model is objectively correct - they answer different questions. A visitor might discover a product through a Product Hunt launch (first touch), disappear for three weeks, then come back and sign up after clicking a retargeting ad (last touch). Both channels played a real role. Recording both first-touch and last-touch data, rather than picking one, is what lets you answer either question later instead of committing to one model upfront.
Why Cross-Subdomain Tracking Matters More Than It Seems
A common failure mode: a visitor lands on yoursite.com, browses for a bit, then signs up on app.yoursite.com. If attribution cookies are scoped to just the marketing domain, that visitor's attribution data never makes it to the signup event on the app subdomain - and the signup shows up as unattributed, even though the original channel is known.
The fix is setting attribution cookies at the root domain level (.yoursite.com rather than yoursite.com), so they're readable from any subdomain. This is a small implementation detail, but it's one of the most common reasons attribution data silently disappears between a marketing site and a separately hosted app.
Getting This Running Without Custom Tracking Code
Building this from scratch means writing a script to parse UTM parameters, maintain a click-ID allowlist, classify referrer domains against a channel list, set root-domain cookies for first-touch and last-touch, and keep all of it in sync as ad platforms add new click-ID formats. It's a real project, not an afternoon task.
Chartsy's Growth feature handles this with a single script tag: automatic UTM parsing, click-ID recognition for major ad and social platforms, referrer-based channel classification, and first-touch/last-touch cookies shared across subdomains - all active as soon as the tag is installed, with no custom tracking code required.
Frequently Asked Questions
Do I need UTM parameters on every link for attribution to work? No. UTM parameters are the most explicit signal when present, but referrer-based classification and click-ID recognition cover most traffic that arrives without any tags at all.
What's the difference between a click ID and a UTM parameter?
UTM parameters are added manually by whoever creates the link. Click IDs like gclid or fbclid are appended automatically by the ad platform itself, so they work even if a campaign wasn't UTM-tagged.
Should I use first-touch or last-touch attribution? Both, if possible. First-touch shows what originally created awareness; last-touch shows what triggered the final conversion. Recording both lets you answer either question without having to pick a single model in advance.
Why would a signup show up as unattributed if the visitor came from a known channel? The most common cause is an attribution cookie scoped to only one subdomain. If a visitor's first visit and their signup happen on different subdomains, the cookie needs to be set at the root domain level to carry over.
Can I set this up without a developer? Basic visit tracking typically requires only a single script tag with no build step. Signup tracking can often be added with zero code via a form attribute, though custom signup flows may need one line of code.
Set up channel tracking with Chartsy Growth →
Related: Introducing Growth · Marketing Attribution for SaaS Founders · Growth feature overview

Written by
Chartsy TeamThe Chartsy Team writes guides, product updates, and resources to help SaaS and eCommerce founders make sense of their metrics, without SQL or spreadsheets.
Chartsy