Migrating optimization goals
AdCP 3.0 rc.1 replaces the singularoptimization_goal object with an optimization_goals array. Each goal is a discriminated union on kind, supporting multi-goal packages with priority ordering.
What changed
| beta.3 | rc.1 | Notes |
|---|---|---|
optimization_goal (single object) | optimization_goals (array) | Array of discriminated union |
| Implicit single goal | priority field | 1 = highest priority |
| One goal type | Two kinds: metric and event | Discriminated on kind field |
| No reach optimization | reach metric with reach_unit and target_frequency | Products declare supported_reach_units |
Goal kinds
Every goal has akind discriminator:
metric— Seller-native delivery metrics (clicks, views, reach, engagements, etc.)event— Conversion tracking tied to event sources configured viasync_event_sources
Metric goals
clicks, views, completed_views, viewed_seconds, attention_seconds, attention_score, engagements, follows, saves, profile_visits, reach.
Target types:
cost_per— Target cost per metric unit (e.g., $2.50 CPC)threshold_rate— Target rate threshold (e.g., 0.02 for 2% CTR)
Event goals
cost_per— Target cost per conversion (CPA)per_ad_spend— Target return on ad spend (ROAS). Requiresvalue_field.maximize_value— Maximize total conversion value. Requiresvalue_field.
Reach goals
Reach is a metric goal with additional fields:reach_unit values: individuals, households, devices, accounts, cookies, custom.
target_frequency requires at least one of min or max, plus window as a Duration object (e.g., {"interval": 7, "unit": "days"} or {"interval": 1, "unit": "campaign"}).
Multi-goal packages
Multiple goals are ordered bypriority (1 = highest). The seller optimizes for higher-priority goals first, using lower-priority goals as tiebreakers.
beta.3:
Product capabilities
Products declare optimization support viametric_optimization:
test=false
supported_metrics— Which metrics the product can optimize forsupported_reach_units— Required whenreachis in supported_metricssupported_view_durations— Seconds forcompleted_viewsmetricsupported_targets— Target kinds available. When omitted, only target-less goals (maximize volume) are allowedmax_optimization_goals— Maximum number of goals per package
Migration steps
Rename the field
Replace
optimization_goal (singular) with optimization_goals (array) in all request construction code.Add kind discriminator
Wrap existing goals with
"kind": "metric" or "kind": "event". Metric goals use seller-native metrics; event goals reference event sources from sync_event_sources.Restructure targets
Replace flat target fields (e.g.,
target_cpc) with the discriminated target object: { "kind": "cost_per", "value": 2.50 }.Add priority
Set
priority: 1 for single-goal packages. For multi-goal packages, assign ascending priority values (1 = highest).Update response parsing
When reading optimization goals from responses (e.g.,
get_media_buy), switch on kind to determine the goal type before accessing type-specific fields.Check product capabilities
Before submitting goals, check
metric_optimization.supported_metrics and max_optimization_goals on the product. Sellers reject unsupported metrics and goals exceeding the limit.Conversion tracking & optimization goals
Configure event sources, send conversion events, and optimize delivery goals.
Related: Channels | Pricing | Signals | AdCP 3.0 overview