Skip to main content
Tool name get_campaign
Read-only · Idempotent
Reads one GAM campaign (order) — its details and lifetime delivery (impressions, CTR, viewability) — with optional breakdowns per cohort, per day, or per line item.

Example prompt

Break down that campaign’s delivery by cohort and by day so I can see which audiences drove impressions.

Parameters

string
required
The campaign id to read (from list_campaigns).
enum[]
Which breakdowns to include. Omit for the campaign’s totals only. each one of: targeted_cohorts, observed_cohorts, day, line_item.
string[]
Restrict every figure to these line items.
string[]
required
The workspaces the campaign runs across — pass the workspace_ids from the campaign’s list_campaigns row. min 1 item.

Returns

CampaignDetail object
required
The campaign’s details.
CohortBreakdownItem[]
Per-cohort breakdown, when requested via include.
number (double)
required
Lifetime click-through rate.
CampaignDayItem[]
The campaign’s own delivery by day (impressions/CTR/viewability), for spotting trends over its flight. Present when day is in include.
integer (int64)
required
Lifetime impressions delivered against the order (line-item-scoped when line_item_ids is set).
OrderComparison object
Comparison of the restricted impressions to the whole order. Present only when line_item_ids is set.
LineItemBreakdownItem[]
Per-line-item breakdown, when requested via include.
OtherCohorts object
The aggregate of cohorts on this campaign not listed in cohort_breakdown (not visible to you, or not resolvable in the cohort catalogue). Present with the cohort breakdown when any were dropped, so the breakdown accounts for all cohort delivery. Absent when nothing was dropped.
number (double)
required
Lifetime viewable-impression percentage (0..1).