CDPGuidesSupport

Attribution

Query initial (first-touch) attribution, last-touch attribution, and UTM Performance Comparison reports over the public REST API.

Query computed attribution reports — first-touch, last-touch, and side-by-side UTM comparison — for a conversion event over a date window.

GET/rest/v1/attribution/initial

GET
/rest/v1/attribution/initial
AuthorizationBearer <token>

Ours Privacy API key

In: header

Query Parameters

from*string

Inclusive lower bound of the analytics window, as a UTC calendar day in YYYY-MM-DD format. The window between from and to must be 60 days or fewer.

Match^\d{4}-\d{2}-\d{2}$
to*string

Inclusive upper bound of the analytics window, as a UTC calendar day in YYYY-MM-DD format. The window between from and to must be 60 days or fewer.

Match^\d{4}-\d{2}-\d{2}$
eventName*string

Conversion event to count. Must be a selectable conversion event.

Length1 <= length <= 512
attributionType?string

Attribution type for UTM filter matching. Defaults to INITIAL.

Value in

  • "INITIAL"
  • "LAST_TOUCH"
utmSource?string

Filter by UTM source.

Length1 <= length <= 512
utmMedium?string

Filter by UTM medium.

Length1 <= length <= 512
utmCampaign?string

Filter by UTM campaign.

Length1 <= length <= 512
utmContent?string

Filter by UTM content.

Length1 <= length <= 512
utmTerm?string

Filter by UTM term.

Length1 <= length <= 512
utmName?string

Filter by UTM name.

Length1 <= length <= 512

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

curl -X GET "https://example.com/rest/v1/attribution/initial?from=2026-05-01&to=2026-06-30&eventName=purchase"
{  "initial_utm_source": [    {      "value": "string",      "count": 0    }  ],  "initial_utm_medium": [    {      "value": "string",      "count": 0    }  ],  "initial_utm_campaign": [    {      "value": "string",      "count": 0    }  ],  "initial_utm_content": [    {      "value": "string",      "count": 0    }  ],  "initial_utm_term": [    {      "value": "string",      "count": 0    }  ],  "initial_utm_name": [    {      "value": "string",      "count": 0    }  ],  "initial_referring_domain": [    {      "value": "string",      "count": 0    }  ]}
{  "error": "string",  "details": "string"}
{  "error": "string",  "details": "string"}
{  "error": "string",  "details": "string"}
{  "error": "string",  "details": "string"}
{  "error": "string",  "details": "string"}

GET/rest/v1/attribution/last-touch

GET
/rest/v1/attribution/last-touch
AuthorizationBearer <token>

Ours Privacy API key

In: header

Query Parameters

from*string

Inclusive lower bound of the analytics window, as a UTC calendar day in YYYY-MM-DD format. The window between from and to must be 60 days or fewer.

Match^\d{4}-\d{2}-\d{2}$
to*string

Inclusive upper bound of the analytics window, as a UTC calendar day in YYYY-MM-DD format. The window between from and to must be 60 days or fewer.

Match^\d{4}-\d{2}-\d{2}$
eventName*string

Conversion event to count. Must be a selectable conversion event.

Length1 <= length <= 512
attributionType?string

Attribution type for UTM filter matching. Defaults to LAST_TOUCH.

Value in

  • "INITIAL"
  • "LAST_TOUCH"
utmSource?string

Filter by UTM source.

Length1 <= length <= 512
utmMedium?string

Filter by UTM medium.

Length1 <= length <= 512
utmCampaign?string

Filter by UTM campaign.

Length1 <= length <= 512
utmContent?string

Filter by UTM content.

Length1 <= length <= 512
utmTerm?string

Filter by UTM term.

Length1 <= length <= 512
utmName?string

Filter by UTM name.

Length1 <= length <= 512

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

curl -X GET "https://example.com/rest/v1/attribution/last-touch?from=2026-05-01&to=2026-06-30&eventName=purchase"
{  "utm_source": [    {      "value": "string",      "count": 0    }  ],  "utm_medium": [    {      "value": "string",      "count": 0    }  ],  "utm_campaign": [    {      "value": "string",      "count": 0    }  ],  "utm_content": [    {      "value": "string",      "count": 0    }  ],  "utm_term": [    {      "value": "string",      "count": 0    }  ],  "utm_name": [    {      "value": "string",      "count": 0    }  ],  "referring_domain": [    {      "value": "string",      "count": 0    }  ]}
{  "error": "string",  "details": "string"}
{  "error": "string",  "details": "string"}
{  "error": "string",  "details": "string"}
{  "error": "string",  "details": "string"}
{  "error": "string",  "details": "string"}

GET/rest/v1/attribution/utm-comparison

GET
/rest/v1/attribution/utm-comparison
AuthorizationBearer <token>

Ours Privacy API key

In: header

Query Parameters

from*string

Inclusive lower bound of the analytics window, as a UTC calendar day in YYYY-MM-DD format. The window between from and to must be 31 days or fewer.

Match^\d{4}-\d{2}-\d{2}$
to*string

Inclusive upper bound of the analytics window, as a UTC calendar day in YYYY-MM-DD format. The window between from and to must be 31 days or fewer.

Match^\d{4}-\d{2}-\d{2}$
eventName*string

Conversion event to compare across UTM combos.

Length1 <= length <= 512
combos*string

JSON-encoded array of UTM dimension combos to compare side-by-side (min 1, max 5). Each combo is an object with optional utmSource, utmMedium, utmCampaign, utmContent, utmTerm fields.

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

curl -X GET "https://example.com/rest/v1/attribution/utm-comparison?from=2026-06-01&to=2026-06-30&eventName=purchase&combos=%5B%7B%22utmSource%22%3A%22google%22%2C%22utmMedium%22%3A%22cpc%22%7D%2C%7B%22utmSource%22%3A%22meta%22%7D%5D"
{  "combos": [    {      "combo": {        "utmSource": "string",        "utmMedium": "string",        "utmCampaign": "string",        "utmContent": "string",        "utmTerm": "string"      },      "visitors": 0,      "sessions": 0,      "events": 0,      "conversionRate": 0    }  ],  "range": {    "from": "string",    "to": "string"  },  "eventName": "string"}
{  "error": "string",  "details": "string"}
{  "error": "string",  "details": "string"}
{  "error": "string",  "details": "string"}
{  "error": "string",  "details": "string"}
{  "error": "string",  "details": "string"}

How is this guide?