Links from the bot
To track clicks on external links from your bot, you can use our special links. When a user follows such a link, a corresponding event will automatically be created for that user. In addition, the user’s geolocation will be determined.
Links can have two formats, but they must include the following parameters:
key
The link key you receive in your personal account
url
The http/https address where the user should be redirected. The address must be URL-encoded. Example functions: encodeURIComponent in JS, urlencode in PHP, urllib.parse.quote in Python
uid
The Telegram ID of the user clicking the link (the one you send this message to)
event
Event name in Latin characters, max. 250 characters. This exact name will appear in your reports
The link setup interface is not ready yet, but you can already use them. To get a key for your link, please contact support :)
Format 1
You can place all the variables above as query parameters (after the ? symbol), e.g.:
https://tlin.cc/i?key=yourKey&url=urlAddress&uid=123&event=eventName
https://tlin.cc/i?key=yourKey&url=urlAddress&uid=123&event=eventName
Format 2
This format is a bit shorter. The variables are separated by slashes — make sure to keep the correct order:
https://tlin.cc/i/key/event/uid?url=urlAddress
https://tlin.cc/i/12mew345/myevent/123456?url=https%3A%2F%2Fexample.com
Last updated