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: money-moving write. Every write is dry-run validated, then classified by the safe-apply policy — auto-applied when bounded and low-risk, otherwise queued for approval.

Parameters

ParameterTypeRequiredDescription
targetDailySpendnumber | nullNoDaily spend goal in currency units (e.g. 300 for €300/day). null clears.
targetRoasPctnumber | nullNoROAS floor as a percentage (150 = 1.5x return). null clears.
targetCpaMinnumber | nullNoLower bound of the acceptable CPA band, currency units. null clears.
targetCpaMaxnumber | nullNoUpper bound of the acceptable CPA band, currency units. null clears.
brandTermsstring[] | nullNoThe 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.
exploreSharePctnumber | nullNoPercent 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.
reasonstringYes
projectIdstringNoTarget account (project id) — required on account-scoped tools. Call gads_list_ad_accounts to enumerate accounts.

On this page