How click tracking works

The 90-day cookie, the click ID, and how a click becomes a commission — from redirect to Stripe webhook.

A partner shares a link. A stranger clicks. Months later, they buy. Here's how Traaaction makes sure the right partner gets paid.

The click path

A tracked link looks like https://traaaction.com/s/{slug} (or https://go.yourbrand.com/{slug} once you set up a custom domain).

  1. Edge middleware catches the request and looks up the slug in Redis (sub-millisecond).
  2. A Click ID is generated — format clk_{timestamp}_{hex}, unique per click.
  3. A cookie is set for 90 days: trac_click_id.
  4. The click is logged to Tinybird — visible in your dashboard within 1 second.
  5. The user is redirected to wherever the partner sent them (product page, signup, pricing, etc.).

How a click becomes a commission

Later — sometimes minutes later, sometimes months — the user buys. Your Stripe Checkout session carries the trac_click_id cookie value as metadata.tracClickId. When Stripe fires checkout.session.completed, Traaaction looks up that click ID and creates the commission.

Priority (in order)

If the click ID isn't in metadata, we fall through:

  1. session.metadata.tracClickId — the intended path
  2. session.client_reference_id — fallback if you already use this field
  3. Customer record lookup — used only for recurring renewals

No match = no commission. This is why passing tracClickId in Stripe Checkout metadata is not optional — see Stripe webhook setup.

First-click attribution — and why it matters

Once a click ID is tied to a customer, it's never overwritten. A later click from a different partner (retargeting, another creator, organic ad) doesn't steal the credit. The partner who introduced the customer keeps the attribution for the whole lifetime — including every recurring renewal.

Safari, iOS, and cookie blockers

Safari ITP truncates third-party cookies to 7 days. If your tracking runs on our default domain, you lose that long-tail attribution on iPhone and Mac audiences.

The fix: serve tracking from your own subdomain (e.g. go.yourbrand.com) via CNAME. The cookie becomes first-party and ITP's 7-day cap doesn't apply. Setup is a single DNS record — see Custom domain.

Typical gain once CNAME is live: +15–40% recovered attribution depending on Safari/iOS share.

Related

Updated 2026-04-19
How click tracking works — Traaaction Help Center | Traaaction