Tracking
From clicking an affiliate link to automatic Stripe injection — every step explained.
Each seller has a unique link in the format traaaction.com/s/{mission-slug}/{seller-code}.
The seller code is a unique 8-character identifier, automatically assigned to each seller.
This link points to the startup's website. When a visitor clicks, the system records the event before redirecting.
Every time someone clicks an affiliate link, a unique identifier is generated server-side.
This Click ID connects three pieces of information: the visitor, the source seller, and the relevant mission.
Generated server-side, it's impossible to forge or guess.
Format: clk_{timestamp}_{hex} — includes a timestamp and random hex for uniqueness. Social crawlers (bots) are detected via User-Agent and redirected without setting a cookie.
| Location | Duration | Purpose |
|---|---|---|
| Browser cookie (clk_id) | 90 days | Recognize the visitor if they return |
| URL parameter (trac_id) | Immediate | Transmission to trac.js script and Stripe |
| Traaaction servers | 90 days | Server-side attribution |
| localStorage (fallback) | Persistent | Backup if cookies are blocked |
Click tracking is rate-limited via Redis sliding window to prevent abuse.
The redirect is instant (under 100ms). The visitor sees nothing — they land directly on the startup's website.
The destination URL contains the Click ID as a parameter, allowing the trac.js script to retrieve it.
Social media crawlers (bots) are detected and redirected without cookie injection to avoid false clicks.
The trac.js script is installed on the startup's website. It automatically detects the Click ID (from the URL or cookie) and saves it with dual security (cookie + localStorage).
It then scans the page to detect Stripe payment elements:
- buy.stripe.com links
- <stripe-buy-button> buttons
- <stripe-pricing-table> tables
- Custom payment forms
The Click ID is automatically injected into every detected Stripe element, with zero developer intervention.
- Source seller, mission and tracked link
- Device type (Mobile / Desktop / Tablet)
- Country and city
- Traffic source (referrer)
- Timestamp
This data is recorded in the background and has zero impact on the visitor's browsing speed.
For non-payment events (signups, form submissions), startups can use the Lead API to trigger LEAD commissions programmatically:
Authentication via x-workspace-id header. Creates a LeadEvent and attributes the customer to the seller.
The trac.js SDK can be installed on the startup's website to automatically handle click tracking and Stripe injection. One script tag is all it takes:
- Auto-detects Click ID from URL parameters (trac_id) or existing cookie
- Dual storage: cookie + localStorage for resilience against cookie blockers
- Scans and injects Click ID into all Stripe payment elements automatically
- SPA-compatible: monitors URL changes via History API for single-page applications
Key takeaways
- Everything is automatic — no configuration needed from the seller
- The cookie lasts 90 days
- Stripe injection happens without writing a single line of code
- Zero impact on page load speed