Device and Traffic Breakdown
Method: POST
URL: https://www.wellcomemat.com/api/analytics/breakdown.php
Notes:
-
This endpoint returns device and traffic data.
-
You may only use one or none of
shared,hash, andfilter. -
In the response, Traffic Data is separated by base referrer URL and Device Data is separated by device type.
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 AnalyticsBreakdownResponse = {
success: 0 | 1;
data: {
wm_count: number;
youtube_count: number;
traffic: {
[referral_source: string]: number;
}
devices: {
[device_type: string]: number;
}
};
google_chart: {
devices: string; // (with escaped characters)
traffic: string; // (with escaped characters)
};
error: string;
warnings: string;
};