# Affiliate Links Setup
URL: /docs/affiliate-links
Description: Track affiliate referrals using unique tracking links

# Overview

PromoteKit provides each affiliate with a unique tracking link. When a visitor clicks an affiliate's link and makes a purchase, the referral is automatically tracked.

## How It Works

1. Affiliate shares their unique link (e.g., `yoursite.com?via=abc123`)
2. Visitor clicks the link and lands on your site
3. PromoteKit script stores the referral ID in a cookie
4. When the visitor purchases, the referral ID is sent to Stripe
5. PromoteKit attributes the sale to the affiliate

## Setup Methods

  - [Stripe API](/docs/affiliate-links/stripe-api): Pass referral IDs through the Stripe API for custom checkout flows
  - [Stripe Payment Links](/docs/affiliate-links/stripe-payment-links): Use with Stripe Payment Links for a no-code solution

> **Note:** Affiliate link tracking requires adding the PromoteKit script to your website.
  [Promo code tracking](/docs/affiliate-promo-codes) does not require any
  script.