SCALIX help

← All tools

gads_get_geo_performance

Google Ads read low risk

Part of the Geo Targeting Agent.

What it does

Report performance by user LOCATION (geographic_view) for a campaign over a date range. Returns country_criterion_id with country (its name, resolved through geo_target_constant), location_type (LOCATION_OF_PRESENCE = where the user physically was, vs AREA_OF_INTEREST = where they showed interest), campaign, and metrics. Money micros->currency (/1e6); reconciles to the UI within +/-1%. Note: geographic_view reports at COUNTRY granularity; sub-country (region/city) requires user_location_view (not yet exposed). Returns {success, data:[{geographic_view{country_criterion_id, location_type}, country, campaign, metrics}], count, warnings}. GRANULARITY: country-level only (geographic_view). Rows are auto-decorated with the country name resolved via geo_target_constant; city/region breakdowns are not exposed yet.

When to use it

Use to see which locations drive or waste spend before adjusting geo targeting or location bid adjustments.

Inputs

NameTypeRequiredDescription
customer_idstringyes10-digit Google Ads customer ID (CID), dashes stripped. Server-derived tenant context + RLS.
campaign_idstringnoRestrict to one campaign.
location_typestringnoOptional filter: LOCATION_OF_PRESENCE (where the user physically was) or AREA_OF_INTEREST (where they showed interest).
date_rangestringyesGAQL macro (LAST_7_DAYS/LAST_30_DAYS/THIS_MONTH/LAST_MONTH) or explicit YYYY-MM-DD,YYYY-MM-DD. ALL_TIME removes the date filter entirely; so does omitting it (all time).
limitintegernoGAQL LIMIT cap; large pulls use SearchStream.

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 the account currency); rates are ratios.

Reminder

Treat this report as sensitive account data; do not retain beyond this request.

Errors

Error classMeansWhat to doRetry
CUSTOMER_NOT_FOUNDAccount {customer_id} not found or not linked.Verify the CID and authorization.no
needs_reauthAuthorization expired or revoked.Reconnect Google Ads in the Scalix dashboard.no
INVALID_ARGUMENTMalformed date_range or filter.Fix the argument and retry.no
MANAGER_ACCOUNT_METRICS_UNSUPPORTEDManager (MCC) accounts return no metrics.Query a child account.no
PERMISSION_DENIEDThe authenticated user lacks access to this account.Check account access.no
RESOURCE_EXHAUSTEDRate/quota limit hit.Back off and retry.yes

Edge cases

  • Rows carry the country name next to the id; if that lookup fails, a warning says so and rows keep the id only.
  • Both LOCATION_OF_PRESENCE and AREA_OF_INTEREST rows appear unless filtered.
  • No data -> count:0 with a note naming the date range and the filters applied (no delivery in that window, or nothing matched).