# How to transfer parameters and UTM tags

{% hint style="info" %}
Platforms like Instagram, Facebook, WhatsApp, and Telegram implement this mechanism through the `visit_key` parameter.
{% endhint %}

**Deep link support**\
Most messengers (like Instagram, Facebook, Telegram) support deep links. However, others do not.

**WhatsApp workaround**\
Although WhatsApp lacks native deep linking, you can still pass parameters and UTM tags. To do this, insert a special variable into the pre-filled message text that appears to the user after they click your link. (This method will be covered in detail later.)

**Parameter storage**\
All passed parameters are saved as client variables within the system.

**Parameter structure & types**\
A parameter is a **name-value pair**. Depending on their source, parameters can be:

* **Static:** You define the exact value to be transmitted.
  * **Example:** `utm_term=webinar1` (where `utm_term` is the name and `webinar1` is the static value).
* **Dynamic:** The advertising platform (e.g., Google Ads, Facebook Ads) automatically inserts the relevant data at the moment of the click.
  * **Example:** `term={keyword}` — here, the `{keyword}` placeholder is dynamically replaced with the actual search term that triggered the ad.

#### How to use these parameters on a site

All parameters passed to your site will be converted into deal variables once the client launches the bot. This includes UTM tags and other labels.

**To get your site link**, go to the **"Sites"** section.

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

Example of adding UTM tags to a site link:

`https://mavibot.ai/st/black_friday_mavibot?utm_source=test_wi_me&utm_medium=cpc&utm_campaign=id_campaign&utm_content=registration`

Parameters and labels will be passed to the bot and saved as client variables.

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

#### How to use these parameters without a site

You can use **proxy links** to pass parameters directly. Once the bot is launched via such a link, all transmitted data will be saved as deal variables.

**The link format with parameters should be as follows:**

**Proxy link structure**

A parameterized proxy link consists of two parts:

1. **Base URL** (the proxy link itself): `https://mavibot.ai/r/mavibot_1`
2. **Query string** (your parameters): `?param1=value1&param2=value2`

**Example: adding UTM tags to a Telegram link**

Here is an example of a direct link from a site to Telegram with UTM parameters:

<https://mavibot.ai/r/mavibot_1?utm_medium=cpc&utm_source=yandex&utm_term=key_phrase&utm_content=HappyNY#ancor>

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

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

**Direct messenger links in "Sites"**

This section displays clickable links for all messengers integrated with your system.

## WhatsApp features

Since WhatsApp does not support deep links, you must add a special variable to the bot's opening message. The bot will use this variable to identify the parameters with which WhatsApp was launched.

**The variable: `#{visit_key}`**

When a user clicks your WhatsApp link, this placeholder will be automatically replaced with a unique numeric code containing the passed parameters.

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

"Sites" → Site → Site page settings → Messengers → WhatsApp settings

When a user goes to WhatsApp from your site (or via a messenger link from the site settings), the `#{visit_key}` placeholder is replaced with a unique numeric code.

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

## Instagram subscription

**Evolution of parameter tracking**

* **Previous method (`#{visit_key}`):**
* The `#{visit_key}` variable was used by placing it in the **"Initial WhatsApp message"**. This allowed you to track the launch parameters for Instagram interactions.
* **Current method (deep links with referral parameters):**

You can now pass referral parameters directly via Instagram deep links, offering greater flexibility and control.

**Benefits of using referral parameters:**

With referral parameters, you can:

* **Track campaigns** by linking clicks to specific sources or channels.
* **Attribute users** by connecting an Instagram visitor to a session or account in your external application.
* **Personalize journeys** by directing users to targeted content or specific features within your Instagram account.

<figure><img src="https://lh7-rt.googleusercontent.com/docsz/AD_4nXcc5PLfQg8uf4gvxZZ406aRwpoDcBtDJzqbOOthnQ2fjKIQ8UHr8NTFUVl5vkbPN541vIv5lvbRxhEn0n7FSDt-g7NYwodzJg09vzSowpMRTQaSrNwbBf3XTCpYuT2rKbDUAjADeg?key=9cFsqYH0-lPo60eUI7iEQg" alt=""><figcaption><p>Instagram deep link</p></figcaption></figure>

REF\_PARAM parameter is transmitted to the server via a webhook.

Example: <https://ig.me/m/mavibotai?ref=mavi>

You can copy the link to your Instagram bot in the "Channels" section.

The link looks like: <https://ig.me/m/\\>\<account\_login\_instagram> \*

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

The link looks like: <https://ig.me/m/\\>\<account\_login\_instagram>\*

Add the parameter to the copied link:?ref=\<your parameter>&#x20;

Next, you can use the link with the ref parameter to enter users into Instagram botanic.

The parameter will be passed ONLY at the very first contact of the user with your account (bot).

## UTM tags in the Analytics section

You can view statistics on UTM tags in the "Analytics" section

Go to the "Analytics" section and select the "Clients" tab.

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

Click the "Add widget" button.

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

The **Widget builder** window will open.

1. Select the **UTM tags** tab.
2. Click the **"Add a value"** button.

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

Additional settings for UTM tag values appear. Click on the field **"Select a tag"**.

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

And select the label for which you want to view the statistics.

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

If you want to add multiple tags or all of them, click on "Add a value" again.

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

Don't forget to specify the period and other settings and be sure to save them.

Then add the required number of tags, then click the "Save" button.&#x20;

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

Next you need to click the "Add a widget" button.

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

{% hint style="success" %}
Read more about how to work with analytics in the article "[MaviBot Analytics](/analytics/dashboards.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/websites/sites/tags.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.
