> For the complete documentation index, see [llms.txt](https://docs.mavibot.ai/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.mavibot.ai/analytics/customers/working-with-conversions.md).

# Working with conversions

## Analytics event setup in a chatbot

В настройках блока схемы чат-бота создайте блок, в котором необходимо настроить события в аналитике:

In the chatbot flow settings, create a block where you configure analytics events.

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

When you click the ‘Analytics’ button, a data entry form opens.

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

The form contains the following fields:&#x20;

* event category — a general name used to group events in the bot.

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

For example, event categories in the bot may include:&#x20;

a) general actions such as: arrived, purchased, paid; \
b) broad product categories such as: women’s clothing, men’s clothing, footwear, household goods, etc.; \
c) service categories such as: haircuts, manicures, and so on.&#x20;

This field is optional when configuring analytics events.

* Event name — the specific name of the event you want to display in analytics, such as: purchased, showed interest, successful payment, and so on.

<div data-with-frame="true"><figure><img src="/files/weoOH6qvjjbdVE68ZYHr" alt="" width="563"><figcaption><p>Analytics event is a required field</p></figcaption></figure></div>

* Event value — a number or a client/deal variable provided in the format #{your\_variable\_name}.

<div data-with-frame="true"><figure><img src="/files/q0TaHwCKONqF740BxP9B" alt="" width="563"><figcaption><p>Using a variable as the value</p></figcaption></figure></div>

<div data-with-frame="true"><figure><img src="/files/wwTjpTFfxsob6L4LFYnd" alt="" width="563"><figcaption><p><strong>Entering a numeric value</strong></p></figcaption></figure></div>

{% hint style="info" %}
The data is grouped (summed) by event name and event category.
{% endhint %}

{% hint style="warning" %}
Attention: in the Conversions section — ‘Current moment’ — events are NOT counted in non‑state blocks.

* Fallback
* Trigger
  {% endhint %}

As the client moves through the funnel where Analytics events are configured, you can view the collected data in the ‘Analytics’ section.

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

You need to create a widget in the ‘Clients’ section.

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

Next, select the necessary settings.

{% hint style="info" %}
[You can find more details about the analytics widget settings in the Clients section in this article.](/analytics/customers.md)
{% endhint %}

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

1. specify the analytics period;
2. enter the widget name;
3. choose how the analytics data will be displayed (pie chart, column chart, bar chart etc.);
4. select the data that will be shown in the widget.

**Step 1. Select the Conversions tab.**

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

**Step 2. Select the event counting method.**

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

**What do calculate** - event‑counting parameters for each step.

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

* **Quantity —** number of clients who triggered the event.
* **Sum of values —** total event value across all clients.
* **Average value —** average event value per client.
* **Median value —** median event value excluding outliers.

**How to calculate %**

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

* **from the first step**&#x20;
* **from the last step**

**Step 3. Add a step for counting.**

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

Step 4. Choose the category (if any) and the event [you created in the block earlier](#analytics-event-setup-in-a-chatbot).

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

If you need to show only a specific event value enter it in the Event value field.

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

**To include all values, keep the field blank**

### Delete analytics data

You can delete conversion data in Analytics → Clients → the ‘Delete analytics data’ button.

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

When you click the button, a form opens where you can choose which specific data you want to delete.

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

1. **Delete data by block**

When you choose to delete data by block, fields appear where you can select the blocks for which you want to clear conversion data as well as client data.

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

As shown in the example above, you can select one or several blocks for which you previously calculated conversion in the widget.

You can then choose the client categories whose data should be cleared.

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

If you select ‘Delete user data by list’ (label) from the dropdown, an additional field will appear where you can choose the client list or labels whose data you want to delete.

2. Delete data by category & event

In this case, fields for selecting the category and event will appear, along with the same options as before for choosing how to delete conversion data based on different client criteria (deleted, by label, etc.).

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

You can delete conversion data for a single category or for all categories. Similarly, you can choose to delete data for one event or for all events.

3. Удалить данные по сайту

При выборе удаления данных конверсии по сайту откроется соответствующее поле для выбора необходимого сайта: одного или нескольких.

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

After you select the necessary filters for deleting conversion data, click the ‘Delete’ button. A notification saying ‘Data successfully deleted’ will then appear.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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/analytics/customers/working-with-conversions.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.
