Sign in →

Analytics

Deep usage analytics, revenue attribution, COGS tracking, and custom reports powered by a high-performance analytics engine.

Updated 2026-07-29Suggest edits

Analytics

Aforo's analytics run over your transactional store by default. For very high event volume, aggregation queries can be routed to an optional columnar engine (ClickHouse); dashboards fall back to the transactional store automatically if it's unavailable, so analytics keep working either way. Every request is scoped to your workspace by the X-Tenant-Id header.

Usage Analytics

By Billable Unit

See how much of each billable unit customers consume, broken down by period:

GET /api/v1/analytics/usage/by-billable-unit?from=2026-07-01&to=2026-07-31
X-Tenant-Id: <your-workspace-id>

Returns per-unit totals, customer breakdowns, and trend data. Workspace scope comes from the X-Tenant-Id header; the from / to range is optional and defaults to the current period.

By Customer

Revenue and usage attribution by customer, including:

  • Total usage per billable unit
  • Invoice totals
  • Churn risk signals (declining usage, failed payments)

By Product

Usage across product types — compare API call volume between your Standard API and Agentic API products.

For deeper usage analysis — spike/drop detection, trend projection, and cohort comparison — open the Usage Anomalies, Usage Trends, and Usage Cohorts thumbnails on the Analytics landing grid. See Usage Intelligence.

MCP Server Analytics

Specialized analytics for Model Context Protocol servers:

  • Tool invocations — which tools are called most
  • Agent sessions — session duration, active session counts
  • Revenue by tool — understand which tool calls generate most revenue
  • Agent attribution — which AI agents (Claude, GPT, LangChain, etc.) drive most usage

Event Log

The Event Log is a searchable audit trail of everything that happens on your platform:

  • API events — every request, status code, latency
  • Billing events — invoice created, payment received, subscription changed
  • Auth events — logins, API key creation, SSO
  • System events — deploys, health alerts, ERP syncs
  • Usage events — ingested events, anomalies, threshold breaches

Live Stream

The Event Log has a live stream mode powered by Server-Sent Events (SSE). Events appear in real time as they're ingested, with severity color-coding and auto-scroll.

ℹ

Event log data is retained for 365 days.

Storefront Analytics

Track how customers interact with your public storefront:

  • Conversion funnel — Visitors → Product Views → Pricing Views → Signups → Subscriptions → First API Call
  • Drop-off analysis — which funnel step loses the most visitors
  • Daily trend charts — per-step historical data

COGS Analytics

Track Cost of Goods Sold to understand your gross margin:

  • Infrastructure costs per workspace
  • AI model costs (OpenAI, Anthropic) per product
  • Attribution to subscriptions for margin-per-customer reporting

Data Retention

StoreRetentionUse Case
Event log (columnar)365 daysSearchable audit trail, live stream
Transactional storeOngoingPrimary source for analytics + billing
Rate-limit cache24 hoursReal-time rate-limiting counters