Analytics
Monitor your avatar's performance and understand user interactions.
Dashboard Analytics
Access analytics at Dashboard > Analytics.
Overview Metrics
- Total Conversations – Number of chat sessions
- Total Messages – All messages exchanged
- Average Duration – How long users chat
- Completion Rate – Conversations that reach a goal
Charts
- Conversations Over Time – Daily/weekly/monthly trends
- Peak Hours – When users are most active
- Message Distribution – User vs assistant messages
Conversation Transcripts
Review every conversation:
- Go to Dashboard > Analytics > Transcripts
- Filter by date, avatar, or status
- Click a conversation to view full transcript
Transcript Details
- Full message history
- Timestamps for each message
- AI token usage
- Escalation events
- User sentiment indicators
Exporting Transcripts
GET /v1/conversations?start=2024-01-01&end=2024-01-31&format=csvOr use the Export button in the dashboard.
Custom Analytics
Event Tracking via SDK
Track custom events:
<Avatar
onMessage={(message) => {
analytics.track('avatar_message', {
role: message.role,
avatarId: message.avatarId,
conversationId: message.conversationId,
length: message.content.length
});
}}
onConversationStart={(conversation) => {
analytics.track('avatar_conversation_started', {
conversationId: conversation.id,
avatarId: conversation.avatarId
});
}}
onConversationEnd={(conversation) => {
analytics.track('avatar_conversation_ended', {
conversationId: conversation.id,
duration: conversation.duration,
messageCount: conversation.messageCount
});
}}
/>Webhooks for Real-Time Data
Send events to your analytics platform:
POST /v1/webhooks
{
"url": "https://your-analytics.com/avatarium",
"events": ["conversation.started", "message.created", "conversation.ended"]
}API Analytics
Query analytics programmatically:
Usage Overview
GET /v1/analytics/overview?period=30dResponse:
{
"conversations": 1247,
"messages": 8932,
"avgDuration": 272,
"tokenUsage": 450000,
"topAvatars": [
{ "id": "avt_abc", "name": "Support Bot", "conversations": 890 }
]
}Per-Avatar Analytics
GET /v1/avatars/{avatarId}/analytics?period=7dConversation Metrics
GET /v1/analytics/conversations?groupBy=day&period=30dGoals and Funnels
Track conversation outcomes:
Define Goals
In Dashboard > Analytics > Goals, create goals like:
- Lead Captured – User provided email
- Question Answered – User said "thanks" or similar
- Escalation Avoided – No human handoff needed
Goal Tracking
<Avatar
onGoalComplete={(goal) => {
console.log('Goal achieved:', goal.name);
}}
goals={[
{
name: 'email_captured',
trigger: { type: 'pattern', pattern: /[\w.]+@[\w.]+/ }
}
]}
/>Sentiment Analysis
Track user sentiment throughout conversations:
- Positive – User is satisfied
- Neutral – Standard interaction
- Negative – User is frustrated
View sentiment trends in Dashboard > Analytics > Sentiment.
Alerts
Set up alerts for important metrics:
- Go to Dashboard > Analytics > Alerts
- Create rules like:
- "Alert if daily conversations drop below 50"
- "Alert if escalation rate exceeds 10%"
- "Alert if average response time exceeds 5 seconds"
Best Practices
- Review transcripts weekly – Learn what users ask
- Track escalation reasons – Improve avatar knowledge
- Monitor sentiment trends – Catch issues early
- Set up alerts – Don't miss important changes
- Export data monthly – Keep records for analysis