Skip to content
Affiliatetrackingo

Link & Conversion Tracking

Affiliate link tracking that survives ad blockers, subdomains and checkouts

First-party click, lead and payment attribution from one script tag.

acme.com/pricing?ref=janeacme.com/signupacme.com/checkoutPro$49/moStart free trialCreate your account[email protected]Sign upCheckoutPro plan · monthly$49.00Pay $49.00Paid ✓EVENT STREAMclickref=jane · US · Chromecookie_aff_vid set · 60 dayslead[email protected]payment$49.00 · Stripecommission$9.80 → JaneATTRIBUTION · LAST CLICK WITHIN COOKIE WINDOWClick?ref=janeVisitor ID_aff_vidLeadsignupPayment$49.00Commission$9.80+$9.80 Jane
A visitor clicks an affiliate link, the tracking script stores a first-party visitor id, the visitor signs up, then pays, and the payment becomes a commission for the affiliate.

A visitor clicks an affiliate link, the tracking script stores a first-party visitor id, the visitor signs up, then pays, and the payment becomes a commission for the affiliate.

01 /Overview

Every click, signup and payment, credited to the right partner.

Add one script tag and every referral link, coupon and checkout on your site is attributed. Clicks are stored in a first-party cookie on your root domain, mirrored in localStorage, and tied to the signup and the payment that follow, so affiliates are credited for the customers they actually bring.

02 /How it works

How link & conversion tracking works, step by step.

  1. 1

    Visitor clicks ?ref=jane

    The script records the click and stores a visitor id in a first-party cookie for the campaign's cookie window.

  2. 2

    Visitor signs up

    AffTrack.lead({ email, customer_id }) ties the new user to the referral. Attribution is last click within the window.

  3. 3

    Customer pays

    Your billing webhook or the conversion API reports the payment; a pending commission is created at the campaign's rate.

  4. 4

    Refunds adjust themselves

    Full refunds reject the commission, partial refunds shrink it, and paid ones are clawed back from the next payout.

03 /In depth

Everything you need to know about link & conversion tracking.

Links your affiliates already use

Referral parameters are set per campaign and baked into the script, so ?ref=, ?via=, hash links like #via-jane and the parameters of other platforms (fpr, lmref, tolt, aff) all work. Migrating from another tool doesn't break a single link that's already out there.

  • Any number of referral parameters per campaign
  • Hash links and short links on your own domain
  • Optional URL cleanup after the click is recorded

Rich click data, without third-party cookies

Each click carries sub-IDs sub1–sub5, UTM tags, ad click ids (gclid, fbclid, msclkid, ttclid), page title and language. Device, browser, OS and country are derived server-side. Crawlers and link previews are ignored, and repeat clicks by the same visitor within 30 minutes count once.

Works across domains and checkouts

The visitor id is stored on the detected root domain, so marketing site, app and docs subdomains share it. data-domains carries it across separate domains. Stripe Payment Links, pricing tables and buy buttons get client_reference_id automatically, Paddle gets customData, and forms get a hidden aff_vid field.

Consent mode built in

With data-consent="required" the script stores and sends nothing until you call AffTrack.consent(true), so it fits the cookie banner you already have.

04 /FAQ

Questions about link & conversion tracking.

Does affiliate tracking work if the visitor blocks third-party cookies?

Yes. The visitor id is a first-party cookie on your own root domain, mirrored in localStorage, and with a branded tracking domain the script and tracking calls are served from your domain too.

How long does a referral stay attributed?

Each campaign sets its cookie window in days and whether the first or the last click wins. Leads can also expire after a set time.

Can I report conversions from my server instead of the browser?

Yes. POST /track/conversion with your secret key, a unique event_id, the customer id and the amount in minor units. Repeated event ids are ignored, so retries are safe.

05 /Related

Works even better together.

Ready to grow through partners?

Connect your billing, add one script tag and invite your first partners. Import affiliates, codes and history from Rewardful, FirstPromoter, Tolt or a CSV.