Average View Time Metric

Average View Time represents the average number of milliseconds people played per session.

queryBuilder
  .avg('VIEWTIME')
  .licenseKey('YOUR_LICENSE_KEY')
  .between(fromDate, toDate)
  .query();

It's essentially the total sum of PLAYED vs the count of IMPRESSION_ID.

Aggregation limitation

The average view time metric is currently limited to only support the AVG aggregation. It therefore cannot be queried as a median or sum.

The sum of the view time is equivalent to the total hours watched metric