Ad Campaign Results

Name a result metric or define a formula

Changed on

Sets a metric key's label and kind: count for things you count (leads, sales), money with its currency (revenue), percent or ratio.

Send formula to make it a computed metric: + - * / and parentheses over spend, impressions, clicks, conversions, purchase_value and the metrics you send, at most 200 characters. A formula cannot read another formula.

It is computed per campaign over the summed values of the range, and has no value when an input is missing or a division is by zero.

put/v1/ads/campaign-results/metrics/{key}

Request

  • Base URL
    https://zernio.com/api
  • URL
    https://zernio.com/api/v1/ads/campaign-results/metrics/{key}
  • Auth
    HTTP bearer

Path parameters

keystring required

Request body

labelstring required
kind'count' | 'money' | 'percent' | 'ratio' required
currencystring nullable

ISO 4217, money metrics only.

formulastring nullable

Makes it a computed metric. Null or absent for a number you send.

Example request

{
  "label": "Qualified leads",
  "currency": "EUR",
  "formula": "spend / sales"
}

Response

The metric.

Example response

{
  "metric": {
    "key": "qualified_leads",
    "label": "Qualified leads"
  }
}

Changes