# Tracking link clicks

Let’s create a block and include a link in it:

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

Next, create two new blocks connected to the primary trigger check:

* In the first block, write: **"Clicked the link"**
* In the second block, write: **"Did NOT click the link"**

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

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

Now, navigate to the settings of the connection arrow leading from the primary trigger block to the **"Clicked the link"** block.

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

In the Trigger field of the connector settings, you need to specify the callback: `link_was_pressed #{YOUR_LINK}`

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

To generate the callback, send the message with the link and then click on the link in the chat. The `link_was_pressed` callback will appear in the client's dialog history.

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

You can also manually enter the trigger in the following format:\
`link_was_pressed [your_link]`

**Configuring the second connector (Fallback)**

For the connection leading to the **"Did NOT click the link"** block, apply these two critical settings:

1. **Set a delay:** Introduce a sending delay (e.g., 10-30 seconds). This provides a time window for the user to click the link before this fallback message is sent.
2. **Enable "Do not send if the block was left":** This ensures the message is **not** sent if the user has already clicked the link and moved to the **"Clicked the link"** block, thus avoiding conflicting messages.

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

Then, save your settings.

The flow is now fully configured:

* If the client clicks the link, they will receive the message: **"Link was pressed."**
* If the client does **not** click the link within 10 minutes, the system will automatically send the message: **"Sorry! Stop bot! Link wasn't pressed."**

You now know how to send various file types and track user engagement through link clicks. This functionality is versatile, supporting both everyday tasks (like broadcasts and sending checklists) and sophisticated funnel strategies to further "warm up" leads based on their interactions with the bot.


---

# 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/links.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.
