Get popularity analytics in Wowza Video with the Wowza Video REST API
Popularity analytics, or the plays and displays data in streaming, refer to metrics that track the number of times a stream has been initiated or viewed by viewers. These metrics are vital in assessing the popularity and reach of streaming content.
The plays metric refers to the number of times a video has been started. When a user clicks the "play" button, it counts as a play. The plays metric indicates the level of interest or engagement with the content and is often used to measure the initial viewer interaction with a video stream.
The displays metric refers to the number of times a video thumbnail or preview is displayed to viewers. Displays metric is a measure of how often the content is presented to potential viewers and indicates the opportunity for engagement.
Get popularity analytics for a live stream
See popularity data for a live stream by sending a GET
request to the /analytics/popularity/live_stream/{id}
endpoint.
You can use the following request, making sure to:
-
Set
id
to the id of the specific live stream. -
Set
from
andto
to get historic data. -
Set
include
if you need thetrend
data returned.
If you don't send to
and from
query parameters, the last 30 days worth of data is returned.
Sample request
curl -H "Authorization: Bearer ${WV_JWT}" \
-H "Content-Type: application/json" \
-X "GET" \
"${WV_HOST}/api/${WV_VERSION}/analytics/popularity/live_streams/[live_stream_id]?from=2024-03-14T10:31:54.486Z&to=2024-04-13T10:31:54.486Z&include=trend"
Sample repsonse
The response includes:
the metrics of the popularity data for a specific live stream - live stream id
, plays
, displays
, and trend
.
{
"live_stream": {
"id": "tvctq36g",
"plays": 2,
"displays": 2,
"trend": [
{
"plays": 1,
"displays": 1,
"sampled_at": "2024-03-15T12:59:00.000Z"
},
{
"plays": 1,
"displays": 1,
"sampled_at": "2024-04-12T13:00:00.000Z"
}
]
},
"limits": {
"from": "2024-03-14T10:31:54.000Z",
"to": "2024-04-13T10:31:54.000Z"
}
}
Related API requests
- GET /analytics/popularity/vod_streams/{id} — Fetch popularity analytics for a specific VOD stream.