Outbound links from the bot
To track clicks on outbound links from the bot, you can use our special links. When a user clicks such a link, a corresponding event is automatically created for that user. The user's geolocation will also be determined.
Links can come in two formats, but they must always contain the following parameters:
key
The key for the link, which you get in the dashboard
url
The http/https address to redirect the user to. The address must be encoded using URL encoding. Example functions: encodeURIComponent in JS, urlencode in PHP, urllib.parse.quote in Python
uid
The Telegram ID of the user who clicks the link (the one you're sending this message to)
event
The event name, in Latin characters. Max. 250 characters. This is exactly the name you'll see in reports
The link configuration interface isn't ready yet, but you can already use these links. To get a key for your link, contact support :)
Format 1
You can put all the variables listed above into the link's query parameters (after the ? symbol), i.e.
https://tlin.cc/i?key=yourKey&url=urlAddress&uid=123&event=eventName
https://tlin.cc/i?key=12mew345&url=https%3A%2F%2Fexample.com&uid=123456&event=myeventFormat 2
This format is a bit shorter. Variables are separated by a slash — keep the correct variable order:
https://tlin.cc/i/key/event/uid?url=urlAddress
https://tlin.cc/i/12mew345/myevent/123456?url=https%3A%2F%2Fexample.comLast updated