Skip to main content

What are User Metrics?

User metrics let you track LLM usage at the user level. Monitor which users are driving costs, identify power users, analyze usage patterns, and implement usage-based billing.

Why Track Users?

Cost Attribution

Know exactly how much each user costs your application

Usage-Based Billing

Charge users based on their actual LLM usage

Rate Limiting

Set per-user rate limits and quotas

User Analytics

Understand user engagement and behavior patterns

Support & Debugging

Debug issues for specific users

Churn Prevention

Identify users with issues or low engagement

Adding User IDs

Track users with the Helicone-User-Id header:
string
required
Unique identifier for the user making the request. Can be any string that uniquely identifies your users (UUID, database ID, email hash, etc.).

Basic Example

What Metrics are Tracked?

For each user, Helicone tracks:

Usage Metrics

  • Total Requests: Number of LLM requests made
  • Total Tokens: Prompt tokens + completion tokens
  • Request Frequency: Requests per day/week/month
  • Active Days: Days with at least one request

Cost Metrics

  • Total Cost: Cumulative spend in USD
  • Average Cost per Request: Mean cost across requests
  • Cost Trend: Spending over time
  • Most Expensive Requests: Highest cost requests

Performance Metrics

  • Average Latency: Mean response time
  • Success Rate: Percentage of successful requests
  • Error Rate: Percentage of failed requests
  • Models Used: Which models the user accesses

Engagement Metrics

  • Session Count: Number of sessions
  • Requests per Session: Average session length
  • Last Active: Most recent request timestamp
  • First Seen: First request timestamp

Viewing User Metrics

Access user analytics in the dashboard:
1

Navigate to Users

Go to the Users page in your Helicone dashboard
2

View User List

See all users with their key metrics: total cost, request count, last active
3

Click a User

View detailed metrics, request history, and trends for a specific user
4

Filter Requests

Click “View Requests” to see all requests from that user

Filtering by User

Find requests from specific users:

Dashboard Filtering

  1. Go to Requests page
  2. Add filter: User ID equals user_123456
  3. See all requests from that user

API Filtering

User Context with Properties

Combine user IDs with custom properties for richer analytics:
This enables analysis like:
  • Cost per subscription tier
  • Usage patterns by user segment
  • Performance differences across plans

Use Cases

Usage-Based Billing

Charge users based on their actual consumption:

Per-User Rate Limiting

Implement custom rate limits per user:

Power User Identification

Find your most active users:

User Support

Debug issues for specific users:

Churn Prevention

Identify users at risk:

User ID Best Practices

Use the same identifier across your application:
  • Database primary key
  • UUID from your auth system
  • Hashed email (for privacy)
Don’t use different IDs for the same user.
If using email or username, hash it first:
For logged-out users, use session IDs or device IDs:
Never use raw email addresses, phone numbers, or other PII as user IDs. Use opaque identifiers.

Combining with Sessions

Track both user identity and conversation context:
This enables analysis like:
  • How many sessions per user?
  • What’s the average session length per user?
  • Which users have the longest conversations?

User Privacy Considerations

Protect User PrivacyWhen tracking users:
  • Use opaque identifiers (UUIDs, hashed IDs)
  • Don’t include PII in properties
  • Comply with GDPR/CCPA requirements
  • Provide users ability to export/delete their data
  • Document your data retention policies

Next Steps

Custom Properties

Add user context with properties

Session Tracking

Track per-user sessions

Request Logging

View individual user requests

Rate Limiting

Set per-user rate limits