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.
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
idto the id of the specific live stream. - Set
fromandtoto get historic data. - Set
includeif you need thetrenddata returned.
If you don't send to and from query parameters, the last 30 days worth of data is returned.
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"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"
}
}- GET /analytics/popularity/vod_streams/{id} — Fetch popularity analytics for a specific VOD stream.