livqenoDocs

Live StreamingAnalytics

Analytics

What's tracked today (a live viewer count and a peak), and what isn't.

After a stream, you'll want to know how it went: how many people watched, and when it peaked. This page shows what Livqeno tracks today, and how to collect more yourself.

Where this fits: there's no analytics dashboard or viewer history yet. Today you get two numbers on each stream, read from your backend, plus webhooks you can log.

Read the numbers

On your backend (or in your terminal), read the stream:

const stream = await livqeno.liveStreams.get(streamId);
console.log(stream.viewerCount, stream.peakViewerCount);
{
  "viewerCount": 12,
  "peakViewerCount": 47
}
FieldWhat it means
viewerCountViewers connected right now. Worked out live each time you read the stream, so there's no history. It can lag a little after a viewer drops. null means Livqeno couldn't reach the media server, which isn't the same as 0.
peakViewerCountThe highest viewerCount seen while this stream was LIVE. Only goes up. Resets for each new stream.

Not built yet

  • No viewer graph over time
  • No watch time
  • No location or device breakdown
  • No per-viewer session log

Need any of these now? Collect them yourself:

  1. Viewer graph: poll GET /v1/live-streams/:id on a timer from your backend (say, every 30 seconds while the stream is LIVE) and save viewerCount each time.
  2. Who attended: log live_stream.viewer_joined webhooks. Remember that it fires when a viewer's credential is made, not when they connect.
  3. Watch time: record when each viewer opens and leaves your stream page in your own app, since viewer_left only fires when your backend calls leave().

Log events with webhooks

Stream events (created, started, ended, host/viewer join and leave) are sent as webhooks. You can log or forward them. See Webhooks for delivery details.

Next steps