> For the complete documentation index, see [llms.txt](https://docs.olchat.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.olchat.io/capabilities/peredacha-parametrov-analitiki/peredacha-parametrov-analitiki-bez-ispolzovaniya-vidzheta.md).

# Передача параметров аналитики без использования виджета

{% hint style="warning" %}
Данная статья предназначена для специалистов, обладающих практическим опытом настройки виджетов и передачи параметров аналитики. Материал содержит технические детали и требует понимания принципов интеграции с аналитическими системами.

При отсутствии соответствующего опыта рекомендуем обратиться к квалифицированному подрядчику или интегратору. Это обеспечит стабильную работу виджета и корректную передачу данных аналитики.
{% endhint %}

{% hint style="info" %}
Для того чтобы параметры аналитики были верно отработаны, вам необходимо в [Настройках коннектора](https://docs.olchat.io/ustanovka-i-nastroika/interfeisy-prilozheniya/opisanie-nastroek-konnektora) приложения Олчат настроить [Бот-помощник](https://docs.olchat.io/bot-pomoshnik), а также [Виджет на сайт](https://docs.olchat.io/vidzhet-dlya-saita).\
Сообщение в виджете на сайт необходимо прописать такое же, как вы указали на сайте. Это необходимо для верной обработки параметра аналитики и записи его в нужное пользовательское поле.
{% endhint %}

### Настройка кнопки WhatsApp

Кроме стандартного виджета от Битрикс24, вы можете установить на сайт свою кнопку WhatsApp, зашить в неё приветственное сообщение и параметр для передачи идентификатора любого сервиса аналитики.

Внешний вид кнопки может быть, например, таким:

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

В приветственном сообщении укажите параметр **{visit\_id}**, например, в таком виде: *Обязательно отправьте это сообщение и дождитесь ответа! Ваш номер:* **{visit\_id}.**

Код кнопки WhatsApp из приведённого выше примера может выглядеть следующим образом:

```markup
<a class="whatsapp_olchat" href="https://api.whatsapp.com/send?phone=79000000000&amp;text=Обязательно отправьте это сообщение и дождитесь ответа! Ваш номер:{visit_id}" rel="noopener noreferrer">
  <div class="whatsapp-button"><i class="fa fa-whatsapp"></i></div>
</a>
```

```
.whatsapp-button {
    position: fixed;
    right: 13px;
    bottom: 90px;
    transform: translate(-50%, -50%);
    background: #25D366; /*цвет кнопки*/
    border-radius: 50%;
    width: 55px; /*ширина кнопки*/
    height: 55px; /*высота кнопки*/
    color: #fff;
    text-align: center;
    line-height: 53px; /*центровка иконки в кнопке*/
    font-size: 35px; /*размер иконки*/
    z-index: 9999;
}
.whatsapp-button a {
    color: #fff;
}
.whatsapp-button:before,
.whatsapp-button:after {
    content: " ";
    display: block;
    position: absolute;
    border: 50%;
    border: 1px solid #25D366; /*цвет анимированных волн от кнопки*/
    left: -20px;
    right: -20px;
    top: -20px;
    bottom: -20px;
    border-radius: 50%;
    animation: animate 1.5s linear infinite;
    opacity: 0;
    backface-visibility: hidden; 
}
 
.whatsapp-button:after{
    animation-delay: .5s;
}
 
@keyframes animate
{
    0%
    {
        transform: scale(0.5);
        opacity: 0;
    }
    50%
    {
        opacity: 1;
    }
    100%
    {
        transform: scale(1.2);
        opacity: 0;
    }
}
```

### Настройка сайта

{% hint style="info" %}
В описанном ниже примере приведён модифицированный код для подстановки в параметр **{visit\_id}** значения идентификатора сервиса аналитики Calltouch.
{% endhint %}

Модифицируйте код на сайте следующим образом:

```javascript
<script>

const wabutton = setInterval(() => {
        const l = document.querySelector('.whatsapp_olchat');
        if (l !== null) {
            const sessionId = window.ct('calltracking_params', 'mod_id')[0].sessionId;
            if (sessionId) {
                clearInterval(wabutton);
                l.href = l.href.replace(/\{visit_id\}/, sessionId);
            }
        }
    }, 250);

/* КОД КНОПКИ WHATSAPP */

/* КОД АНАЛИТИКИ CALLTOUCH */

</script>
```

После перехода по кнопке скрипт отработает и подставит в параметр {visit\_id} код сервиса аналитики:

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


---

# 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, and the optional `goal` query parameter:

```
GET https://docs.olchat.io/capabilities/peredacha-parametrov-analitiki/peredacha-parametrov-analitiki-bez-ispolzovaniya-vidzheta.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
