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

# Visitors

This page provides statistics about visitors. The bot manager can thus know:

* The number of visitors
* How many of these visitors had a conversation with the bot
* How many of these visitors had already interacted with the bot before

Each time a page with the chatbot is visited, the system checks whether the visitor has already accessed this page before (this verification is usually based on a cookie). If not, the visitor is considered new.

## Visitors

A visitor is counted when they access the chatbox. When the chatbox is opened, a series of requests is sent to the server to retrieve information such as the context, top knowledge, welcome message, etc., as well as to log the visit. However, these requests are only triggered if the chatbox is fully loaded and opened by the user.

* **Without GDPR disclaimer and/or onboarding enabled**: A simple chatbox load (if it is open) is enough to count a visit.
* **With GDPR disclaimer and/or onboarding enabled**: The user must complete these steps before the visit is recorded. A simple chatbox load is not sufficient in this case.

The visit information is stored for one day in the user's local storage. If the same user returns the next day, a new visit is added (the count increments when the conversation is opened).

<figure><img src="/files/0LCcnQdKnXU9slfQHzVn" alt=""><figcaption></figcaption></figure>

## Visitors with conversation (Conversion)

This metric indicates how many times a page visitor has engaged in a conversation with the bot.

* This statistic is only incremented if the visitor interacts with the bot.
* It is recorded when the conversation ends and is counted for each conversation, regardless of whether it occurs on the same day or not.

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

## Returning Users

Using a cookie, it is possible to recognize visitors who have previously interacted with the bot.

Among the **"Visitors with Conversation"**, this statistic distinguishes two categories:

* **Unique users**: Those who engage in a conversation for the first time on a given day.
* **Returning users**: Those who start a new conversation within the same day.

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

## Visitor Statistics Recording Behavior

### Behavior Based on Cookie Disclaimer Activation

#### 1. Cookie Disclaimer Activated

When the cookie disclaimer is activated:

* **The recording of the visitor statistics will only be triggered after the disclaimer has been validated**.
* As long as the user has not validated the cookies, no recording request will be made.

#### 2. Cookie Disclaimer Deactivated

When the cookie disclaimer is deactivated:

* **The recording of the visitor statistics is automatically triggered as soon as the page is opened**, even if the chatbox is closed.

### Effect of the Additional Option

An additional option, **`restrictedOnChatboxAccessInsteadOfSiteAccess`**, can be activated to further modify the behavior of the visitor statistics recording. This option can be configured in the **Channels** menu, under the **Debug** section.

* **If `restrictedOnChatboxAccessInsteadOfSiteAccess` is enabled (`true`)**, then the recording will only happen after the chatbox is opened. If the user does not click on the teaser, nothing will be recorded.
  * More specifically, the recording of the visitor statistics is triggered after the GDPR validation (or after the disclaimer acceptance if no GDPR is involved).

### Behavior Summary

| Cookie Disclaimer State | `restrictedOnChatboxAccessInsteadOfSiteAccess` Enabled | Welcomecall Trigger Moment                                                  |
| ----------------------- | ------------------------------------------------------ | --------------------------------------------------------------------------- |
| Deactivated             | `false`                                                | On page load                                                                |
| Deactivated             | `true`                                                 | <p>When the chatbox is opened</p><p>After GDPR validation (if enabled)</p>  |
| Activated               | `false`                                                | After disclaimer validation                                                 |
| Activated               | `true`                                                 | <p>After disclaimer acceptance</p><p>After GDPR validation (if enabled)</p> |

This management ensures precise control over the triggering of visitor statistics recording based on compliance and user experience needs.


---

# 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-en.dydu.ai/analytics/exploitation/visitors.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.
