> For the complete documentation index, see [llms.txt](https://docs.tracknow.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.tracknow.io/campaigns/advanced-tracking.md).

# Advanced Tracking

This tool allows you to configure redirection rules for an affiliate’s default tracking URL.

When creating a campaign, you define a **default landing page -** the page users are directed to after clicking the standard affiliate tracking URL. You can also add multiple additional landing pages, each with its own generated tracking URL.

In addition to these options, you can apply **redirection rules directly to the default tracking URL**, enabling dynamic routing based on specific conditions.

Redirection rules can be configured based on:

* **User geo-location** (determined by IP address):\
  Route users from different countries to specific landing pages.\
  \&#xNAN;*Example: Users from Country A → Landing Page A; Users from Country B → Landing Page B.*
* **Affiliate source**:\
  Route users based on which affiliate link was clicked.\
  \&#xNAN;*Example: Traffic from Affiliate A → Landing Page A; Traffic from Affiliate B → Landing Page B.*

***

### Setting Up Redirection Rules

Navigate to **Campaigns** → Locate the relevant campaign → Click the three-dot icon under the **Actions** column → **Edit** → **Advanced Tracking** tab → **Add New**

<figure><img src="/files/N9lc9bxDkyl10md6QFvR" alt=""><figcaption></figcaption></figure>

<figure><img src="/files/qOW2JBqNkbzesR6sfpMt" alt=""><figcaption></figcaption></figure>

| Field                           | Description                                                                                                                                                                                                                                                                                                           |
| ------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **Title** (Mandatory)           | Specify a title for this redirection rule.                                                                                                                                                                                                                                                                            |
| **Available Macros** (Optional) | Dynamic parameters can be appended to the landing page URL to pass specific data to the destination page.                                                                                                                                                                                                             |
| **Landing Page** (Mandatory)    | The landing page URL that users will be redirected to when this rule’s conditions are met.                                                                                                                                                                                                                            |
| **Weight** (Optional)           | <p>When running A/B tests, you can assign a <strong>weight</strong> to each landing page. Pages with higher weights have a greater probability of being selected and shown to users compared to others.</p><p>This field is only relevant when the rule is used for A/B testing. Otherwise, it can be left empty.</p> |
| **Countries** (Optional)        | Only users from the selected countries will be redirected to this landing page. All other users will be directed to the campaign’s default landing page.                                                                                                                                                              |
| **Affiliate** (Optional)        | Only users who click the default tracking URL of the selected affiliates will be redirected to this landing page. All other users will be directed to the campaign’s default landing page.                                                                                                                            |


---

# 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 dynamically by asking a question.

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

```
GET https://docs.tracknow.io/campaigns/advanced-tracking.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
