StreamView

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.

FieldDescription
accountIdThe account ID of the user that owns the stream
nameThe name of the stream that the viewer is watching
streamIdA unique identifier of the stream
streamViewIdA unique identifier of the stream view
startedThe start date of when the viewer started watching
endedThe end date of when the viewer stopped watching. Will be null if the viewer is still watching the stream.
activeA boolean indicating if the feed is still active
userAgentUser agent of the browser of client used to watch the stream
trackingIdTracking id used by the subscriber token
cityViewer city based on geo IP lookup
continentViewer continent based on geo IP lookup
countryViewer country based on geo IP lookup
locationCoordinates in [lat,long,accuracy] of viewer based on geo IP lookup
subViewer 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
            }
        }
    }
}