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

# Campaigns and sources

> The unit of traffic in BotFlow: Facebook Ads, Telegram and invite link sources, the creation wizard, tracking links, statuses and organic traffic.

A campaign is the unit of traffic. It has its own tracking link, its own source, its own funnel and its own
statistics. One campaign is tied to one bot: that is where every subscriber arriving through its link ends up.
The campaign list and creating a new one live on the "Campaigns" tab of the "Tracker" section. For the section
itself and its metrics see [Tracker: overview](https://docs.botflow.cc/en/tracker.md).

## Traffic sources

When creating a campaign you choose a source. It determines the shape of the link, the set of wizard steps and
which settings you need at all.

> [card] Facebook Ads
>
> A landing with the FB Pixel and Conversion API. Requires your own domain and a proxy. The link goes through your domain and carries URL parameters with Facebook macros.

> [card] Telegram
>
> A direct `t.me` link without a landing. No pixel and no proxy, the shortest path to the bot.

> [card] Invite link
>
> A join request to a private channel: the bot approves it automatically and writes first. The platform generates the link itself.

> [!WARNING]
>
> The source and the bot cannot be changed after the campaign is created. Attribution is already tied to them, so
> create a new campaign for another source or another bot.

> [!NOTE]
>
> The tracker sees clicks only for Facebook campaigns: the person goes through the link via your domain. With
> Telegram, "Invite link" and "Organic" campaigns the person never visits the tracker's link, so they have no clicks.
> The page of such a campaign has no "Clicks" and "Unique clicks" tiles, the campaign list shows a dash in those
> columns and in EPC, and CR is counted from the subscribes.

## Creating a campaign

The "New campaign" button at the top of the list opens the wizard. The number of steps depends on the chosen
source.

| Source | Wizard steps |
| - | - |
| **Facebook Ads** | Basics, Entry point, Tracking, Confirmation (4 steps) |
| **Telegram** | Basics, Entry point, Confirmation (3 steps, without "Tracking") |
| **Invite link** | Basics, "Bot, channel and entry" (2 steps) |

You can go back to steps you already passed by clicking the step number. The "Next" button becomes active only
once the required fields of the current step are filled in.

**1. Basics**

The campaign name and the traffic source. The name is visible only to you and your team and never goes into the public link, so write it to make the campaign easy to find in the list (for example, `FB Test 2026-05`). Below, three cards let you pick the source: Facebook Ads, Telegram or Invite link.

**2. Entry point**

The bot, the funnel's starting block and the landing. For an invite link this step is called "Bot, channel and entry" and works differently: the bot, the channel to join, the starting block and the exit block, with no landing needed. Details below.

**3. Tracking**

For Facebook Ads only. Domain, proxy, Facebook Pixel ID, CAPI Access Token, the link's URL parameters and the list of events to send to Facebook. The Telegram source has no such step.

**4. Confirmation**

A summary of the settings. The "Create campaign" button creates the campaign and hands you the ready tracking link straight away. An invite link has no separate "Confirmation" step, and its button is called "Create and generate link".

### The "Entry point" step

Here you set out exactly where the subscriber lands after the click.

> [card] Bot
>
> The bot you bring the campaign's subscribers to. The bot is chosen once: it cannot be changed after the campaign is created.

> [card] Starting block
>
> Which funnel block the conversation starts from. "Auto" by default: the subscriber follows the ordinary entry conditions of the blocks.

> [card] Landing
>
> A promo page between the click and the bot, for Facebook campaigns only: the pixel lives on it. A Telegram link
> leads straight to the bot, so it has no landing.

For the starting block and how it affects the conversation see [Starting block](#starting-block) below. For the
landings themselves, their types and uploading see [Landings](https://docs.botflow.cc/en/landings.md).

### The "Tracking" step (Facebook)

The "Tracking" step appears only for the Facebook Ads source and is made of several sections.

**1. Domain**

Your domain that the tracking link will go through. Only active domains are offered in the list. Without a domain the campaign is created as a draft and traffic cannot be sent to it. Domain management lives in [Domains and proxies](https://docs.botflow.cc/en/domains-proxies.md).

**2. Proxy for CAPI**

Which proxy to send events to Facebook through. Facebook does not accept Conversion API events from server addresses, so a proxy is required to launch an FB campaign.

**3. Facebook Pixel**

Pixel ID and CAPI Access Token. A saved token is never shown again: the field keeps a hint that it is already set, and to change the token you enter a new one. Next to it there is a hint on where to get the token with step-by-step instructions, and a "Test connection" button: it sends one test event to Facebook and shows whether Facebook accepted it or returned an error.

**4. Link URL parameters**

Pairs of a parameter name and a macro that are substituted into the tracking link. Each pair can be switched on or off with a checkbox, and the macro can be edited. Facebook fills macros like `{{ad.id}}` with real values at the moment of the ad click.

**5. CAPI events**

Which funnel events to send back to the Facebook Conversion API. Both events from the bot (subscribe, contact, landing view) and events from affiliate postbacks (registration, FTD, RD) are configured. Choosing not to send switches a particular event off. More about CAPI delivery below.

> [!NOTE]
>
> The landing view row in the CAPI events is shown only if the campaign has a landing chosen: without a landing
> that event never fires, so the platform hides it.

## The tracking link

You paste the campaign's ready link into your traffic sources. Its shape depends on the source.

For **Telegram** it is a direct link to the bot with the campaign code:

```
https://t.me/<bot_name>?start=<campaign_code>
```

For **Facebook** the link goes through your domain and carries URL parameters with macros. Facebook substitutes
the macros with real values at the moment of the ad click:

```
https://<your_domain>/<link_code>?adset_name={{adset.name}}&ad_id={{ad.id}}&campaign_name={{campaign.name}}
```

By default these pairs of a parameter and a Facebook macro are enabled:

| Parameter | Facebook macro |
| - | - |
| `adset_name` | `{{adset.name}}` |
| `ad_id` | `{{ad.id}}` |
| `adset_id` | `{{adset.id}}` |
| `utm_source` | `{{utm_source}}` |
| `placement` | `{{placement}}` |
| `campaign_name` | `{{campaign.name}}` |
| `site_source_name` | `{{site_source_name}}` |
| `ad_campaign_id` | `{{campaign.id}}` |

These values land in the "Clicks" log and in the breakdowns on the campaign page, so you see which ad set and
which ad brought the click. The Telegram source has no such parameters: the link leads straight into the bot.

> [!WARNING]
>
> An FB campaign can be launched only with your own domain: the platform does not serve FB traffic on the shared
> platform domain. Without a domain the campaign stays a draft. Activating an FB campaign also requires a proxy,
> because Facebook does not accept Conversion API events from server addresses.

## Starting block

At the entry point you can set the funnel's starting block. Then everybody arriving through that link lands
straight in that block when they start the bot, bypassing the entry conditions. "Auto" is the default, and the
subscriber follows the ordinary block conditions.

> [!NOTE]
>
> Changing the starting block applies from the next bot start through the campaign link. Current dialogs keep
> following their scenario, and the chosen block does not move them.

The blocks to choose from are taken from this campaign's bot. Working blocks come first, while placeholders in
the "Draft" type are shown with a mark and cannot be chosen. For the blocks themselves, entry conditions and
triggers see [Flow builder](https://docs.botflow.cc/en/constructor.md).

## Statuses and lifecycle

A campaign goes through four statuses.

| Status | What it means |
| - | - |
| **Draft** | Being configured, traffic must not be sent (for example, no domain chosen yet). |
| **Active** | Accepting traffic, the link works. |
| **Paused** | Temporarily stopped, can be brought back into work. |
| **Archived** | The landing no longer opens. Archived campaigns stay in the list and are visible under the "Archived" filter with their history of traffic and conversions; a campaign cannot be brought back into work from the archive. |

The campaign list offers per-row actions (edit, copy link, pause, launch, archive, delete) and bulk actions on
several selected campaigns at once.

> [!WARNING]
>
> Only a campaign with no traffic can be deleted: no clicks and no subscribers who came by its link. That cannot be
> undone. If there was traffic already, use the archive to keep the history of traffic and conversions.

> [!TIP]
>
> If you edit a draft campaign and fill in what was missing at that step (a domain, plus a proxy for Facebook),
> it launches as soon as you save: the status changes to "Active" and there is no need to press "Launch" by hand.

## Invite link

An invite link leads to a private channel. A person sends a join request, the bot approves it automatically and
writes to the subscriber in private messages first, starting the funnel. No landing and no pixel are needed here,
so this source has just two steps: "Basics" and "Bot, channel and entry".

**1. Make the bot an admin of the channel**

The bot must be an administrator of the channel with the "Add Subscribers" right (in a group this right is called "Add Members"). After that the channel appears in the list on the "Bot, channel and entry" step by itself. If the bot was an admin earlier and the channel is not in the list, remove the bot and make it an admin again.

**2. Choose the bot and the channel**

The "Invite link" source, then the bot, the channel to join, the starting block and the exit block. Channels without the "Add Subscribers" right are unavailable in the list: without that right approving requests will not work. If a starting block is chosen, the subscriber lands in it right after the request is approved; otherwise the bot's block with the "Request approved" trigger fires. The exit block runs when a person who joined by this campaign's link leaves the channel or is removed. The "Don't message people removed from the channel" checkbox leaves only tags and "External URL" API requests for removed people. The bot does not write to people removed by Telegram itself even without it.

**3. Create and hand out the link**

The "Create and generate link" button hands you the ready invite link on screen, and you can copy it. Paste it into your traffic sources. Everyone who follows it and sends a join request is approved automatically and enters the campaign's starting block or, when none is chosen, the funnel on the "Request approved" trigger.

> [!NOTE]
>
> When a starting block is chosen, blocks with the "Request approved" trigger do not fire for people who joined by this campaign's link, and the starting block runs whatever step of the funnel the subscriber is on. Put the tags and API requests for a join into the starting block itself in that case.

> [!NOTE]
>
> When an exit block is chosen, blocks with the "Left the channel" condition do not fire for people who joined by this campaign's link, and the exit block runs whatever step of the funnel the subscriber is on. For people the platform does not know for sure to have joined by this campaign's link (for example, they joined long ago or by another link), the bot's blocks with the "Left the channel" condition fire. When no exit block is chosen, exits go by those blocks. The exit block sees only the exits Telegram reports to the bot.

> [!WARNING]
>
> Only one bot should approve requests in a channel: this is a Telegram restriction, and only the bot that
> approved a request can write to that subscriber first. If several bots approve requests in the channel, the
> requests approved by the others never reach the tracker and no message goes to the subscriber.

The "Regenerate" button issues a new link and revokes the old one: whoever had the previous link can no longer
send a request with it. For the "Request approved" trigger and building the funnel after joining see
[Flow builder](https://docs.botflow.cc/en/constructor.md).

Deleting or archiving the campaign revokes its link in Telegram too, and the confirmation dialog warns about it.
The campaign's bot revokes the link, so it must still be a channel administrator with the "Add Subscribers" right;
otherwise only the channel owner can revoke the link, in the channel settings in Telegram. Pausing does not revoke
the link: the bot keeps approving requests sent with it.

### Channel subscribers

On the page of an "Invite link" campaign in the Tracker, under the period selector, the "Channel subscribers" card
shows by day how many people joined the channel by this campaign's link and how many of them left.

| Metric | What it counts |
| - | - |
| **Joined** | How many times people joined the channel by this campaign's link. Each join counts separately: a person who joined, left and joined again by the link gives two joins. |
| **Left** | How many people who joined by this campaign's link left the channel or were removed. Click the "Left" number to see how many left by themselves and how many were removed by an administrator. |
| **Net growth** | Joined minus left. A plus means more people from this campaign are in the channel, a minus means fewer. |

The card opens with the "Joined" and "Left" chart by day. The "Table" button shows the same days as a table, newest
first; the card remembers your choice in this browser. Hover over the chart, or select it and move between days with
the arrow keys, to see the numbers of a day.

> [!NOTE]
>
> Dates are counted in UTC, as everywhere in the Tracker. If you work in a zone east of UTC, joins at night by your
> local time fall into the previous UTC date.

Joins and leaves are recorded from the moment the campaign's bot started receiving them from Telegram. The card shows
no days before that, and "Left" counts only people whose join by the link was recorded: leaves of people who joined
earlier are not in the card. If the selected period starts earlier, a line above the numbers says "Joins and leaves are
recorded since" with the start date, and the numbers carry "since" and the date.

A day marked "Partial data" was not recorded in full: this happens on the first day of recording and on days when the
bot stopped receiving joins and leaves for a while. "No data" means that nothing was recorded that day, and how many
people joined and left is unknown. If the bot is no longer an administrator of the channel, the card shows the same
warning as the campaign wizard: until the bot is promoted to admin again, joins and leaves are not recorded. The
numbers of the last days may grow a little when Telegram reports a join or a leave late.

"Left" counts only the leaves Telegram reports to the bot. Telegram removes deleted accounts from channels from time to
time; when it does not report this to the bot, the subscriber count of the channel in Telegram itself falls more than
the card shows. Leaves that Telegram reported without an administrator are shown in the split as a separate line,
"Removed by Telegram", when there are any.

An archived campaign has its link revoked: there are no new joins, but leaves of people who joined earlier still count,
so the net growth of such days can be negative.

The "Subscribes" tile on the same page counts a person once: when a person is already a subscriber of the bot (they
came earlier by this or another campaign), a new join by the link gives no new subscribe. That is why "Joined" can be
higher than "Subscribes". It can also go the other way: for "All time" the tiles count from the creation of the
campaign, and the card only from the start of recording. An "Invite link" campaign has no "Clicks" and "Unique clicks"
tiles: by an invite link the person goes straight to Telegram, and the tracker sees no click. CR in the report of the
campaign is counted from the subscribes.

## Sending events to Facebook (CAPI)

For FB campaigns BotFlow can send funnel events back to Facebook through the Conversion API, so the algorithm
optimises traffic buying. On the "Tracking" step you set the Pixel ID, the CAPI Access Token and choose what to
send.

| Event | Where it comes from | By default |
| - | - | - |
| **Landing view** | The landing's pixel | Sent |
| **Subscribe** | The bot (a subscribe to the bot) | Sent |
| **Contact (first message)** | The bot (the subscriber's first message) | Sent |
| **Registration** | An affiliate postback | Sent |
| **FTD (first deposit)** | An affiliate postback | Sent as Purchase with the amount |
| **RD (repeat deposit)** | An affiliate postback | Not sent by default |

FTD and RD go to Facebook as Purchase with the deposit amount: that is the main signal for optimisation. RD is off
by default: Facebook's optimisation is built on the first deposit. Repeat deposits can be switched on by hand on
the "Tracking" step.

> [!NOTE]
>
> Event delivery to Facebook is visible on the campaign page (the "Facebook CAPI delivery" block) and in the
> "Conversions" report on the "Outgoing" tab: the statuses "Sending", "Delivered", "Failed". For incoming
> postbacks from affiliates see [Postbacks and affiliates](https://docs.botflow.cc/en/postbacks.md).

## Organic traffic

The "Organic" campaign is created for a bot automatically and collects bot starts without a campaign: when a
person found the bot themselves and sent `/start` without a campaign code. It cannot be deleted, renamed or edited: it
has no link, landing or pixel, and the people it brings follow the ordinary entry conditions of the funnel blocks.

> [!NOTE]
>
> A landing click and a bot start are different events. A landing click is a hit on the promo page, and it may
> never reach the bot. Starting the bot with `/start` creates a subscriber and opens the funnel. In reports they
> are separated. For more on the click's path and the metrics (Click2LP, Click2FTD, Reg2Dep, FTD, RD, EPC) see
> [Tracker: overview](https://docs.botflow.cc/en/tracker.md) and [Reports](https://docs.botflow.cc/en/reports.md).

## What's next

> [card] [Landings](https://docs.botflow.cc/en/landings.md)
>
> Telegram clones and "Custom HTML" landings between the click and the bot.

> [card] [Domains and proxies](https://docs.botflow.cc/en/domains-proxies.md)
>
> Your own domains for FB links and proxies for sending events to Facebook.

> [card] [Postbacks and affiliates](https://docs.botflow.cc/en/postbacks.md)
>
> Receiving conversions from affiliate networks by `click_id`.

> [card] [Flow builder](https://docs.botflow.cc/en/constructor.md)
>
> Where a subscriber lands after starting the bot: blocks, conditions, triggers.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.