Aggregates

Returns statistics for specific stats items, aggregated in a resolution. The results may be filtered by date/time-range, city, region or country, if desired.

Tokens

This action requires the following tokens:

  • stats-view

Arguments

Required arguments are marked in bold, and optional arguments are marked in italics.

Argument Type Default Description
type String  

Only show stats for the given type. If omitted (and item and livestream are not given) show stats about everything for the current actor.

This argument can only contain one of the following values:

  • item
  • livestream
alsodeleted Boolean false If set to true, also view the statistics of items and livestreams that are deleted. Note that when neither type, item nor livestream is provided, this argument does nothing as account / customer statistics will always also contain information on deleted items and live streams
item Hash   Only show stats for this specific item
livestream Hash   Only show stats for this specific livestream
resolution String hour

The resolution to use for these stats

This argument can only contain one of the following values:

  • 15min
  • hour
  • day
  • week
  • month
  • year
  • all
start DateTime   The start of the range to get the stats from. If omitted, return stats from the first moment available. Required if resolution is not all
end DateTime   The end of the range to get the stats from. If omitted, return stats until the last moment available. Required if resolution is not all. If there would be more than 10000 periods of the given resolution between start and end date, this will be considered as an input error
client Label   Only show stats for the given client
clientformfactor Label   Only show stats for the given client form factor
clientsoftwaretype Label   Only show stats for the given client software type
clientos Label   Only show stats for the given client OS
clientosname String   Only show stats for the clients with the given OS name
clientosversion String   Only show stats for the clients with the given OS version
clientsoftware Label   Only show stats for the given client software
clientsoftwarename String   Only show stats for the clients with the given software name
clientsoftwareversion String   Only show stats for the clients with the given software version

Output

This action produces the following extra headers on success, besides the default headers:

Name Type Description
firstdate DateTime The earliest date that stats are available for the provided arguments. The start date will take into account the creation of specific items and live streams if provided and it will never return a date below the date the account or customer was created, if these are supplied. Requesting stats for the current arguments before this date will thus not return anything
lastdate DateTime The latest date that stats are available for the provided arguments. Requesting stats for the current arguments after this date will thus not return anything
resolution String The resolution of the output. This might be lower

This action produces the following output on success:

An array containing zero or more elements, each one being an object containing the following fields:

Name Type Description
period

Information about the period of this row

The value of this field is an object containing the following fields:

Name Type Description
begin DateTime Begin of the stats-period
end DateTime End of the stats-period
views Integer Number of (unique) views, as defined in Statistics
bytes Integer Number of bytes, as defined in Statistics
plays Integer Number of plays, as defined in Statistics
impressions Integer Number of impressions, as defined in Statistics
impressionsab Integer Number of ad-blocked impressions, as defined in Statistics
avgsecondsviewed Integer Average number of seconds viewed, as defined in Statistics
secondsviewed Integer Number seconds viewed, as defined in Statistics
avgviewers Integer Number of viewers, as defined in Statistics
adimpressions Integer Number of ad impressions, as defined in Statistics
adstarts Integer Number of ad starts, as defined in Statistics
adskips Integer Number of ad skips, as defined in Statistics
adcompletes Integer Number of ad completes, as defined in Statistics
adclicks Integer Number of ad clicks, as defined in Statistics

Errors

This action can return one of the default status codes, or one of the following status codes on error:

STATUS_STATS_RANGE_INVALID (390)
An invalid time selection range was supplied (spans zero or negative time)