AccountStat
is a model used to represent the statistics of all views within all of an account's streams. It details the number of viewers that began or stopped watching one of the account user's streams, active viewers and also the number of published streams.
One thing to note here is that AccountStat
data is aggregated via the stat period. These stat periods are five minute intervals and so the values shown in one of the AccountStat
models represents the data within the stat period.
Field | Description |
---|---|
accountId | The account ID of the user |
from | The start date of the stat period |
to | The end date of the stat period |
active | The number of active viewers at the end of the stat period |
numStarted | The number of viewers that began watching within the stat period |
numEnded | The number of viewers that stopped watching within the stat period |
streams | The number of published streams at the end of the stat period |
Example
An example of how a query with this model can be made, finding account-wide views within two days.
{
accountStatFindMany (filter: {
_operators: {
from: {
gt: "10/10/2022"
}
},
AND: {
_operators: {
to: {
lt: "12/10/2022"
}
}
}
}){
accountId
from,
to,
active,
numStarted,
numEnded,
streams
}
}