Get Campaign Report
get_campaign_reportReport campaign spend, impressions, clicks, and platform conversions or value by platform, channel, campaign, or ad set across any date window and granularity.
Instructions
Report the campaign facts over any window, at any grain, by platform, model channel, campaign or ad set.
The same report engine as get_data_report, over the campaign facts: spend, media:impressions, media:clicks, outcome:platform_conversions, outcome:platform_value and, where a source fills them, outcome:last_click_conversions and outcome:last_click_value. These are the PLATFORMS' own attributed numbers, not Simba's incremental attribution.
group_by: "channel" groups by the model channel each campaign counts towards under the
model's map (give model_hash); spend of unmapped campaigns appears as its own group,
"unmapped", and is never dropped or guessed into a channel. Without model_hash every row is
"unmapped".
Returns {granularity, data_through, rows: [{period_start, period_end, group, metric, value,
unit}], meta: {basis, aggregation, roles, channels}, as_of, source_versions, currency}.
as_of is when the facts were last ingested; source_versions the pipeline versions they
came from.
Args: model_hash: The model whose map decides the channels (optional; needed for group_by=channel). start, end: Optional ISO dates (YYYY-MM-DD), inclusive. granularity: "native" (daily, as stored), "week", "month", "quarter" or "year". group_by: "platform", "channel", "campaign" or "adset". Default: one total per period. platform, channel, campaign_id: Filters applied before grouping. metrics: Roles to include, e.g. ["spend", "outcome:platform_conversions"]. Default: all.
Errors carry a code: campaign_facts_empty (404, nothing matches), invalid_report_request (400), report_too_large (413: narrow the window or coarsen the granularity).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| end | No | ||
| start | No | ||
| channel | No | ||
| metrics | No | ||
| group_by | No | ||
| platform | No | ||
| model_hash | No | ||
| campaign_id | No | ||
| granularity | No | native |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||