Lifecycle · Draft

Optimization

Created 9 Jun 2026·Updated 11 Jun 2026

Latest change: Publish Dossier site and full doc pack to GitHub

Draft document — deep-dive spec incomplete; content will be updated before and during build. Do not treat as signed-off implementation detail. Pack overview

Objective

Improve campaign performance against plan KPIs using automated rules and Optimization Agent proposals — within guardrails, with human approval when thresholds are exceeded.

Inputs

  • Live execution_manifest slice + active plan_version per track (track_id)
  • Master plan caps (cross-track budget envelope)
  • GA4 performance data (primary)
  • Platform metrics (secondary)
  • CRM downstream metrics (lagged conversions)
  • Guardrail configuration per tenant

Outputs

  • Applied optimization changes (budget, bid, audience, creative rotation)
  • Updated execution_manifest (live state per platform entity)
  • Append to optimization_log / change_set_id (linked to plan_version, never mutates approved plan JSON)
  • Pending approval items when over threshold
  • Optional: plan.revise.recommended when drift thresholds met
  • Events: optimization.applied, optimization.pending_approval, plan.revise.recommended

Optimization types

Type Examples Auto if within guardrail
Budget shift Move 10% Search → Meta Yes, if < cap
Bid strategy Target CPA adjustment Yes, within bounds
Audience Exclude low-intent geo Yes
Creative Pause ad with CTR < floor Yes
Structural New campaign type No — requires replan
Spend increase +25% daily budget No — human approve

Decision loop

YesNoApprovedOver thresholdOKGA4 + CRM signalsOptimization AgentChange proposalQC spend guardrailsWithin guardrails?Apply via ExecutionServiceHuman approval queueUpdateexecution_manifestAppend optimization_logDrift vs plan vN?plan.revise.recommendedNotify Reporting Agent

After optimization: plan & manifest sync

Layer Updated when Purpose
execution_manifest Every applied optimization Source of truth for live campaigns
optimization_log Every applied / approved change Audit trail + input to plan revise
MediaPlan vN Only on plan revise / replan approval Client-approved contract for spend & strategy
Reports Next scheduled run Show changelog + drift vs vN until revise approved

Optimizations never silently rewrite the approved plan document. When live state diverges materially, the system recommends or drafts vN+1 so client reports and invoices reconcile to an approved baseline.

When optimization triggers plan revise

See Plan update — triggers. Optimization Agent computes drift score after each apply:

drift_score = max channel |manifest_budget[channel] - plan_budget[channel]| / plan_budget[channel]

If drift_score > tenant threshold → emit plan.revise.recommended with structured diff preview.

Frequency

  • Rule engine: hourly for spend pacing
  • Agent deep review: daily (configurable per tenant)
  • Intraday: emergency pause on tracking failure or spend anomaly

KPI examples

Vertical Primary optimization metric
Health GA4 book_appointment CPA
Schools GA4 sign_up CPA
Tourism Assisted conversions / ROAS proxy
Ecommerce GA4 purchase ROAS

Safeguards

  • Never optimize on platform-reported conversions alone if GA4 diverges > tolerance
  • Freeze increases when CRM upload match rate drops
  • Respect plan budget flight — no overspend without approval

GA4-absent degraded mode

GA4 is the source of truth, but onboarding v1 makes the GA4 link optional (client must grant Admin). When GA4 is not connected for a tenant, optimization runs in an explicit degraded mode, never silently:

Condition Behavior
GA4 connected Full optimization on GA4 SoT (default)
GA4 not connected Optimize on platform-reported + CRM signals only; flag degraded_attribution on the tenant; cap automated spend increases (tighter guardrails) until GA4 connected; surface a "Connect GA4 for full optimization" banner

For pilots, GA4 Admin grant is a soft gate — required to meet the Phase 1 "GA4 SoT reporting" exit criterion (see execution gameplan B5).

Human touchpoints

  • Proposals exceeding guardrail thresholds
  • Conflicting signals (GA4 up, CRM down)
  • Policy-sensitive creative performance issues