How click tracking works

The 90-day cookie, the click ID, and how clicks become commissions.

Every partner shares a tracked link that looks like https://traaaction.com/s/{slug}. Here's what happens when someone clicks it.

  1. Middleware catches the request and looks up the slug in Redis.
  2. A Click ID is generated — format clk_<timestamp>_<hex>.
  3. A cookie is set for 90 days: trac_click_id.
  4. The click is logged to Tinybird for analytics.
  5. The user is redirected to the target URL (your product page, your signup page, whatever the partner chose).
  6. Your SDK (or a manual metadata field in Stripe Checkout) carries click_id into every event. That's how Traaaction ties a sale back to the partner.

First-click attribution

Attribution is first-click and never overwritten. Once a click ID is set on a customer, any later click from another partner is ignored.

Where the click ID comes from in webhooks

Priority:

  1. session.metadata.tracClickId
  2. session.client_reference_id
  3. Stripe Customer lookup (for renewals)

If none of those exist, no commission is created. This is why passing tracClickId in your Stripe Checkout metadata is required.

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