Views
Method: POST
URL: https://www.wellcomemat.com/api/analytics/views.php
Notes:
-
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.
-
You may only use one or none of
shared,hash, andfilter.
Parameters
| Key | Type | Description |
|---|---|---|
| key | text | {{key}} |
| secret | text | {{secret}} |
| start_date | text | Required [YYYY-MM-DD hh:mm:ss] |
| end_date | text | Required [YYYY-MM-DD hh:mm:ss] |
| shared | text | If request Rolled-up Reporting [“true”,“false”] |
| hash | text | Focuses view query on the given Media Hash |
| filter | text | Custom filter can be created (“vv.media_id = 214122”) |
| debug | text | [“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;
};