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

# Analytics

> Monitor your agent's performance, user engagement, and business metrics

Track how your agent is performing with built-in analytics. Understand user behavior, identify improvement opportunities, and measure business impact.

## Dashboard Overview

Your agent dashboard provides at-a-glance metrics:

<CardGroup cols={2}>
  <Card title="Total Messages" icon="message">
    Total messages sent and received across all conversations.
  </Card>

  <Card title="Total Sessions" icon="users">
    Number of unique conversation sessions.
  </Card>

  <Card title="Active Conversations" icon="comments">
    Currently active conversation threads.
  </Card>

  <Card title="Response Time" icon="clock">
    Average time for your agent to respond.
  </Card>
</CardGroup>

## Key Metrics

### Engagement Metrics

| Metric                   | Description                        | Why It Matters           |
| ------------------------ | ---------------------------------- | ------------------------ |
| **Messages per Session** | Average messages in a conversation | Higher = more engagement |
| **Session Duration**     | How long conversations last        | Indicates value delivery |
| **Return Users**         | Users who start multiple sessions  | Measures stickiness      |
| **Icebreaker Usage**     | Which quick replies are clicked    | Shows user interests     |

### Performance Metrics

| Metric            | Description                    | Why It Matters          |
| ----------------- | ------------------------------ | ----------------------- |
| **Response Time** | Time to generate response      | Affects user experience |
| **Error Rate**    | Failed tool calls or responses | Identifies issues       |
| **Tool Usage**    | Which tools are called most    | Guides optimization     |
| **Handoff Rate**  | Conversations transferred      | Shows automation limits |

### Business Metrics

| Metric              | Description           | Why It Matters        |
| ------------------- | --------------------- | --------------------- |
| **Conversion Rate** | Free → paid users     | Measures monetization |
| **Revenue**         | Total earnings        | Bottom line           |
| **Credits Used**    | Credit consumption    | Usage patterns        |
| **Paywall Hits**    | Users reaching limits | Pricing optimization  |

## Viewing Analytics

<Steps>
  <Step title="Access Dashboard">
    Click on your agent from the [main dashboard](https://wassist.app/agents).
  </Step>

  <Step title="Navigate to Analytics">
    Click the **Analytics** tab in the agent view.
  </Step>

  <Step title="Select Time Range">
    Choose a date range to analyze:

    * Today
    * Last 7 days
    * Last 30 days
    * Custom range
  </Step>

  <Step title="Explore Metrics">
    Use the dashboard to explore different metric categories.
  </Step>
</Steps>

## Conversation Logs

Review actual conversations to understand user behavior:

<Steps>
  <Step title="Go to Conversations">
    In your agent, click the **Conversations** tab.
  </Step>

  <Step title="Filter Conversations">
    Filter by:

    * Date range
    * Status (active/inactive)
    * Country
    * User
  </Step>

  <Step title="View Details">
    Click any conversation to see:

    * Complete message history
    * Tool calls made
    * Context and memory
    * User information
  </Step>
</Steps>

## Understanding User Behavior

### Common Patterns to Look For

<AccordionGroup>
  <Accordion title="Drop-off Points" icon="door-open">
    Where do users stop responding?

    * After a specific question type
    * When a tool fails
    * At the paywall

    **Action:** Improve these friction points.
  </Accordion>

  <Accordion title="Popular Topics" icon="fire">
    What do users ask about most?

    * Most common first messages
    * Frequently used icebreakers
    * Repeated question patterns

    **Action:** Optimize for popular use cases.
  </Accordion>

  <Accordion title="Failed Interactions" icon="circle-xmark">
    When does your agent struggle?

    * "I don't understand" responses
    * Tool errors
    * Handoff triggers

    **Action:** Add training data or tools for these scenarios.
  </Accordion>

  <Accordion title="High-Value Sessions" icon="star">
    What leads to conversions?

    * Session length before purchase
    * Tools used by converting users
    * Common paths to payment

    **Action:** Optimize the conversion funnel.
  </Accordion>
</AccordionGroup>

## Improving Based on Analytics

### Low Engagement

**Symptoms:** Short sessions, few return users

**Solutions:**

* Make the welcome message more engaging
* Add better icebreakers
* Improve response quality
* Reduce response time

### High Drop-off at Paywall

**Symptoms:** Many users hit paywall but don't convert

**Solutions:**

* Increase free message limit
* Lower pricing
* Improve value demonstration before paywall
* Test different CTA messages

### Tool Errors

**Symptoms:** High error rate on specific tools

**Solutions:**

* Check API endpoint health
* Improve error handling
* Add fallback behaviors
* Update tool descriptions

### Slow Response Times

**Symptoms:** Response time > 5 seconds

**Solutions:**

* Optimize tool API performance
* Reduce document size
* Simplify system prompt
* Check for infinite loops

## Exporting Data

Export analytics for further analysis:

1. Go to **Analytics**
2. Click **Export**
3. Choose format (CSV, JSON)
4. Select date range
5. Download file

## SDK Analytics Access

Retrieve metrics programmatically:

```typescript theme={null}
// List conversations with filters
const conversations = await client.conversations.list({
  botId: agentId,
  active: true,
});

// Get conversation details
const conversation = await client.conversations.get(conversationId);

console.log(`Credits remaining: ${conversation.credits}`);
console.log(`Messages: ${(await client.conversations.getMessages(conversationId)).length}`);
```

## Setting Up Alerts

Get notified of important events:

1. Go to **Settings** → **Notifications**
2. Configure alert thresholds:
   * Error rate exceeds X%
   * Response time exceeds X seconds
   * Daily message volume below/above threshold
3. Choose notification method (email, webhook)

## Best Practices

<AccordionGroup>
  <Accordion title="Review Weekly" icon="calendar-week">
    Set aside time each week to review analytics. Look for trends, not just snapshots.
  </Accordion>

  <Accordion title="Compare Periods" icon="arrows-left-right">
    Compare this week to last week. Did changes improve metrics?
  </Accordion>

  <Accordion title="Read Conversations" icon="book-open-reader">
    Numbers tell part of the story. Reading actual conversations reveals the full picture.
  </Accordion>

  <Accordion title="Test Changes" icon="flask">
    When you make changes, give them time to show impact. Wait at least a week before judging.
  </Accordion>
</AccordionGroup>

## What's Next

<CardGroup cols={2}>
  <Card title="Optimize Your Agent" icon="sliders" href="/guides/configure-tools">
    Use insights to improve performance.
  </Card>

  <Card title="Tune Monetization" icon="dollar-sign" href="/guides/monetization">
    Optimize your pricing strategy.
  </Card>
</CardGroup>
