# Button with click tracking

#### **Integrating a trackable link into a button**

A link with click notification has a specific format, making it ideal to embed within a button for a better user experience.

To create a tracking link, you need to call the function `proxy('YOUR_LINK')` in the calculator.\
For example, define a variable, say `link`, whose value is the function with your link:

<div data-with-frame="true"><figure><img src="/files/oPv74lTuy3c13ARviXH2" alt=""><figcaption></figcaption></figure></div>

You can now use the variable containing the tracking link in one of two ways: insert it directly into the message text or assign it to a button.

**Example 1: Using the link in message text**

You can insert the link directly into a message using the `#{variable}` syntax.

<div data-with-frame="true"><figure><img src="/files/thNvaybn0zGUfEe19HQ2" alt=""><figcaption></figcaption></figure></div>

{% hint style="warning" %}
**Important:** The variable must be inserted using the `#{your_link}` syntax.
{% endhint %}

**Example 2: Implementing a trackable link via button configuration**

1\. Create a button

<div data-with-frame="true"><figure><img src="/files/Ii0nfOPgF64Me2OXc2KQ" alt="" width="563"><figcaption></figcaption></figure></div>

2. In the **URL** field, enter your variable using the `#{YOUR_LINK}` syntax and set the button's function to **"Default"**.

<figure><img src="/files/xOToqqVYd0xz59eSeRgq" alt=""><figcaption></figcaption></figure>

{% hint style="info" %}
**Helpful articles:**

1\. You can read about functions for creating links with click notifications and expiration times in the article **"**[**Working with Links.**](/chatbot/functions/calculator/links.md)**"**

2\. For more details on how to place a link in a button, see the article **"**[**Buttons**](/chatbot/builder/buttons.md)**"**
{% endhint %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.mavibot.ai/chatbot/builder/attachments/tracking.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
