> For the complete documentation index, see [llms.txt](https://docs.cookie3.com/cookie3-analytics/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.cookie3.com/cookie3-analytics/api/referral-systems/setup-referral-tracking.md).

# Setup referral tracking

### Setting Up Referral Tracking

To track referrals, use URL parameters that identify each referrer. The most common parameters are `?ref=` and `?utm_source=`.

#### Using ?ref= Parameter

```
https://yourwebsite.com/?ref=uniqueReferrerID
```

#### Using ?utm\_source= Parameter

```
https://yourwebsite.com/?utm_source=referrerName&utm_medium=referral&utm_campaign=referralProgram
```

## Implementing Conversion Tracking

To measure the effectiveness of your referral program, you need to track conversions resulting from referrals.

### Tracking Custom Events

You can track custom events, such as account creations, by triggering events from your frontend code.

#### Example: Tracking Account Creation

```javascript
window.cookie3.trackEvent({
 category: "account",
 action: "new account creation"
});
```

### Setting Up Conversion Events in Cookie3

1. Access the Conversion Events Tab in your Cookie3 dashboard
2. Click on "Add Conversion Event"
3. Define the Conversion Criteria:
   * Category: Set to "account"
   * Action: Set to "new account creation"
4. Save the Conversion Event
