Tracking & attribution
How clicks, cookies, coupons and server events combine into exactly one attribution per conversion — and the limits of browser tracking.
How a referral is tracked
- An affiliate shares a tracking link (
https://YOUR-AFFLUX-HOST/r/AbC123xyZ9), a QR code (/q/…) or a plain referral link on your site (https://shop.example.com/?ref=MAYA7K2P). - Tracking links record a click and redirect to an allowed destination with
aff_cid=<click id>appended. Referral-code links are registered by the SDK, which calls/api/v1/tracking/click. - The SDK stores the click id in the first-party cookie
_aff_cidon your domain (and a short history in localStorage). - Your backend sends the conversion with
click_id(and optionallyclick_ids). Affllux validates the click, the program window and the affiliate's membership, then calculates the commission.
Browser events never create money. Only authenticated server requests, signed provider webhooks or conversions recorded by your staff do.
First-click and last-click
Each program chooses an attribution model. With last click the most recent valid click wins; with first click the earliest valid click in the window wins. Pass click_ids (from Affllux.getClickIds()) to let the server choose; with a single click_id that click is used. In first-click programs the SDK also keeps an existing _aff_cid cookie instead of overwriting it.
Cookie windows
A click is valid for the program's cookie window (1–730 days) measured from the click to occurred_at. The window is enforced on the server, so changing a cookie in the browser cannot extend it. Clicks flagged as automated traffic or cookie stuffing (loaded invisibly as an image, iframe or script) are never attributable.
Coupons versus links
If a conversion carries both a click and an affiliate coupon code that belong to different affiliates, the program's coupon priority decides the winner (coupon or link). The other candidate is recorded in the attribution details but receives nothing — a conversion is attributed at most once, so commissions are never duplicated.
Repeat customers and subscriptions
When a program allows repeat-customer attribution, later purchases by the same customer_id (stored only as a keyed hash) are attributed to the original affiliate for the configured lifetime. Subscription renewals sent with the same subscription_id follow the affiliate of the first payment; recurring rules can limit the number of paid renewals.
Limitations you should know
- Browser privacy features (Safari ITP, Firefox ETP, ad blockers) can shorten or block cookies. Script-set first-party cookies may be capped to 7 days in Safari. Server-side attribution — storing
aff_cidin your own session or order at landing — is the most reliable option. - Consent: if you use
data-consent="required", nothing is stored until your banner callsAffllux.consent(true). Visitors who decline are not tracked. - Cross-device journeys are not linked unless the customer is logged in and you pass the same
customer_id. - Unique visitors are estimated with a daily-rotating, keyed hash of IP and user agent; raw IP addresses are never stored.
- Country data comes from your CDN's geo headers when available; no IP geolocation database is used.
Test mode
Requests made with sk_test_… keys (and integrations connected in test mode) create conversions and commissions flagged as test. They appear in reports with a TEST label, never count toward balances and cannot be approved or paid.