> For the complete documentation index, see [llms.txt](https://docs.dexkit.com/defi-products/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.dexkit.com/defi-products/dexappbuilder/referral-system.md).

# Referral system

Aimed at those engaged in referral marketing, in order to strengthen the bond with their users by knowing the source channel from which they arrive.

## Introduction

All DApps created with DexAppBuilder have a referral system automatically included and very easy to use. Below are the steps to use it correctly:

1. Creating your DApp: this is the most important step because is the start point.
2. Go to the [DApp management section](/defi-products/dexappbuilder/managing-this-tool.md).
3. Once in your DApp backend navigate to the Analytics–Events section as we shown below

<figure><img src="https://1167648080-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FWrjgYUyO4ch1fBehrMEq%2Fuploads%2Fi2O6ARPec2tfQ5fcWimw%2Fimage.png?alt=media&amp;token=6d05d195-df9e-4be4-b7d7-d90f243bf3d5" alt=""><figcaption></figcaption></figure>

4. Let's create some example ref tags, these will be two and will be called `blog` and `social`. If the full name + domain DApp is called `https://mycooldapp.dexkit.app` you need to append the `/?ref=your-tag` to it, for example:

For the `blog` tag: `https://mycooldapp.dexkit.app/?ref=blog`

For the `social` tag: `https://mycooldapp.dexkit.app/?ref=social`

## Checking the interactions

In the same page below you will see a data-plenty table (if you set up your referral system and you are already receiving users).

<figure><img src="https://1167648080-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FWrjgYUyO4ch1fBehrMEq%2Fuploads%2FbNsHkfWFmRkAM2tHftu4%2Fevents.png?alt=media&amp;token=42f4bef8-044a-4769-9bce-1251253649b7" alt=""><figcaption></figcaption></figure>


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

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

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.dexkit.com/defi-products/dexappbuilder/referral-system.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
