Skip to content

Tracking Overview

Affitor tracking captures the complete customer journey—from the first click on an affiliate link to the final purchase.


When a partner shares their affiliate link, Affitor tracks three key events:

EventWhat it capturesWhen it fires
ClickVisitor arrives via affiliate linkPage load with ?ref= parameter
SignupVisitor registers or submits a formYour signup form completion
SaleCustomer completes purchaseStripe payment success

Each event is linked together using tracking cookies, so you always know which partner drove which sale.


graph LR
A[Partner Shares Link] --> B[Customer Clicks]
B --> C[Visits Site]
C --> D[Signs Up]
D --> E[Purchases]
A -.->|Unique ?ref= URL| A1[Unique link]
B -.->|Cookie set| B1[Click tracked]
C -.->|30 day cookie| C1[Cookie persists]
D -.->|trackLead called| D1[Lead tracked]
E -.->|Stripe metadata| E1[Sale tracked]

Step by step:

  1. Partner gets unique link: https://yoursite.com?ref=PARTNER123
  2. Customer clicks: Affitor script detects ?ref= parameter
  3. Cookie stored: partner_code and customer_code saved (30-day lifetime)
  4. Customer browses: Cookie persists across sessions
  5. Customer signs up: You call trackLead() → linked to partner
  6. Customer purchases: Stripe metadata captures sale → commission created

Three integrations connect your site to Affitor:

IntegrationPurposeDifficulty
Pageview TrackerTrack clicks from affiliate linksEasy – one script tag
Lead TrackingTrack signups and registrationsEasy – one function call
Payment TrackingTrack sales via StripeMedium – metadata setup

Most advertisers complete all three in under 30 minutes.


Affitor uses last-click attribution with cookie-based tracking.

When a customer clicks an affiliate link:

  1. Partner code stored in cookie
  2. Cookie lasts 30 days
  3. Attribution window is 60 days from first click
  4. Any purchase within window credits that partner

Default: 60 days

If a customer clicks a partner’s link on January 1st and purchases on February 15th (45 days later), the partner gets credit.

If they purchase on March 5th (63 days later), no attribution—outside the window.

If a customer clicks Partner A’s link, then later clicks Partner B’s link:

  • Partner B gets credit (last-click wins)
  • Cookie is overwritten with new partner code

DataSourcePurpose
partner_codeFrom ?ref= parameterIdentify which partner
customer_codeAuto-generatedLink events together
program_idYour program IDRoute to correct program
TimestampAutomaticWhen event occurred
User agentBrowserAnalytics
IP addressRequestFraud detection
CookieValueLifetime
partner_codePartner’s referral code30 days
customer_codeUnique visitor ID30 days

Cookies are set automatically by the tracker script. No action required.


Affitor tracking uses first-party cookies on your domain. You should:

  1. Include in cookie policy: Mention affiliate tracking cookies
  2. Cookie consent: If required in your jurisdiction, include in consent flow
  3. Data retention: Tracking data follows your Affitor program settings

Affitor doesn’t:

  • Use third-party cookies
  • Share data with ad networks
  • Track users across other sites

Set up tracking in order:

  1. Pageview Tracker – Capture clicks (5 minutes)
  2. Lead Tracking – Capture signups (10 minutes)
  3. Payment Tracking – Capture sales (15 minutes)
  4. Test Your Integration – Verify everything works