SCALIX help

← All tools

gads_get_device_performance

Google Ads read low risk

Part of the Bidding Agent.

What it does

Break performance down by DEVICE (segments.device: MOBILE / DESKTOP / TABLET / CONNECTED_TV / OTHER) for a campaign (or the whole account when campaign_id is omitted) over a date range — one row per campaign x device. Metrics: impressions, clicks, CTR, avg CPC, cost, conversions, conv value. Money micros->currency (/1e6). Each device row is a per-slice figure — do NOT sum device rows and present them as a campaign total. Reconciles to the UI within +/-1%. Returns {success, data:[{campaign, segments.device, metrics}], count, warnings}.

When to use it

Use to see how a campaign performs on mobile vs desktop vs tablet before setting device bid adjustments.

Inputs

NameTypeRequiredDescription
customer_idstringyes10-digit Google Ads customer ID (CID), dashes stripped. Server-derived tenant context + RLS.
campaign_idstringnoRestrict to one campaign (recommended to bound rows).
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 account performance data as sensitive; 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

  • No data -> count:0 with a note naming the date range and the filters applied (no delivery in that window, or nothing matched).
  • segments.device multiplies rows (per-slice, not totals).
  • Manager account -> no metrics.