> For the complete documentation index, see [llms.txt](https://docs.graspil.com/en/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.graspil.com/en/app/outside-links.md).

# 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:

<table><thead><tr><th width="143.40625">Parameter</th><th>Description</th></tr></thead><tbody><tr><td>key</td><td>The key for the link, which you get in the dashboard</td></tr><tr><td>url</td><td>The http/https address to redirect the user to. <mark style="background-color:red;">The address must be encoded</mark> using URL encoding. Example functions: <code>encodeURIComponent</code> in <strong>JS</strong>, <code>urlencode</code> in <strong>PHP,</strong> <code>urllib.parse.quote</code> in <strong>Python</strong></td></tr><tr><td>uid</td><td>The Telegram ID of the user who clicks the link (the one you're sending this message to)</td></tr><tr><td>event</td><td>The event name, in Latin characters. Max. 250 characters. This is exactly the name you'll see in reports</td></tr></tbody></table>

{% hint style="warning" %}

### The link configuration interface isn't ready yet, but you can already use these links. To get a key for your link, contact support :)

{% endhint %}

### 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**=><mark style="color:red;">**yourKey**</mark>&**url**=<mark style="color:purple;">**urlAddress**</mark>&**uid**=<mark style="color:yellow;">**123**</mark>&**event**=<mark style="color:green;">**eventName**</mark>

{% code title="Example link" overflow="wrap" %}

```
https://tlin.cc/i?key=12mew345&url=https%3A%2F%2Fexample.com&uid=123456&event=myevent
```

{% endcode %}

### Format 2

This format is a bit shorter. Variables are separated by a slash — keep the correct variable order:

<https://tlin.cc/i/><mark style="color:red;">**key**</mark>/<mark style="color:green;">**event**</mark>/<mark style="color:yellow;">**uid**</mark>?**url**=<mark style="color:purple;">**urlAddress**</mark>

{% code title="Example link" overflow="wrap" %}

```uri
https://tlin.cc/i/12mew345/myevent/123456?url=https%3A%2F%2Fexample.com
```

{% endcode %}
