Views

Method: POST
URL: https://www.wellcomemat.com/api/analytics/views.php

Notes:

  1. This endpoint returns play data, separated by date and media hash. A play is a viewer starting the video, counted the moment playback begins, with no minimum watch time. The counts also include the views YouTube and Facebook report, which those platforms count by their own rules.

  2. You may only use one or none of shared, hash, and filter.

Parameters

KeyTypeDescription
keytext{{key}}
secrettext{{secret}}
start_datetextRequired [YYYY-MM-DD hh:mm:ss]
end_datetextRequired [YYYY-MM-DD hh:mm:ss]
sharedtextIf request Rolled-up Reporting [“true”,“false”]
hashtextFocuses view query on the given Media Hash
filtertextCustom filter can be created (“vv.media_id = 214122”)
debugtext[“true”,“false”]

Response

type AnalyticsViewsResponse = {
  success: 0 | 1;
  data: {
    total_count: number;
    by_date: {
      date: string;     // "YYYY-MM-DD hh:mm:ss"
      count: number;
    }[];
    by_hash_and_date: {
      hash: string;
      address: string;
      date: string;     // "YYYY-MM-DD hh:mm:ss"
      count: number;
    }[];
  };
  google_chart: string; // (with escaped characters)
  error: string;
  warnings: string;
};