# Referring a friend

## Overview

In a referral campaign each user receives a referral code or link to share with friends, and a friend uses that code or link during sign-up, which connects the referral and activates tracking.

This article explains the two options for sharing and registration:

* **Code referrals (default)** – Each user receives a unique code to share. Friends enter this code at registration.
* **Link referrals (optional)** – A unique referral link is generated for each user through a [**Branch.io**](https://branch.io) integration, which they can then share with their friends. Friends join via the link, and Branch handles attribution.

#### Choosing between codes and links

* **Codes** → Most reliable, no third parties, built in by default.
* **Links** → Flexible and seamless for users, but requires external setup and ongoing Branch costs.

***

## <i class="fa-text">:text:</i> Code referrals

Code referrals are the standard approach and included with the Referrals module.

* Each user is given a unique, 8-character alphanumeric code (e.g., <kbd>4AD0E5B9</kbd>).
* If multiple referral campaigns are active, users receive a unique code for each.
* Friends must enter the code during registration to be counted as a valid referral.
* Tracking is fully managed by the Loyalty Engine—no third-party setup required.

**Best for: Guaranteed tracking, simple setup, no extra cost.**

***

## <i class="fa-link">:link:</i> Link referrals (Branch integration)

For clients who want shareable referral links instead of codes, the Loyalty Engine integrates with [**Branch.io**](https://branch.io).

* Branch generates referral links that users can share with friends.
* When clicked, links route users to the correct destination (app store, app, or website).
* Attribution is handled entirely by Branch, tying the referral back to the original user.
* Requires:
  * A Branch account (purchased separately).
  * Branch SDK integrated into your app or website.

#### Branch key features

* Deep linking – Sends friends directly to the right place, even if the app must be installed first.
* Attribution tracking – Identifies who shared the link and connects their actions.
* Customizable links – Branded URLs that fit your program.
* Real-time reporting – Track link creation, clicks, and conversions.

**Best for: Apps already using Branch, or programs wanting branded deep links.**

### Creating a Branch.io account

{% hint style="warning" %}
**Only required if you want to use link referrals.**
{% endhint %}

Branch offers a free tier for up to 10,000 monthly active users (MAUs). Their definition of MAU can be found [here](https://help.branch.io/docs/usage).

Follow the instructions below to create a Branch account and link it to the Loyalty Engine.

{% embed url="<https://scribehow.com/shared/Get_setup_with_Branchio_for_WLL_Referrals___gkMvOHURtW-pIXBlz7amg>" %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://kbase.whitelabel-loyalty.com/product/modules/referrals/referring-a-friend.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
