gads_get_pmax_channel_performance
Google Ads read low risk
Part of the Performance Max Agent.
What it does
Report Performance Max performance broken out by asset group and (where Google exposes it) by channel/placement, surfacing where the PMax 'black box' actually served. Pulls campaign/asset-group metrics (impressions, clicks, cost, conversions, conversions_value, ROAS) and the limited channel signals Google exposes (e.g., search vs non-search via campaign_search_term_insight / asset-group reporting). Accuracy: cost is micros (÷1e6); ROAS = conversions_value ÷ (cost_micros/1e6) computed client-side; PMax channel granularity is intentionally limited by Google — the tool labels figures as platform-reported and explicitly marks any portion where Google withholds a channel split (it does NOT fabricate a breakdown). Read-only.
When to use it
When the user asks how Performance Max spend splits across channels (Search/Display/Video/Shopping) or how PMax performs overall. (In a full audit, gads_audit_account defines the checks this data feeds.)
Inputs
| Name | Type | Required | Description |
|---|---|---|---|
customer_id | string | yes | 10-digit CID; strip dashes. |
campaign_id | string | no | Restrict to one PMax campaign; omit for all PMax. |
date_range | string | yes | Macro (LAST_7_DAYS/LAST_30_DAYS) or YYYY-MM-DD..YYYY-MM-DD; prior period auto-derived for deltas. |
limit | integer | no | GAQL LIMIT cap on returned rows — recommended on account-wide calls (uncapped reads returned 80+ rows on multi-PMax accounts). |
Safeguards
Policy
Read-only; figures must reconcile to the Google Ads UI (±1%). Where Google does not expose a channel-level split for PMax, say so rather than estimating (no fabrication — HARD CONSTRAINT 6).
Reminder
Match the UI exactly; convert micros; show prior-period delta; account-isolated; nothing retained beyond this request.
Errors
| Error class | Means | What to do | Retry |
|---|---|---|---|
MANAGER_ACCOUNT_METRICS | Metrics requested on an MCC CID. | Re-issue against a serving child CID. | no |
CUSTOMER_NOT_FOUND | CID invalid/inaccessible. | Verify CID; if revoked set needs_reauth. | no |
TOKEN_REVOKED | Token revoked/expired. | Set needs_reauth; prompt reconnect. | no |
INVALID_ARGUMENT | Bad GAQL/date range or unsupported segment combination. | Surface the message; correct the query. | no |
RESOURCE_EXHAUSTED | Quota/QPS exceeded (HTTP 429). | Backoff 5/10/20s cap 60s, retry once. | yes |
PLATFORM_UNAVAILABLE | Backend 5xx/INTERNAL. | Retry once after backoff. | yes |
Edge cases
- PMax withholds full channel granularity -> label 'platform-reported' and mark unsplit portions, never invent a breakdown.
- No PMax campaigns / no data in range -> success count:0.
- Segment-multiplication: channel x asset_group rows multiply; aggregate carefully and avoid double-counting totals.
- Brand-new campaign with sparse data -> deltas may be N/A; state so.
- Metrics on MCC blocked -> use child CID.