SCALIX help

← All tools

gads_get_cross_account_performance

Google Ads read low risk

Part of the Multi-Account Agent.

What it does

Portfolio roll-up across EVERY child account under a manager (MCC) over a date range. Manager accounts return no metrics of their own, so this resolves the manager's child accounts of every status (customer_client, level>0, manager=false) that are enabled for Claude and runs a per-child performance query (impressions, clicks, CTR, avg CPC, cost, conversions, conv value) with the manager as login-customer-id, then returns each child tagged with customer_id + descriptive_name + currency_code + status + its metrics, plus a portfolio_total. Money is micros (/1e6); each child reconciles to its OWN account UI within +/-1%. WARNING: child currencies may differ — portfolio_total sums raw numbers and is only meaningful across same-currency accounts. Capped at the first 50 children by default (raise via limit). Non-ENABLED children (CANCELED/SUSPENDED/CLOSED; a test account is always CLOSED) are queried too: Google still returns their history, each row carries its status, and a warning names them. A child whose query fails keeps error:'metrics_unavailable' with Google's reason in detail, is left out of portfolio_total, and a warning names it. With no date_range the metrics cover all time, and a warning says so. An empty roll-up explains itself (no child accounts enabled for Claude) rather than reading as zero spend. Returns {success, data:{manager_id, accounts:[{customer_id, descriptive_name, currency_code, status, metrics}], portfolio_total}, count, warnings}.

When to use it

Use to compare or roll up spend/performance across all accounts under one manager (MCC) in a single call, instead of querying each child separately.

Inputs

NameTypeRequiredDescription
manager_idstringyes10-digit manager (MCC) customer ID, dashes stripped. Must be an account you're authorized for; used as login-customer-id for every child query.
date_rangestringnoGAQL macro (LAST_7_DAYS/LAST_30_DAYS/THIS_MONTH/LAST_MONTH) or explicit YYYY-MM-DD,YYYY-MM-DD. Omitted: all time (no date filter), and a warning says so.
limitintegernoMax child accounts to query (default 50). Each child is one extra API call; raise deliberately.

Safeguards

Policy

Never fabricate or approximate a metric; if a figure can't be reconciled to the Google Ads UI within +/-1%, say so. Money is micros/1e6 (label EACH account's currency; never sum across differing currencies). Respect per-account isolation — only accounts the user is authorized for are queried.

Reminder

Treat every account's figures as sensitive; do not retain beyond this request. portfolio_total is a same-currency convenience only — call out mixed currencies before summing.

Errors

Error classMeansWhat to doRetry
CUSTOMER_NOT_FOUNDManager account {manager_id} not found or not linked.Verify the manager CID and authorization.no
needs_reauthAuthorization expired or revoked.Reconnect Google Ads in the Scalix dashboard.no
INVALID_ARGUMENTMalformed date_range. (A leaf account is not an error: it has no children, and the empty roll-up says so.)Pass a valid date_range (a GAQL macro or YYYY-MM-DD,YYYY-MM-DD).no
PERMISSION_DENIEDThe authenticated user lacks access to this manager or a child.Check account access.no
RESOURCE_EXHAUSTEDRate/quota limit hit (many children = many calls).Lower limit, back off, and retry.yes

Edge cases

  • Passing a non-manager (leaf) account -> no children found; accounts:[] count:0.
  • More children than the cap -> only the first N queried; a warning names the cap.
  • A single child failing (e.g. Google refuses a suspended or not-enabled account) -> that row carries error:'metrics_unavailable' and the reason in detail, a warning names it, and the rest still return.
  • Mixed-currency children -> portfolio_total is not directly comparable; a warning flags it.