Skip to content

Conversion Tracking for Telegram Bots / Telegram Mini Apps (TMA) ​

This guide shows how to send conversions from your Telegram bot or Telegram Mini App to Adexium.

A t.me link cannot carry query parameters of your own, so the click ID travels inside Telegram's start parameter. The start parameter accepts only letters, digits, _ and - (up to 64 characters), so the click ID is added after a prefix: adexium__[CLICK_ID]. Keep the double underscore — it lets you split the value apart.

Step-by-Step Instruction ​

1. Create an advertising campaign ​

Create a new campaign in your Adexium dashboard.

Use the link that matches what you promote.

Telegram bot — start=:

http
https://t.me/your_bot?start=adexium__[CLICK_ID]

Telegram Mini App — startapp=:

http
https://t.me/your_bot/your_app?startapp=adexium__[CLICK_ID]

Replace your_bot (and your_app) with your real names. [CLICK_ID] is replaced by Adexium at click time.

3. Read and store the click ID ​

Bot. When the user opens the link, Telegram sends your bot a /start command with the parameter:

/start adexium__d95c746d-31c7-4183-8fa7-42ce39b65e47

Take everything after adexium__ and save it with the user right away — the parameter comes only once, when the user opens the link.

Mini App. Telegram does not send /start for startapp= links. The parameter reaches your Mini App as start_param inside initData (in JavaScript: Telegram.WebApp.initDataUnsafe.start_param). Send initData to your backend, verify it as described in the Telegram documentation, take everything after adexium__ from start_param and save it with the user.

4. Send the conversion ​

When the user completes the target action, call the postback from your backend:

http
GET https://go.atechspace.live/conversion?click_id=[CLICK_ID]&event_type=level1&key=YOUR_POSTBACK_KEY

Replace [CLICK_ID] with the stored value and YOUR_POSTBACK_KEY with your account's postback key (see below). Use event_type=level2 / level3 for deeper events:

EventMeaning
level1Registration / Install (default)
level2Deposit
level32nd+ deposit

5. Your postback key ​

The key parameter proves the postback came from you. Your click IDs are visible to the sites and apps your ads run on, so without a key anyone who collected one could report conversions on your campaigns.

  • Find it on the Tracking page — the ready-to-copy postback URL already includes it — or under Account → Security.
  • Send it in the query string, even when you POST. A key placed in a request body is ignored.
  • Keep it on your server: never in bot messages, the Mini App code or any client-side JavaScript.
  • You can rotate it at any time from Account → Security. The previous key keeps working for 7 days, so update your postback within that window.

Workflow Example (Mini App) ​

  1. Campaign link:https://t.me/my_game_bot/game?startapp=adexium__[CLICK_ID]
  2. Actual user click:https://t.me/my_game_bot/game?startapp=adexium__d95c746d-31c7-4183-8fa7-42ce39b65e47
  3. Mini App backend: verifies initData, reads start_param and stores click_id = d95c746d-31c7-4183-8fa7-42ce39b65e47 for this user.
  4. Postback on registration:GET https://go.atechspace.live/conversion?click_id=d95c746d-31c7-4183-8fa7-42ce39b65e47&event_type=level1&key=YOUR_POSTBACK_KEY

Conversions from Telegram channel subscriptions are tracked differently — see Conversion Tracking (Channels).