First-Party Data for Attribution: A Practical Guide
A first-party data strategy for attribution: the 6 fields to collect, how to design the cookie and session, and the subdomain setup that survives Safari ITP.
Muzahid Maruf, Founder · TrackRev.io & Contant.io
On this page
- 01Why this matters for your revenue
- 02What counts as first-party data
- 03The six fields worth collecting
- 04Designing the cookie and session
- 05The subdomain setup
- 06From first-party data to attributed revenue
- 07Data minimisation and consent
- 08Limits of a first-party-only strategy
- 09The stack math
- 10When NOT to use TrackRev
Explore with AI
Opens this article inside the chosen assistant with a ready-made prompt.
First-party data is any signal your own domain collects directly — and a working attribution setup needs only about six fields of it, not the sprawling behavioural profiles ad networks used to assemble.
That is the reassuring part of the shift to first-party: you are not rebuilding a data empire, you are collecting a short, well-chosen list of signals and keeping them on infrastructure you own.
This guide covers what to collect, how to design the cookie and session that carry it, and the subdomain setup that keeps the whole thing surviving Safari ITP — so the identity lives long enough to tell you which channel your MRR actually traces back to.
It is deliberately practical. For the regulatory framing behind why first-party is now the default, pair it with our guide to GDPR-aligned first-party attribution.
Key Takeaways
- A first-party data strategy for attribution is deliberately small: about six fields — visitor ID, session ID, traffic source, click context, consent state, and customer ID — carried from click to charge.
- The cookie carrying those fields must be set by your server on your apex domain, so it survives Safari's seven-day script-cookie cap and follows the visitor across subdomains.
- Match the cookie lifetime to your attribution window and the window to your sales cycle; the median window in use is 27 days, with adoption clustering at 30 days.
- Route tracked links through a subdomain of your own apex via a CNAME and TLS certificate, so the cookie stays first-party rather than becoming third-party on a separate domain.
- First-party data cannot see off-domain touches or link devices without a login, so supplement it with zero-party self-reporting and a billing-anchored join rather than reaching for third-party data.
The one-line version
A first-party data strategy for attribution is small on purpose: collect roughly six fields — a visitor ID, a session ID, the traffic source, the click context, the consent state, and later the customer ID — on a cookie your own server sets on your apex domain. Collect less, keep it shorter, and it survives both ITP and scrutiny.
Why this matters for your revenue
The reason to be deliberate about first-party data is that attribution is only as good as the identity you can carry from the first click to the eventual charge.
Third-party data used to paper over the gaps — a cross-site cookie remembered the visitor even if you did not.
That crutch is gone: third-party cookies are blocked across Safari and Firefox and deprecating elsewhere, so the only identity you can rely on is the one you collect and hold yourself.
If you have not designed for that, the journey breaks silently and revenue lands in Direct.
The financial stakes are the median SaaS attribution window: 27 days of decision time (TrackRev platform data, Q2 2026).
Your first-party data has to survive that whole window intact, across multiple sessions and often multiple subdomains, or the click that started a three-week consideration is gone by the time the card is charged.
A well-designed first-party layer — server-set cookie, apex scope, a lifetime matched to your cycle — is what keeps the identity alive long enough to connect discovery to revenue.
Skimp on the design and you are not saving effort, you are choosing to misattribute your longest, most considered, and often most valuable purchases.
What counts as first-party data
First-party data is data your own domain collects directly from your own visitors, for your own use — not data bought, shared, or set by a third-party vendor. The category matters because browsers and regulators treat it very differently from third-party data.
First-party vs third-party vs zero-party
First-party data is observed on your domain: clicks, sessions, pages, the source that referred them. Third-party data is set or collected by someone else’s domain across many sites — the model browsers are dismantling.
Zero-party data is volunteered directly by the user: what they tell you in a signup form, a preference toggle, or a “how did you hear about us?” field. For attribution, first-party is the backbone and zero-party is a valuable supplement.
Where zero-party data fits attribution
Zero-party data — a self-reported source at signup — is the honest tie-breaker for the touches your first-party tracking cannot see, such as a podcast mention or a word-of-mouth recommendation with no click.
It is directional, not precise; people misremember and round to whatever is memorable. Used alongside first-party click data rather than instead of it, it recovers attribution for the dark-social and offline touches that would otherwise vanish into Direct.
The six fields worth collecting
You do not need a data lake. Six fields, carried from click to charge, are enough to attribute revenue to a channel with confidence.
| Field | What it is | Why it earns its place |
|---|---|---|
| Visitor ID | A random ID for the browser/device | The spine everything else attaches to |
| Session ID | An ID for the current visit | Separates repeat visits within a journey |
| Traffic source | utm_source / medium / campaign | The channel you are attributing to |
| Click context | Referrer, landing URL, click ID | Recovers source when UTMs are missing |
| Consent state | What the visitor agreed to | Governs what you may store and for how long |
| Customer ID | Billing ID, joined at purchase | Ties the journey to the actual charge |
A minimal first-party field set for revenue attribution, as implemented by TrackRev and described at /products/first-party-tracking (July 2026). Adapt to your own consent and data-retention requirements.
Visitor and session IDs
The visitor ID is a random, non-identifying token you generate and store in your first-party cookie — it is not an email or a name, just a stable handle for “this browser”. The session ID scopes a single visit within that.
Together they let you reconstruct a journey — first touch, return visits, conversion — without needing any cross-site identifier. Generate them yourself so they belong to you and are not shared with any third party.
Traffic source: UTM and click context
Capture the utm_* parameters on landing, and capture the referrer and landing URL alongside them so you can recover the source when a UTM is missing.
Store the source with first-touch-wins logic: only write it if it is not already set, so a later visit through a different channel does not overwrite the source that originally drove discovery.
This one rule is the difference between crediting the channel that found the customer and the channel that happened to be last.
Consent state
Store what the visitor consented to, and when. This field governs the others: it decides what you may write, how long you may keep it, and what you must delete on request.
Treating consent as a first-class field rather than an external banner concern is what lets you honour it reliably downstream — you can filter, expire, and erase by it because it lives in the record.
Designing the cookie and session
The fields only help if the cookie carrying them survives real browsers and a multi-session journey. Two design choices decide that.
Set the cookie on your apex
Set the cookie on .yourbrand.com — with the leading dot — so every subdomain can read it. A buyer who lands on www, signs up on app, and pays on checkout stays one identifiable visitor because the apex cookie follows them.
Scope it to a single subdomain and the identity resets at each hop, and the click that started the journey is orphaned by the time the charge lands.
Server-set vs script-set
How the cookie is written decides how long it lives. A cookie set by JavaScript is capped at seven days on Safari under ITP — shorter than the 27-day median decision window.
A cookie issued by your server in an HTTP response is not capped and lasts the full window you set.
For attribution that must survive weeks, always set the cookie server-side; never depend on a script-set cookie for anything longer than a week.
Choosing a cookie lifetime
Match the cookie lifetime to your attribution window, and match the window to your sales cycle.
Too short and you lose long, considered journeys; too long and you credit touches so old they no longer caused anything, while holding personal data past its usefulness.
The median window in use is 27 days, and window adoption clusters at 30 days (41% of workspaces) — a sensible default for most B2B SaaS. Our guide to setting an attribution window covers how to pick yours.
Matching the window to your sales cycle
A self-serve product with a same-week decision does not need a 90-day window, and a considered B2B purchase with a month of evaluation is under-served by seven days.
Look at your own time-from-first-touch-to-paid distribution and set the window to cover the bulk of it — commonly the point that captures roughly 80% of conversions. Then set the cookie lifetime to match.
The window is a business decision expressed as a data-retention setting.
The subdomain setup
First-party tracking runs through a subdomain you control, so the redirect and cookie belong to your apex rather than a vendor’s. The setup is short but has two rules that matter.
Why a tracking subdomain on your own apex
Route tracked links through something like go.yourbrand.com or links.yourbrand.com — a subdomain of the same apex as your main site. That keeps the cookie scope shared between the redirect and the pages the visitor lands on.
The moment you put tracking on a separate apex, you have recreated the third-party problem you were trying to escape: a cookie on a different registrable domain, which browsers treat as third-party. See custom tracking domains.
CNAME and TLS
Point a CNAME from your tracking subdomain to your provider, and issue a TLS certificate covering it — most providers automate the certificate once the CNAME verifies, usually within minutes.
Keep the redirect endpoint on the same apex as your marketing site so the cookie scope includes both. That is the entire infrastructure lift: one DNS record and a certificate, after which your links are first-party by construction.
From first-party data to attributed revenue
The fields become attribution when they are handed forward at each step of the journey and finally joined to a charge.
| Step | What happens to the first-party data | Failure if skipped |
|---|---|---|
| Click | Source + click context captured server-side | No source to attribute |
| Landing | Visitor & session IDs set on apex cookie | Journey cannot be reconstructed |
| Signup | Source copied onto the user record | Cookie expires, source lost |
| Checkout | Source written to billing metadata | Charge arrives with no source |
| Charge | Customer ID joins journey to revenue | Revenue lands in Direct |
The first-party hand-off chain as implemented by TrackRev (July 2026). Each step must persist the data forward or the attribution breaks silently. See /products/first-party-tracking.
Why the window length is not cosmetic
Attribution windows in use cluster at 30 days (41% of workspaces), then 14 days (18%) and 7 days (22%), with a long tail at 60 and 90-plus days (TrackRev platform data, Q2 2026). A team on a 7-day window with a 25-day median cycle is structurally blind to most of its own considered purchases — the cookie is gone before the buyer decides. The field set is only as useful as the lifetime you give it.
Data minimisation and consent
A first-party strategy is not a licence to hoard. The discipline that makes it survive scrutiny is collecting little and keeping it briefly.
Collect less, keep it shorter
Six fields, held for the length of your attribution window plus a modest reporting buffer, is a defensible posture.
Do not collect identifiers you have no attribution use for, and do not retain click-level rows for years when your cycle is weeks.
Minimisation reduces what you must secure, what you must disclose, and what you must delete on request — and it costs you nothing in attribution accuracy, because the old rows were not answering any live question anyway.
This is not legal advice; confirm retention rules for your jurisdiction with your own counsel.
Limits of a first-party-only strategy
First-party data is the durable backbone, but it is not omniscient, and an honest guide says where it stops.
It cannot see touches that never reached your domain — a podcast ad someone hears and acts on days later, a screenshot shared in a private group, a recommendation over coffee. It cannot deterministically link devices without a login.
And it depends on consent, so a visitor who declines is one you measure less of, by design.
The answer to these gaps is not to reach back for third-party data; it is to supplement first-party click data with zero-party self-reporting and a billing-anchored join, and to accept that some attribution is directional rather than exact.
The stack math
Owning your first-party data should not mean owning three tools that each keep their own slice of it.
Teams commonly run a link tracker like Bitly Growth (~$35/mo) and an affiliate tool like Rewardful Starter (~$49/mo) — roughly $84/mo — with two cookies on two domains and two definitions of a sale.
TrackRev is $39/mo and holds one first-party dataset across link tracking, revenue attribution, and the affiliate programme: one cookie, one visitor ID, one billing join. The free tier covers 1,000 events/mo; pricing is on the pricing page.
When NOT to use TrackRev
If you are not charging yet, or you only need aggregate traffic trends with no billing join, a first-party attribution stack is more than you need and a lighter analytics tool will do.
TrackRev is also not a general-purpose customer-data platform for unifying every data source in your business — it is a focused first-party attribution layer for SaaS and subscription revenue.
If your goal is enterprise-wide data unification rather than channel-to-revenue attribution, that is a different category of tool.
Found this useful? Share it.
Frequently asked questions
- First-party data is data your own domain collects directly from your own visitors for your own use — clicks, sessions, traffic source, and consent state — rather than data set or shared by a third-party vendor across many sites. For attribution it is the durable backbone, because browsers block third-party cookies but not the first-party cookies that remember logins and carts. A minimal set of about six fields, carried from click to charge, is enough to attribute revenue to a channel.
- Six fields cover it: a visitor ID (a random handle for the browser), a session ID (for the current visit), the traffic source (utm_source, medium, campaign), the click context (referrer, landing URL, any click ID), the consent state, and the customer ID joined at purchase. That set lets you reconstruct a journey and tie it to a charge without any third-party or cross-site identifier. Collect no more than you have an attribution use for.
- Set it with your server through the HTTP Set-Cookie header, not with JavaScript, and scope it to your apex domain with a leading dot such as .yourbrand.com. Safari's Intelligent Tracking Prevention caps cookies written by JavaScript at seven days but does not cap cookies your server issues, so a server-set apex cookie persists for the full attribution window and is readable across every subdomain the visitor moves through.
- Match it to your attribution window, and match the window to your sales cycle. The median window in use is 27 days and adoption clusters at 30 days, which suits most B2B SaaS. Look at your own time from first touch to paid, set the window to capture roughly 80% of conversions, and set the cookie lifetime to match. Too short loses considered journeys; too long credits stale touches and holds data past its usefulness.
- Yes, a subdomain of your own apex, such as go.yourbrand.com or links.yourbrand.com. Route tracked links through it via a CNAME to your provider with a TLS certificate, keeping the redirect on the same registrable domain as your site so the cookie scope is shared. If you put tracking on a separate apex, browsers treat its cookie as third-party and you lose the protection that made first-party worthwhile.
- First-party data is observed on your domain — clicks, sessions, sources. Zero-party data is volunteered directly by the user, such as a self-reported answer to how did you hear about us. For attribution, first-party click data is the backbone and zero-party self-reporting is a directional tie-breaker for touches you cannot track, like a podcast mention or word of mouth. Use them together rather than treating either as complete on its own.
- First-party data is compatible with GDPR when handled properly, because the data is collected by your own domain for your own purposes under your own consent flow rather than shared with third-party ad networks. You still need a lawful basis, a clear disclosure of the cookie and its purpose, honoured opt-outs, and retention proportionate to your attribution window. Data minimisation — collecting six fields and keeping them briefly — makes the posture easy to defend. Confirm specifics with your own counsel.
- It cannot see touches that never reached your domain, such as a podcast ad acted on days later or a recommendation shared privately, and it cannot deterministically link a visitor across devices without a shared login. It also measures less of any visitor who declines consent, by design. The remedy is to supplement first-party click data with zero-party self-reporting and a billing-anchored join, and to accept that some attribution is directional rather than exact.

Written by
Muzahid Maruf, Founder, TrackRev.io & Contant.io
Muzahid Maruf is the founder of TrackRev.io and Contant.io. He writes about marketing attribution, link tracking, and revenue analytics for SaaS teams.
Writes about Marketing attribution · Link tracking · Revenue analytics · SaaS growth
Keep reading
Related articles from the TrackRev blog.
