Deprecation Warning

DSP API v1 will continue to receive critical bug and security fixes, but no new functionality will be added going forward. Next version of DSP API is under development and when ready DSP API v1 will be deprecated.

Statistics

Statistics can be requested by day or in total. The delta total can be used to get e.g. per hour statistics.

Contact your Delta Projects representative to get your mediaAgencyId!

Activity Statistics

Description: Retrieve activity statistics
Verb: GET
Path: /api/v1/media_agency/<mediaAgencyId>/client/<clientId>/campaign/<campaignId>/activity/<activityId>/statistics

Request Parameters

Parameter Type Required Description Example
mediaAgencyId Path Yes Id of media agency 86b35325-794c-11e4-8425-daf437376f87
clientId Path Yes Id of client 86b35326-794c-11e4-8425-daf437376f87
campaignId Path Yes Id of campaign. Must be "default" in v1. default
activityId Path Yes Id of activity 86b35327-794c-11e4-8425-daf437376f87
interval Query No Statistics date interval (default: activity flight) 2014-01-01/2014-01-10
group_by Query No Grouping (default: "bidding_plan") "format"
granularity Query No Granularity (default: "none") "day"
sort_order Query No The sorting order of Entries - ASC(default) or DESC DESC
limit Query No Number of Entries to limit the response to 10
apikey Query Yes API key for authentication and authorization secretkey123

Available groupings:

  • "bidding_plan" -- Bidding Plan
  • "bidding_platform" -- Inventory Channel
  • "format" -- Creative dimensions
  • "site" -- Site

Available granularities:

  • "none" -- Total during period
  • "day" -- Per day, during period

Response JSON body

Parameter Parameter Type Description Example
top level Array of Group Group See below

Group Object

Parameter Parameter Type Description Example
name String Name of group "Example Inventory Channel 1"
id String Id of group (only applicable for bidding_plan "86b35328-794c-11e4-8425-daf437376f87"
entries Array of Entry Entries within group See below

id is only included when group_by is bidding_plan.

Entry object [entry-object]

Parameter Parameter Type Description Example
bids Integer Bids 1000
impressions Integer Impressions 1000
viewable_impressions Double Viewable Impressions factor 0.6652360515021459
clicks Integer Clicks 50
vt_orders Integer VT Orders 4
ct_orders Integer CT Orders 1
cost Double Cost in account currency 2.5
range_begin ISO8601 Timestamp Statistics date start "2014-01-01T00:00:00.000Z"
range_end ISO8601 Timestamp Statistics date end "2014-01-01T23:59:59.999Z"

viewable_impressions is only included if sufficient data is available.

range_end set to 2014-01-01 will be read as 2014-01-01T00:00:00.000Z.

Example Request

GET /api/v1/media_agency/86b35325-794c-11e4-8425-daf437376f87/client/86b35326-794c-11e4-8425-daf437376f87/campaign/default/activity/86b35327-794c-11e4-8425-daf437376f87/statistics?apikey=secret123&interval=2014-01-01/2014-01-03&granularity=day&group_by=bidding_platform

Example Response

[
  {
    "entries": [
      {
        "bids": 1000,
        "clicks": 50,
        "cost": 2.5,
        "ct_orders": 1,
        "impressions": 1000,
        "range_begin": "2014-01-01T00:00:00.000Z",
        "range_end": "2014-01-01T23:59:59.999Z",
        "viewable_impressions": 0.6652360515021459,
        "vt_orders": 4
      },
      {
        "bids": 1000,
        "clicks": 50,
        "cost": 2.5,
        "ct_orders": 1,
        "impressions": 1000,
        "range_begin": "2014-01-02T00:00:00.000Z",
        "range_end": "2014-01-02T23:59:59.999Z",
        "viewable_impressions": 0.6652360515021459,
        "vt_orders": 4
      },
      {
        "bids": 1000,
        "clicks": 50,
        "cost": 2.5,
        "ct_orders": 1,
        "impressions": 1000,
        "range_begin": "2014-01-03T00:00:00.000Z",
        "range_end": "2014-01-03T23:59:59.999Z",
        "viewable_impressions": 0.6652360515021459,
        "vt_orders": 4
      }
    ],
    "name": "Example Inventory Channel 1",
    "id": "86b35328-794c-11e4-8425-daf437376f87"
  },
  {
    "entries": [
      {
        "bids": 1000,
        "clicks": 50,
        "cost": 2.5,
        "ct_orders": 1,
        "impressions": 1000,
        "range_begin": "2014-01-01T00:00:00.000Z",
        "range_end": "2014-01-01T23:59:59.999Z",
        "viewable_impressions": 0.6652360515021459,
        "vt_orders": 4
      },
      {
        "bids": 1000,
        "clicks": 50,
        "cost": 2.5,
        "ct_orders": 1,
        "impressions": 1000,
        "range_begin": "2014-01-02T00:00:00.000Z",
        "range_end": "2014-01-02T23:59:59.999Z",
        "viewable_impressions": 0.6652360515021459,
        "vt_orders": 4
      },
      {
        "bids": 1000,
        "clicks": 50,
        "cost": 2.5,
        "ct_orders": 1,
        "impressions": 1000,
        "range_begin": "2014-01-03T00:00:00.000Z",
        "range_end": "2014-01-03T23:59:59.999Z",
        "viewable_impressions": 0.6652360515021459,
        "vt_orders": 4
      }
    ],
    "name": "Example Inventory Channel 2",
    "id": "86b35328-794c-11e4-8425-daf437376f88"
  }
]

Live Activity Statistics Summary

Description: Retrieve live activity statistics summary
Verb: GET
Path: /api/v1/media_agency/<mediaAgencyId>/client/<clientId>/campaign/<campaignId>/activity/<activityId>/live_statistics_summary

Request Parameters

Parameter Type Required Description Example
mediaAgencyId Path Yes Id of media agency 86b35325-794c-11e4-8425-daf437376f87
clientId Path Yes Id of client 86b35326-794c-11e4-8425-daf437376f87
campaignId Path Yes Id of campaign. Must be "default" in v1 default
activityId Path Yes Id of activity 86b35327-794c-11e4-8425-daf437376f87
apikey Query Yes API key for authentication and authorization secretkey123

Response JSON body

Parameter Parameter Type Description Example
name String Name of activity "Example Campaign"
id String Id of activity "86b35328-794c-11e4-8425-daf437376f87"
bids Integer Bids 78954
impressions Integer Impressions 42007
clicks Integer Clicks 124
reach Integer Reach 32811
cost Double Cost 59.51
currency ISO4217 Currency Cost currency code "EUR"
activity_begin ISO8601 Timestamp Statistics date start "2017-02-01T00:00:00.000Z"
activity_end ISO8601 Timestamp Statistics date end "2017-05-01T23:59:59.999Z"
generated_at ISO8601 Timestamp Report creation time "2017-03-25T14:01:31.056Z"

Example Request

GET /api/v1/media_agency/86b35325-794c-11e4-8425-daf437376f87/client/86b35326-794c-11e4-8425-daf437376f87/campaign/default/activity/86b35327-794c-11e4-8425-daf437376f87/live_statistics_summary?apikey=secret123

Example Response

{
  "name": "Example Campaign",
  "id": "86b35328-794c-11e4-8425-daf437376f87",
  "bids": 78954,
  "impressions": 42007,
  "clicks": 124,
  "reach": 32811,
  "cost": 594.17251,
  "currency": "SEK",
  "activity_begin": "2017-02-01T00:00:00.000Z",
  "activity_end": "2017-05-01T23:59:59.999Z",
  "generated_at": "2017-03-25T14:01:31.056Z"
}

Live Activity Statistics

Description: Retrieve live activity statistics
Verb: GET
Path: /api/v1/media_agency/<mediaAgencyId>/client/<clientId>/campaign/<campaignId>/activity/<activityId>/live_statistics

Request Parameters

Parameter Type Required Description Example
mediaAgencyId Path Yes Id of media agency 86b35325-794c-11e4-8425-daf437376f87
clientId Path Yes Id of client 86b35326-794c-11e4-8425-daf437376f87
campaignId Path Yes Id of campaign. Must be "default" in v1 default
activityId Path Yes Id of activity 86b35327-794c-11e4-8425-daf437376f87
apikey Query Yes API key for authentication and authorization secretkey123

Response JSON body

Parameter Parameter Type Description Example
top level Array of BiddingPlan Bidding Plans See below

BiddingPlan Object

Parameter Parameter Type Description Example
bidding_plan_id String Id of bidding plan "86b35328-794c-11e4-8425-daf437376f87"
bidding_plan String Name of bidding plan "Example Bidding Plan"
bidding_platforms Array of BiddingPlatform Bidding Platforms See below

BiddingPlatform Object

Parameter Parameter Type Description Example
name String Name of bidding platform "Example Bidding Platform"
entry Entry Entry See below

Example Request

GET /api/v1/media_agency/86b35325-794c-11e4-8425-daf437376f87/client/86b35326-794c-11e4-8425-daf437376f87/campaign/default/activity/86b35327-794c-11e4-8425-daf437376f87/live_statistics?apikey=secret123

Example Response

[
  {
    "bidding_plan_id": "86b35328-794c-11e4-8425-daf437376f87",
    "bidding_plan": "Example Bidding Plan 1",
    "bidding_platforms": [
      {
        "name": "Example Bidding Platform 1",
        "entry": {
          "bids": 1000,
          "impressions": 1000,
          "clicks": 50,
          "vt_orders": 4,
          "ct_orders": 1,
          "cost": 2.5,
          "range_begin": "2014-01-01T00:00:00.000Z",
          "range_end": "2014-01-01T23:59:59.999Z"
        }
      },
      {
        "name": "Example Bidding Platform 2",
        "entry": {
          "bids": 1000,
          "impressions": 1000,
          "clicks": 50,
          "vt_orders": 4,
          "ct_orders": 1,
          "cost": 2.5,
          "range_begin": "2014-01-01T00:00:00.000Z",
          "range_end": "2014-01-01T23:59:59.999Z"
        }
      }
    ]
  },
  {
    "bidding_plan_id": "86b35329-794c-11e4-8425-daf437376f87",
    "bidding_plan": "Example Bidding Plan 2",
    "bidding_platforms": [
      {
        "name": "Example Bidding Platform 1",
        "entry": {
          "bids": 1000,
          "impressions": 1000,
          "clicks": 50,
          "vt_orders": 4,
          "ct_orders": 1,
          "cost": 2.5,
          "range_begin": "2014-01-01T00:00:00.000Z",
          "range_end": "2014-01-01T23:59:59.999Z"
        }
      },
      {
        "name": "Example Bidding Platform 2",
        "entry": {
          "bids": 1000,
          "impressions": 1000,
          "clicks": 50,
          "vt_orders": 4,
          "ct_orders": 1,
          "cost": 2.5,
          "range_begin": "2014-01-01T00:00:00.000Z",
          "range_end": "2014-01-01T23:59:59.999Z"
        }
      }
    ]
  }
]

Media Plan Statistics

Description: Retrieve Media Plan Statistics

Verb: POST

Path: api/v1/media_agency/<mediaAgencyId>/client/<clientId>/media_plan/<mediaPlanId>/statistics?apikey=<secret>

Request Parameters

Parameter Type Required Description Example
mediaAgencyId Path Yes Id of media agency 86b35325-794c-11e4-8425-daf437376f87
clientId Path Yes Id of client 86b35326-794c-11e4-8425-daf437376f87
mediaPlanId Path Yes Id of media plan 86b35327-794c-11e4-8425-daf437376f87
apikey Query Yes Your API-key abc123

Body

Query should be sent as json, as example:

{
    "groupBy": ["activity", "purchase"],
    "orderTypes": ["722d6526-4751-11ea-aab7-8c8590952542"],
    "interval": "2020-01-01/2020-01-31",
    "fields" : ["activity", "clicks", "orders", "ct_orders", "vt_orders"] 
}

Parameters

Parameter Type Required Description Examples
groupBy array of string Yes How to group to show the statistics "groupBy": ["activity", "purchase"]
"groupBy": ["activity"]
orderTypes array of string No An array of order types to include in statistics "orderTypes": ["e7ca276a-e41a-4e10-a485-e9d696afeef6"]
interval string Yes A date interval to query the statistics in the format 'yyyy-MM-dd'/'yyyy-MM-dd' "interval": "2020-01-01/2020-01-31"
fields array of string No Fields to view in the output. Omitting it or sending an empty array will result in all fields being shown. "fields" : ["activity", "orders", "ct_orders", "vt_orders", "clicks"]

Example Response

From request:

{
    "groupBy": ["activity", "purchase"],
    "orderTypes": ["e7ca276a-e41a-4e10-a485-e9d696afeef6"],
    "interval": "2019-11-01/2020-01-30",
    "fields" : [] 
}

Response:

{
    "entries": [
        {
            "ct_assisted_orders": 0,
            "reach": 79559,
            "purchase": "n/a",
            "ct_orders": 4,
            "purchase_id": "be0873c0-87cc-11eb-8dcd-0242ac130003",
            "order_value_usd": 0.0,
            "impressions": 177420,
            "order_value_eur": 0.0,
            "measurable": 0.5868955021981739,
            "order_value_dkk": 0.0,
            "viewable": 0.6567556925677298,
            "activity": "n/a",
            "vt_assisted_orders": 716, 
            "activity_id": "7a41bfe8-87cc-11eb-8dcd-0242ac130003",
            "order_value_na": 8374765.0,
            "order_value_nok": 0.0,
            "verified_clicks": 209,
            "assisted_orders": 716,
            "clicks": 254,
            "vt_orders": 514,
            "order_value_sek": 0.0,
            "orders": 518,
            "order_value_gbp": 0.0,
            "orderType#e7ca276a-e41a-4e10-a485-e9d696afeef6": {
                "vt_assisted_orders": 0,
                "order_value_eur": 0.0,
                "order_value_dkk": 0.0,
                "ct_orders": 0,
                "order_value_sek": 0.0,
                "assisted_orders": 0,
                "vt_orders": 0,
                "order_value_usd": 0.0,
                "order_value_gbp": 0.0,
                "order_value_na": 0.0,
                "ct_assisted_orders": 0,
                "order_value_nok": 0.0,
                "orders": 0
            }
        }
    ]
}

From request:

{
    "groupBy": ["activity"],
    "orderTypes": ["e7ca276a-e41a-4e10-a485-e9d696afeef6"],
    "interval": "2019-11-01/2020-01-30",
    "fields" : ["activity", "orders", "ct_orders", "vt_orders", "clicks"] 
}

Response:

{
    "entries": [
        {
            "activity": "The activity", 
            "activity_id": "7a41bfe8-87cc-11eb-8dcd-0242ac130003",
            "ct_orders": 16,
            "clicks": 1425,
            "vt_orders": 2308,
            "orders": 2324,
            "orderType#e7ca276a-e41a-4e10-a485-e9d696afeef6": {
                "ct_orders": 0,
                "vt_orders": 0,
                "orders": 0
            }
        }
    ]
}

From request:

{
    "groupBy": ["activity"],
    "interval": "2019-11-01/2020-01-30",
    "fields" : ["activity", "orders", "ct_orders", "vt_orders", "clicks"] 
}

Response:

{
    "entries": [
        {
            "activity": "The activity",
            "activity_id": "7a41bfe8-87cc-11eb-8dcd-0242ac130003",
            "ct_orders": 16,
            "clicks": 1425,
            "vt_orders": 2308,
            "orders": 2324
        }
    ]
}
Parameter Type Description
orderType#<orderTypeId> object This object will contain result of choosen fields applicable for an order type when providing order types in the query.
other fields ... See Available Fields for what can be returned of the query

Available fields

Description: Retrieve Media Plan Statistics Available Fields

Verb: GET

Path: api/v1/media_agency/<mediaAgencyId>/client/<clientId>/media_plan/<mediaPlanId>/statistics/available_fields?apikey=<secret>

Request Parameters

Parameter Type Required Description Example
mediaAgencyId Path Yes Id of media agency 86b35325-794c-11e4-8425-daf437376f87
clientId Path Yes Id of client 86b35326-794c-11e4-8425-daf437376f87
mediaPlanId Path Yes Id of media plan 86b35327-794c-11e4-8425-daf437376f87
apikey Query Yes Your API-key apikey=abc123
info Query Yes Whether to sho detailed info or not with value true or false info=true

Response

{
    "fields": [
        "order_value_dkk",
        "order_value_usd",
        "vt_orders",
        "ct_assisted_orders",
        "activity",
        "order_value_eur",
        "vt_assisted_orders",
        "reach",
        "purchase_id",
        "purchase",
        "impressions",
        "order_value_nok",
        "verified_clicks",
        "order_value_gbp",
        "viewable", 
        "activity_id",
        "clicks",
        "assisted_orders",
        "orders",
        "order_value_na",
        "ct_orders",
        "order_value_sek",
        "measurable"
    ]
}
Parameter Type Description
fields array of string An array of fields that can be shown

Detailed

{
    "clicks": [
        {
            "name": "clicks",
            "label": "Clicks",
            "type": "int"
        },
        {
            "name": "verified_clicks",
            "label": "Verified Clicks",
            "type": "int"
        }
    ],
    "orders": [
        {
            "name": "orders",
            "label": "Orders",
            "type": "int"
        },
        {
            "name": "ct_orders",
            "label": "Orders CT",
            "type": "int"
        },
        {
            "name": "vt_orders",
            "label": "Orders VT",
            "type": "int"
        },
        {
            "name": "order_value_na",
            "label": "Order Value (N/A)",
            "type": "numeric"
        },
        {
            "name": "order_value_sek",
            "label": "Order Value (SEK)",
            "type": "numeric"
        },
        {
            "name": "order_value_nok",
            "label": "Order Value (NOK)",
            "type": "numeric"
        },
        {
            "name": "order_value_dkk",
            "label": "Order Value (DKK)",
            "type": "numeric"
        },
        {
            "name": "order_value_eur",
            "label": "Order Value (EUR)",
            "type": "numeric"
        },
        {
            "name": "order_value_usd",
            "label": "Order Value (USD)",
            "type": "numeric"
        },
        {
            "name": "order_value_gbp",
            "label": "Order Value (GBP)",
            "type": "numeric"
        },
        {
            "name": "assisted_orders",
            "label": "Assisted Orders",
            "type": "int"
        },
        {
            "name": "vt_assisted_orders",
            "label": "Click Assisted Orders",
            "type": "int"
        },
        {
            "name": "ct_assisted_orders",
            "label": "Impression Assisted Orders",
            "type": "int"
        }
    ],
    "impressions": [
        {
            "name": "impressions",
            "label": "Impressions",
            "type": "int"
        },
        {
            "name": "reach",
            "label": "Reach",
            "type": "int"
        }
    ],
    "grouping": [
        {
            "name": "activity",
            "label": "Activity",
            "type": "string"
        },
        {
            "name": "purchase",
            "label": "Purchase",
            "type": "string"
        }
    ],
    "inscreen": [
        {
            "name": "measurable",
            "label": "Measurable",
            "type": "numeric"
        },
        {
            "name": "viewable",
            "label": "Viewable",
            "type": "numeric"
        }
    ]
}

Top level

Parameter Type Description
clicks array of Field An array of fields with metrics related to clicks
orders array of Field An array of fields with metrics related to orders
impressions array of Field An array of fields with metrics related to impressions
inscreen array of Field An array of fields with metrics related to inscreen
grouping array of Field An array of fields that can be used for groupBy

Field

Parameter Type Description
name string The name of the field
label string Label for the field
type string The type of the field

Order Types

Description: Retrieve Media Plan Statistics Available Order Types

Verb: GET

Path: api/v1/media_agency/<mediaAgencyId>/client/<clientId>/order_type?apikey=<secret>

Request Parameters

Parameter Type Required Description Example
mediaAgencyId Path Yes Id of media agency 86b35325-794c-11e4-8425-daf437376f87
clientId Path Yes Id of client 86b35326-794c-11e4-8425-daf437376f87
apikey Query Yes Your API-key apikey=abc123

Response

Array of Order types

[
    {
        "id": "e7ca276a-e41a-4e10-a485-e9d696afeef6",
        "name" : "Order type ..."
    }
]

Order Type

Parameter Type Description
id string The id of the order type. This is what should be used in the request when wanting to show statistics for orderTypes
name string The name of the order type

Last modified: Mon Sep 23 2024 11:48:54 GMT+0200 (Central European Summer Time)

results matching ""

    No results matching ""