StreamView
represents a single instance of a viewer watching a stream. It provides information on how long the viewer watched the stream and also the location of the viewer.
Field | Description |
---|---|
accountId | The account ID of the user that owns the stream |
name | The name of the stream that the viewer is watching |
streamId | A unique identifier of the stream |
streamViewId | A unique identifier of the stream view |
started | The start date of when the viewer started watching |
ended | The end date of when the viewer stopped watching. Will be null if the viewer is still watching the stream. |
active | A boolean indicating if the feed is still active |
userAgent | User agent of the browser of client used to watch the stream |
trackingId | Tracking id used by the subscriber token |
city | Viewer city based on geo IP lookup |
continent | Viewer continent based on geo IP lookup |
country | Viewer country based on geo IP lookup |
location | Coordinates in [lat,long,accuracy] of viewer based on geo IP lookup |
sub | Viewer sub reginal location on geo IP lookup |
Note: Any streams created prior to March 29, 2023 will return a trackingId
value of null. If no tracking ID is associated with the stream, StreamView
returns an empty string. This field is used for syndication tracking. For more information, see Syndication.
Example
An example of how a query with this model can be made, finding active stream views within two days.
{
streamViewFindMany(filter: {
active: true,
_operators: {
started: {
gt: "10/10/2022"
}
}
AND: {
_operators: {
ended: {
lt: "12/10/2022"
}
}
}
})
{
accountId
active
started
ended
streamId
streamViewId
name
client {
userAgent
trackingId
geo {
city
continent
country
location
sub
}
}
}
}