> ## Documentation Index
> Fetch the complete documentation index at: https://document.botsmith.pro/llms.txt
> Use this file to discover all available pages before exploring further.

# Monitor Agent Performance with Analytics Dashboard

> Track conversations, messages, active agents, and lead counts across all your BotSmith agents with the real-time analytics dashboard.

The BotSmith analytics dashboard gives you a real-time snapshot of how your agents are performing. Use it to understand usage trends, spot top-performing agents, and identify opportunities to improve responses.

<Info>
  Analytics data refreshes approximately every 60 seconds.
</Info>

## Dashboard Overview

Navigate to **Analytics** in the sidebar to reach the main analytics page. At the top you'll find five key metric cards, each updated in real time:

| Card                    | What it shows                                                              |
| ----------------------- | -------------------------------------------------------------------------- |
| **Total Conversations** | The cumulative number of unique chat sessions across all your agents       |
| **Total Messages**      | The total count of individual user and bot messages                        |
| **Active Agents**       | The number of agents currently set to **Active** status, out of your total |
| **Total Chatbots**      | The total number of agents in your account                                 |
| **Total Leads**         | The total number of leads captured across all your agents                  |

Use the **7 Days / 30 Days / 90 Days** selector in the top-right corner of the page to adjust the time window for all trend data shown below the metric cards.

## Per-Agent Analytics

To drill into a single agent's performance, you have two options:

* **From the dashboard** — Click the agent's name or row in the agent list.
* **From the agent builder** — Open the agent, then select the **Analytics** tab.

The per-agent view includes:

* **Messages over time** — A line chart showing how many messages the agent exchanged each day within your selected date range.
* **Conversations per day** — A daily breakdown of new chat sessions.
* **Most common user queries** — A bar chart ranking the questions your visitors ask most frequently, helping you spot gaps in your agent's knowledge base.

## Trend Charts

The **Trends** section aggregates data across all your agents so you can see the bigger picture. It plots:

* **Message volume** — Total messages sent and received each day.
* **Conversation count** — New sessions started each day.
* **Average response time** — The mean time (in seconds or milliseconds) between a visitor's message and your agent's reply, calculated from actual message timestamps.

Use the date range selector to view the last **7**, **30**, or **90 days**. The charts update automatically when you change the window.

## Advanced Analytics

<Note>
  Advanced analytics are available on the Starter plan and higher. Upgrade your plan to unlock these charts inside each agent's **Analytics** tab.
</Note>

The advanced analytics panel for each individual agent provides a deeper set of metrics:

* **Message volume trends** — Daily breakdown of conversations and messages, with per-integration channel detail (Dashboard, Widget, Telegram, Slack, Discord, WhatsApp, Instagram, Messenger, MS Teams).
* **Top asked questions** — A ranked list of the most frequently submitted user questions, normalized and counted across all conversations.
* **Satisfaction distribution** — A pie chart of 1–5 star ratings submitted by visitors after conversations, including average rating and total rating count.
* **Performance metrics** — Fastest, average, and slowest agent response times in seconds, measured from actual user-to-assistant message pairs.
* **Response time trend** — Average response time plotted day by day over your selected period.
* **Hourly activity distribution** — A bar chart showing message volume by hour of the day (00:00–23:00), so you can identify your agent's busiest times.

## Interpreting Metrics

Here is what each top-level number means in practice:

* **Total Conversations** — Every time a visitor opens a new chat session with one of your agents, that counts as one conversation. Returning visitors who start a new session each time also each count separately.
* **Total Messages** — Every individual exchange counts as one message, whether it is a visitor's question or your agent's reply. A conversation with five back-and-forth turns contributes ten messages to the total.
* **Active Agents / Total Chatbots** — The dashboard card shows both numbers together (for example, `3 / 5`). Only agents explicitly set to **Active** status are counted in the active figure. Agents in **Draft** or **Inactive** status are excluded from the active count, even if they have historical conversation data.

## API Access

You can fetch dashboard analytics programmatically. See the [Analytics API Reference](/api-reference/analytics) for full schema details.

<CodeGroup>
  ```bash Fetch dashboard metrics theme={null}
  curl -H "Authorization: Bearer YOUR_TOKEN" \
    "https://app.botsmith.ai/api/analytics/dashboard"
  ```

  ```json Example response theme={null}
  {
    "total_conversations": 1240,
    "total_messages": 8930,
    "active_chatbots": 3,
    "total_chatbots": 5,
    "total_leads": 47
  }
  ```
</CodeGroup>

Replace `YOUR_TOKEN` with your API token from **Account → API Keys**.

To fetch trend data across all your agents, use the trends endpoint with an optional `days` query parameter (1–365, default 30):

```bash theme={null}
curl -H "Authorization: Bearer YOUR_TOKEN" \
  "https://app.botsmith.ai/api/analytics/trends?days=30"
```
