Analytics Depth
Robust analytics: what profile operators actually get
Identity includes a full analytics stack: event capture, witness depth, conversion math, attribution, and timelines.
Core profile activity is tracked across all-time + rolling 90d/30d/7d/24h windows for every top-level metric.
- Profile views, original views, opens, unique visitors.
- Streams, stream completions, download clicks, successful downloads.
- Checkout starts, checkout paid, paid downloads, revenue, unique buyers.
Listening/viewing depth is modeled, not just click counts, through duration capture and witnessed rollups.
- Stream play/pause/complete events support completion-rate and avg-listen metrics.
- Detail-view + stream duration contribute to witnessed time authority.
- Rollups maintain total_view_ms and total_stream_ms for stable profile stats.
Download and paid checkout analytics are directly connected to profile original access and revenue outcomes.
- Tracks checkout starts, paid checkout events, paid download totals and revenue.
- Computes checkout→paid and paid-download-to-stream-play conversion rates.
- Separates attributed and unattributed revenue in traffic attribution output.
Attribution is aggregated by source, referrer, and path with conversion-rate fields for each bucket.
- Each bucket includes views, opens, streams, downloads, checkout starts, paid, revenue.
- Unique visitor counting and last-event timestamps are retained per traffic key.
- Supports channel-level optimization instead of raw totals only.
Tracked event contract
Event taxonomy is typed and scope-classified (`profile`, `original`, `stream`, `commerce`) before storage.
profile_viewprofile_analytics_viewprofile_link_copyprofile_follow_toggleoriginal_impressionoriginal_openoriginal_detail_vieworiginal_download_clickoriginal_download_successoriginal_checkout_startoriginal_checkout_paidoriginal_stream_playoriginal_stream_pauseoriginal_stream_complete
Windows + timeline ranges
- Every key overview metric includes `all`, `d90`, `d30`, `d7`, `d1` windows.
- Timeline outputs support `30m, 6h, 24h, 7d, 30d, 90d, 1y, 3y` ranges for short-term and long-horizon analysis.
- `/profile/analytics` renders these ranges with interactive chart switching.
User-facing analytics surfaces
- `/profile` inline stats (followers/witnesses, streams, views, completion, witnessed seconds) with periodic/realtime refresh hooks.
- `/profile/analytics` full owner analytics console with funnel, top originals, traffic intelligence, and multi-range charts.
- Per-original detail viewer instrumentation for impressions, opens, stream actions, download clicks, and paid flow transitions.
Developer instrumentation notes
- Ingestion endpoint: `POST /api/profile/analytics/track` with strict event-name validation and bounded payload fields.
- Client helper: `trackProfileAnalyticsEventClient(...)` uses sendBeacon/fetch fallback and session dedupe via `oncePerSessionKey`.
- Server aggregation: `loadProfileAnalyticsForOwner(...)` computes overview, stream, commerce, funnel, traffic, timelines, originals, recent activity.
- Schema support: `user_profile_analytics_events` plus `user_profile_witnessed_rollups` trigger-based duration aggregation.
- Realtime publication exists for analytics events and witnessed rollups to support live profile stat freshness.
Analytics snapshot shape (owner context)
{
"overview": {
"profileViews": { "all": 0, "d90": 0, "d30": 0, "d7": 0, "d1": 0 },
"streamPlays": { "all": 0, "d90": 0, "d30": 0, "d7": 0, "d1": 0 },
"checkoutPaid": { "all": 0, "d90": 0, "d30": 0, "d7": 0, "d1": 0 }
},
"stream": {
"totalListenSeconds": 0,
"avgListenSecondsPerPlay": null,
"completionRate": null
},
"commerce": {
"lifetimeRevenueCents": 0,
"checkoutToPaidRate": null
},
"funnel": {
"viewsToOpenRate": null,
"openToPlayRate": null,
"playToDownloadRate": null,
"checkoutToPaidRate": null
},
"traffic": {
"sources": [],
"referrers": [],
"paths": [],
"attributedRevenueCents": 0,
"unattributedRevenueCents": 0
},
"timelines": {
"30m": [],
"6h": [],
"24h": [],
"7d": [],
"30d": [],
"90d": [],
"1y": [],
"3y": []
},
"originals": [],
"recentActivity": []
}