APIAnalytics APIDevice and Traffic Breakdown

Device and Traffic Breakdown

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

Notes:

  1. This endpoint returns device and traffic data.

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

  3. In the response, Traffic Data is separated by base referrer URL and Device Data is separated by device type.

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 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;
};