Measure Engine

Analytics

The Measure Engine is the foundation of Appflow v2. It captures every user interaction, processes subscription lifecycle events in real time, and transforms raw data into actionable analytics. From daily active users to monthly recurring revenue, cohort retention curves to conversion funnels, the Measure Engine gives you a complete picture of how your app is performing.

Key Features

Daily & Hourly Metrics
Track DAU, sessions, events, and revenue at daily or hourly granularity. All metrics are pre-aggregated for instant dashboard queries.
Cohort Retention
Automatically group users by install date and measure retention at weekly or monthly intervals. Spot drop-off points and measure the impact of product changes.
Funnel Analysis
Define multi-step funnels with any sequence of events. Measure conversion rates between steps and identify where users abandon key flows.
MRR Tracking
Real-time monthly recurring revenue calculations with breakdowns by plan, country, and acquisition source. Track new, expansion, contraction, and churned MRR.
Real-Time Event Streams
Events are available for querying within seconds of ingestion. Monitor live dashboards showing DAU, revenue, and events per minute as they happen.
Subscription State Machine
A deterministic state machine tracks every subscription through its lifecycle: trial, active, billing retry, grace period, expired, and resubscribed.

API Examples

All endpoints require an Authorization: Bearer YOUR_API_KEY header. The base URL for all requests is https://api-v2.appflow.ai.

GET/v1/analytics/daily

Retrieve daily aggregate metrics for an app including DAU, sessions, events, and revenue. Supports date range filtering and metric selection.

cURL
curl -X GET "https://api-v2.appflow.ai/v1/analytics/daily?app_id=app_xxx&start=2025-03-01&end=2025-03-07" \
  -H "Authorization: Bearer YOUR_API_KEY"
GET/v1/analytics/live

Returns real-time metrics for the current moment, including active users (DAU), revenue accrued today, and the current events-per-minute rate. Data refreshes every 10 seconds.

cURL
curl -X GET "https://api-v2.appflow.ai/v1/analytics/live?app_id=app_xxx" \
  -H "Authorization: Bearer YOUR_API_KEY"
GET/v1/analytics/retention

Query retention cohorts grouped by install week or month. Returns a matrix of retention percentages for each cohort over subsequent periods.

cURL
curl -X GET "https://api-v2.appflow.ai/v1/analytics/retention?app_id=app_xxx&period=weekly&cohort_start=2025-02-01" \
  -H "Authorization: Bearer YOUR_API_KEY"
GET/v1/subscriptions

List subscriptions for an app, filterable by status (active, expired, trial, billing_retry, grace_period). Includes product ID, plan, price, currency, and state timestamps.

cURL
curl -X GET "https://api-v2.appflow.ai/v1/subscriptions?app_id=app_xxx&status=active&limit=50" \
  -H "Authorization: Bearer YOUR_API_KEY"
POST/v1/funnels/query

Run a funnel analysis over a sequence of events. Returns total users entering each step, conversion rates between steps, and median time between steps.

cURL
curl -X POST "https://api-v2.appflow.ai/v1/funnels/query" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "app_id": "app_xxx",
    "steps": ["app_open", "view_paywall", "purchase_start", "purchase_complete"],
    "period": "30d"
  }'

Related Guides