Growing

Telegram deep links: tracking where your bot's users come from

By the Botable team

A Telegram deep link is your bot's URL with a start parameter: t.me/yourbot?start=CODE. The code arrives with the user's first message, which lets you attribute where they came from without cookies or a landing page.

The short version

Telegram deep links are the platform's attribution mechanism, and they are simpler than the web equivalent. Appending a start parameter to a bot's URL — t.me/yourbot?start=CODE — causes that code to be delivered along with the user's first interaction, so the bot knows the source before it says anything. There is no cookie, no landing page and no redirect chain, and the link survives being pasted as plain text, which is how most links actually travel in messaging. The parameter is limited in length and restricted to URL-safe characters, so it is a key rather than a payload: store the campaign details against a short code and look them up when it arrives. Beyond attribution, the same mechanism carries context — which product a user tapped, which referrer invited them, which article sent them — turning a generic first message into one that already knows why the person is there.

Step by step

What does a deep link look like?

https://t.me/yourbotname?start=CODE. When someone opens it and starts the bot, the code arrives with that first update. Telegram limits the parameter's length and permits only URL-safe characters, so treat it as a short key rather than a place to pack data.

How do you use it for campaign tracking?

Generate one code per source — a channel, a post, an ad, a partner — store what each means, and record the code against each new user on arrival. You then know acquisition by source with no analytics tooling, which is more than most bots ever measure.

How does it carry context rather than just a source?

Encode what the user tapped: a product id, an event, a referrer's code. The bot reads it and opens on the relevant thing instead of a generic welcome. Skipping a menu step measurably improves conversion, and this is the cheapest way to skip it.

What are the limits worth knowing?

Length and character set are both constrained, and the parameter is visible to anyone who sees the link. Never make codes guessable or sequential if they grant anything, and never put a secret in one — it is a public identifier by construction.

What catches people out

  • The parameter is only delivered on the first /start; a returning user does not resend it
  • Codes are public and visible in the URL — sequential ones are trivially enumerated
  • Long or unusual characters silently break the link rather than failing loudly

Questions

Does it work for groups too?

There is a variant that adds the bot to a group with a parameter, which is useful for onboarding a bot into a specific customer's group with their configuration already attached.

Can I see which links perform best?

Yes — that is the point. Store the code with each new user and count by code. It is the closest Telegram equivalent to a UTM parameter and takes one column to implement.

Want a bot that does this?

Describe it in plain language and Botable writes the code, gives the bot its own database, deploys it and keeps it running. Everything on this page is handled for you — the token, the webhook, the storage, the hosting.

Build a bot

Keep reading

Bots that use this

All twenty-five guides