Setup & connection
gads_set_optimization_targets
Set the scoped account's optimization objective: target daily spend, ROAS floor (percent, e.g.
Set the scoped account's optimization objective: target daily spend, ROAS floor (percent, e.g. 150 = 1.5x), CPA band — all in account currency units — and the explore budget. Omitted fields keep their current value; pass null to clear one. These targets drive the optimization plan, the recommendation engine, and the copilot's guardrails.
Type: write. Changes this workspace's own records; never touches the Google Ads account.
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
targetDailySpend | number | null | No | Daily spend goal in currency units (e.g. 300 for €300/day). null clears. |
targetRoasPct | number | null | No | ROAS floor as a percentage (150 = 1.5x return). null clears. |
targetCpaMin | number | null | No | Lower bound of the acceptable CPA band, currency units. null clears. |
targetCpaMax | number | null | No | Upper bound of the acceptable CPA band, currency units. null clears. |
brandTerms | string[] | null | No | The account's own brand terms (e.g. ['ExecHeadshots','exec headshots']). Keywords and queries matching these are EXEMPT from pause/restrict/negative verdicts — brand defends the name and its conversions are under-credited, so it is judged on impression share, not CPA. Replaces the whole list; null clears it. Set this for every account: while it is empty the engine will happily propose pausing the brand. |
exploreSharePct | number | null | No | Percent of the daily spend goal reserved for unproven silos (e.g. 10 for 10%). Drives the plan's explore group. null clears it back to the 10% default; 0 turns exploration off. |
reason | string | Yes | |
projectId | string | No | Target account (project id). Optional when exactly one authorized stored account exists. Use gads_list_ad_accounts or gads_get_connection_status to select among multiple accounts. |