DistrictM

The Switchboard DistrictM Connector pulls the “Metrics” and “Winrate” reports and supports the use of definable dimensions and measures (metrics). 

Prerequisites

To configure access to the DistrictM connector, you need:

  • Client ID 
  • Client Secret

To obtain a Client ID and Client Secret, contact your DistrictM Account Manager. 

Scheduling

The DistrictM Connector can be scheduled to ingest data once per day at a user-defined hour and timezone. By default, the connector will run once at 6am PT. See Daily Scheduling for more information.

Report Types

The following report types are available:

Metrics Report

Parameters

Parameter

Description

Required/Optional?

report_type

metrics

Required

dimensions

A list of requested dimensions. 

  • adsize (string)
  • country (string)
  • day_date (datetime)
  • day_month (string)
  • day_week (string)
  • domain_name (string)
  • placement_id (string)
  • dmx_id (string)
  • product (string)
  • zone_name (string)

At least one value is required.

metrics

A list of requested metrics.

  • matched_ad_requests (integer)
  • net_earnings_cad (float)
  • net_earnings_usd (float)
  • net_earnings_eur (float)
  • net_ecpm_cad (float)
  • net_ecpm_usd (float)
  • net_ecpm_eur (float)
  • net_rcpm_cad (float)
  • net_rcpm_usd (float)
  • net_rcpm_eur (float)

At least one value is required.

Switchboard Script Syntax

import district_m_metrics from {
   type: "district_m";
   key: "district_m_key";
   report_type: "metrics";
   dimensions: ["day_date",
                "product"];
   metrics: ["matched_ad_requests",
                "net_earnings_usd",
                "net_ecpm_usd",
                "net_rcpm_usd"];
   } using {
            day_date: datetime;
            product: string;
            matched_ad_requests: integer;
            net_earnings_usd: float;
            net_ecpm_usd: float;
            net_rcpm_usd: float;
};

Winrate Report

Parameters

Parameter

Description

Required/Optional?

report_type

winrate

Required

dimensions

A list of requested dimensions. 

  • adsize (string)
  • day_date (datetime)
  • day_month (string)
  • day_week (string)
  • domain_name (string)
  • zone_name (string)

At least one value is required

metrics

A list of requested metrics.

  • ad_requests (integer)
  • impressions (integer)
  • net_earnings_cad (float)
  • net_earnings_usd (float)
  • net_earnings_eur (float)
  • win_rate (float)

At least one value is required

Switchboard Script Syntax

import district_m_winrate_raw from {
   type: "district_m";
   key: "district_m_key";
   report_type: "winrate";
   dimensions: ["day_date",
                "domain_name"];
   metrics: ["ad_requests",
                "impressions",
                "net_earnings_usd",
                "win_rate"];
   } using {
                day_date: datetime;
                domain_name: string;
                ad_requests: integer;
                impressions: integer;
                net_earnings_usd: string;
                win_rate: string;
   };