# Roistat

* [How to add a tracker to a mini-landing ](#how-to-add-a-tracker-to-a-mini-landing)
* [How to check the tracker’s connection ](#how-to-check-the-trackers-connection)
* [How to connect an integration](#how-to-connect-an-integration)&#x20;
* [How to check if it’s working](#how-to-check-if-its-working)

## How to add a tracker to a mini-landing

For the integration to work, you need to add the tracker code on [Roistat ](https://roistat.com/)to a mini-landing on Salebot.

Open the main menu on Roistat in the top left corner and move to the **System Settings**.

![](https://lh5.googleusercontent.com/411YvZdUI-FFVVD9GI99PY9yiNIkBAChXtE5a7drJCmq_kL3T27ygvn9hvU7E0tBCteI7eOFdXkDF9sCwPJzUaC8LWDevnBahDHRnXPXBeXUuu5AcSWxfyhMzxSLV2m5oiF0_2WUGDqxaGcBtQ)

There open the **Tracking code** tab and click “**Copy to clipboard**”.

![](https://lh5.googleusercontent.com/phukrAqWMbtyYX2NzkiLFlyoRO_in3vWTHfRS3wB5H0MHoRkdigZ6ouIWapOhRQEVUcdpObkM5eFdk5LR2YGZ_kKmXnc2mnD0nUvaBLrhLI1JnefQSIb0LlPs1KtvjTnuB4I0Clm5zrvnvetXw)

Open the **Mini-landings** tab on Salebot and move to edit one.

![](https://lh5.googleusercontent.com/v_VxFzIRsQXdG8UE6_2ZACWaaev4fr6zsqX50m-XsYCowvyitNxE3RlcwNeIAp5zOsdOHBeRbFeCA6K8qmh5BHJfT8DQ4GF3-_yMgC_DCT5yd8deJYDDustxUmhiChNmj7l-Sa4q-4LkWIruXg)

Paste the tracking code copied from Roistat into the **HTML code body**:

![](https://lh4.googleusercontent.com/bXKUxlnINbMxChbKHS2aQiSQYaxHoifVS4dPqGsasgl4ueGTfF-c86dCc9Sb-lUiE7_Ocj4TzkyDjJSWGlTcq0Sq2SVebr0XX54OtyjmxHxr_OzGKy9lDHvL16GoYlwCOQ-iCqfgAq_ONQZnNw)

Lower in the settings find the section “**Saving values from cookies to client variables**” and activate the **Roistat Visit Id (roistat\_visit)**:

![](https://lh5.googleusercontent.com/Hhl7TInpYxqb30t4qehruZl2CO83ZariLeBybix1OWeCcpYtiqwC80ER__ncmegsclobNdaek_cgPYsHCgbOf5taOUJKL3yUf0up9G3L_MoUWF0VJLuLWXGuTGRbZISDkBA8eqBy-maCWOljYg)

## How to check the tracker’s connection

In the **Settings -> Tracking code** find “**Checking the tracking code**” below the code, where you need to paste the link to the mini-landing and press “Check tracking code”:

![](https://lh4.googleusercontent.com/430qONRuRdKRa4TcrPnCJ9eykG6jpQuIBxm7LVPlW2WuhAjru2Zfen-U9WDXa2keE77wT02_buL_htRBN7jGm19c9-UQYBZQ6YT3kVtzsE_L3Ayd4qYNY0fS-vP86bacwUu9WmSaPtYHYPiPxg)

The code was added successfully if you got the message “The tracking code is successfully installed”:

![](https://lh3.googleusercontent.com/laT7boLxLN_BznvnqT0BcLp9ImZ9BCSg6XdZdr8AaY3K6iwALOqxw2ztwWRuE3X6bVtUP8-wqe7tQgEeKhW8D1dDjh140cGsNKrnxNq0rId3xAXmRS8ZK29d8o9Yf5NbSKtlnku0w8MDIDk9vQ)

When a client moves from the mini-landing, now they get a new variable **roistat\_visit** in the client’s card:

![](https://lh3.googleusercontent.com/Pm-V7naqa9RoyNaMZZ012r1FxBaqWJoDlaGOUAZVlknYc6TeeijNyNtwwyu2nbmrL_r4DfUrTtagpm22h1EJk2qQ8aB16UxX7Aqte2NGhSCPYYjSoJXmAeD2bzjlQKKzTg5lD8WOCq6pLfbh6Q)

## How to connect an integration

Open the section **Integrations** from the menu in the top left corner.

![](https://lh5.googleusercontent.com/yRNWkT7oO-Xf5a3nhnmPEogwz4fhfoEDHQrFpA7IRjPFbiwBuNmj-WFj0fGJdWVjMrioupyWm6VtZpS5-GyC_zhTkXgjcHtrZGJvtw-AxkOolHkaIHUsbhZToiUsQVWLfpIFz5QREEZwlC0Rqw)

Press “**Add integration**” and then find Salebot in the Integrations search tab:

![](https://lh4.googleusercontent.com/81Xf4p9faIHiL2KTwAjQ_CO7HuCj_skI5i2Q7bcSTN84TF5QBMDQ3tOwPBA-5Mu6ey6HH_ShmK3AHnd2rb_hO6xq72bP5WWSqVT7GhzU4qjtPUjBZlN12sJkKOBewTwnp8AJWu6TvsNCSV4jbw)

Then press “**Set up integration**”

![](https://lh5.googleusercontent.com/S02OAq6SgjiyW7kycVAUIJO-VUN4SWFu-3ZtGGhpDJdSE2YaVxG_Tg9Hq9dAJvH1M4k6kNLu44vW5db4NXlPYZKSSYUvJQd9OqvlqRFN8aEUmQBn6j4erKMuc8a6gE_3i7NhjcY1vzoGdsChyg)

Copy the Webhook URL and go to the next step:

![](https://lh5.googleusercontent.com/ztzZSpM2yIqNOTo1ROCfdrXJlXjm_LCMhjoub3vhfo4mm7GFpOas1fLYZh7zKswInkjdRF2hjCbeT1Pvquvb06gz54O_z_dQQ5cmuSzX_p_BEa5j9LN-LqokK33I-5rF2u4E9aiBHzLj_w8qLQ)

On the “**Behaviour settings**” step you can:

1. Configure the sending of leads to the CRM. If you turn off this option, leads will be created in the list of sent requests but won’t be sent to the CRM;
2. Configure the option to “Create tickets without contact details”. If the option is turned on, the request will be sent to the CRM even with the absence of client’s contact details;
3. Create scripts of lead sending;
4. Configure scripts of goal sending to Google Analytics.

![](https://lh3.googleusercontent.com/4pRUG3tX-g8bWMMYXGAJ4UWLsb1XpS51_hqTojILErtoXCiSosrdcQxBSRQeEaEC138ASvYRZgDKINEfhg8Shrnkj4-AY7TosURbohK2uDLhgBzFUHDK3M73yLL1uf8_mIXyx4pQQ2WGm1Gl6A)

Press **Save** to… save.

Move to **Workflow** on Salebot. Create a block for event sending through the webhook.

{% hint style="info" %}
The block can be any type (for example, Dialogue state)
{% endhint %}

Open Advanced settings and specify:

* **Request type**: POST-json&#x20;
* **URL request**: the Webhook URL you copied when setting up the integration on Roistat.

**JSON parameters**: add these parameters:&#x20;

* `"roistat_visit" : "#{roistat_visit}"` – mandatory parameter;&#x20;
* `"phone" : "#{phone}"` – mandatory parameter;&#x20;
* `"name" : "#{name}"` – optional;&#x20;
* `"email" : "#{email}"` – optional;&#x20;
* `"comment" : "test"` – optional; instead of “test” you can paste any comment that will be sent to Roistat and CRM with the request from the chat-bot;&#x20;
* `"fields": {"Messenger": "#{messenger}"` – optional; through this parameter you can configure the infill of additional fields in the CRM on the request from the chat-bot. In this case, the field Messenger will be filled out by the variable #{messenger} from Salebot.

#### An example of the filled out JSON parameters tab:

`{` \
`"roistat_visit" : "#{roistat_visit}",` \
`"phone" : "#{phone}",` \
`"name" : "#{name}",` \
`"email" : "#{email}",` \
`"comment" : "test",` \
`"fields": {"Messenger": "#{messenger}"}` \
`}`

![](https://lh4.googleusercontent.com/SyZkw49fmWBsYvNuDgTNPSjQpBlRVJ-j04W5PRP44PlDS8NzDywpHO73IkOdgrk0MNbL75GX5pPghtqDWdVuuvlpPYWXdJgczy4KXFMSEdmQf8BbTgOYarzCUI6zHHa78XETh4Hr4p2oV26fWA)

Don't forget to press "**Save**"!

## How to check if it’s working

After setting up the configuration of the integration, the requests gotten through Salebot will be transferred to Roistat with the visit number. You can see them in Roistat Analytics or in the section **Project diagnostics -> List of submitted leads**:

![](https://lh6.googleusercontent.com/R3V3PLBLIUuj4M8OySXhZROzOGQo67eakWWy71ZRcubp2JvTXETVp-bDqRMIh8x7qIKoO45bgYsQbhGPDszX0RKUGPohcpQ_G-EeAR6-tzQCz4YC4-sJDkMvKHcOOtDL3fzCETw8dF1Q9DzXCA)

![](https://lh5.googleusercontent.com/xIMu5rYStc2ZOiKSxnezFmcDZRLK94tJDzF6gTW67ksNVm1MWboM9d53JCOvzCFts-NjcY0djZ9p8uzHEKEPhbblmTT1-iwha-OsfylO1AtOmzV7naiTM5CLxKvJtPAV6r7EOwEZgFaU9eRmmA)


---

# 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/integrations/other/analytics/roistat.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.
