> ## Documentation Index
> Fetch the complete documentation index at: https://docs.firstpromoter.com/llms.txt
> Use this file to discover all available pages before exploring further.

# How FirstPromoter works

> Set up and manage your own affiliate program, no matter how simple or complex your affiliate scheme is.

## Setting Up a Campaign

Setting up a campaign with FirstPromoter is seamless and can be done in just a few clicks. During the onboarding process, you will create your first campaign. Each campaign generates a unique signup link that can be shared with your affiliates. When they sign up, FirstPromoter creates a unique referral link using the website URL you provide. Affiliates can then share their referral link with potential customers.

## Click Tracking

Click tracking on FirstPromoter works after adding the main tracking script to your website. It works only once when a user visits a referral link by sending a `click` event to FirstPromoter.

## Referral Tracking

Referral tracking occurs when a lead is captured on your website and sent to FirstPromoter after they sign up or fill out a form. This is achieved via the referral tracking script or API, which requires you to send the referral email address or UID to FirstPromoter.

When a lead visits with a referral link, two cookies, `_fprom_tid` and `_fprom_ref` are set in their browser. These cookies have a default lifespan of 60 days (adjustable in the Admin panel) and are essential for the referral tracking script to function.

## Sales Tracking

Sales tracking is crucial for calculating commissions for affiliates. By default, FirstPromoter automatically tracks sales from providers like `Stripe`, `Chargebee`, `Braintree (subscriptions)`, `Recurly`, `Paddle` by listening to and cross-referencing events sent from the billing provider.
For other billing providers or custom setups, we provide an API to send sales events to FirstPromoter.
