All blog posts

Claude Sonnet 5 Meta and Google Ads Setup Guide

July 1, 2026 · 12 min read

Soku Team

Soku Team

Claude Sonnet 5 Meta and Google Ads Setup Guide

Claude Sonnet 5 is useful for ad teams only if it can see the right data and stop at the right boundary. Anthropic says Sonnet 5 can make plans, use browsers and terminals, and run more autonomously than prior Sonnet models (Anthropic). That is exactly why the setup matters. A stronger model connected to vague exports is still guessing. A stronger model connected directly to spend-changing tools without approval is risky.

For the broad overview, start with the Claude Sonnet 5 for AI marketers pillar. This guide owns the setup query: how to wire Sonnet 5 into Meta and Google Ads workflows without turning the model into an unbounded media buyer.

Claude Sonnet 5 setup architecture for Meta Ads and Google Ads workflows
Claude Sonnet 5 setup architecture for Meta Ads and Google Ads workflows

The target architecture

The safest setup has five layers.

LayerPurposeExample
Data connectorsRead performance, settings, creative, and conversion dataMeta Ads, Google Ads, GA4, PostHog, CRM
Model runtimeReason over the evidence and draft next actionsclaude-sonnet-5
Tool schemasKeep platform actions structured and validatedCampaign ID, ad set ID, date range, platform
Approval gatesStop before spend, targeting, publishing, or customer-data changesHuman approval, spend caps, allowlists
Audit logRecord what was proposed, approved, changed, and measuredChange log, report links, rollback note

The model is only one layer. If you skip the other four, Sonnet 5 becomes a confident analyst with incomplete evidence.

Step 1: Define the model role

Do not tell Sonnet 5 to "optimize my ads." That instruction is too broad.

Use a role like this:

You are a paid media analyst. You may read account, campaign, creative, landing-page, and analytics data. You may draft recommendations and prepare platform changes. You must not execute spend, targeting, creative publishing, or customer-data changes unless an explicit approval tool returns approved=true for the exact change.

The key is the boundary. Sonnet 5 can plan and reason. Your product should decide what it can touch.

Step 2: Start read-only

The first production use case should be diagnosis. Give Sonnet 5 enough evidence to answer a narrow question:

  • Which campaign changed most?
  • Was the change driven by CPM, CTR, CVR, AOV, or mix?
  • Which ad or keyword object explains it?
  • What should we check before changing anything?
  • What is the smallest safe next action?

For Meta, read:

  • Account, campaign, ad set, and ad IDs.
  • Spend, impressions, CPM, clicks, CTR, CPC, conversions, CPA, ROAS.
  • Frequency, placement, audience, creative ID, and landing URL.
  • Creative fatigue signals by ad.

For Google Ads, read:

  • Campaign, ad group, asset group, keyword, search term, and final URL.
  • Spend, clicks, impressions, CTR, CPC, conversions, CPA, ROAS.
  • Match type, search-term expansion, negatives, and landing-page status.
  • AI Max, Performance Max, and Demand Gen settings where relevant.

For analytics, read:

  • GA4 landing-page sessions and conversion rate.
  • PostHog funnel drop-off and event changes.
  • CRM or ecommerce revenue when available.
  • Tracking anomalies and missing events.

Step 3: Normalize platform object names

Most failed ad-agent runs are not reasoning failures. They are object failures. The model refers to "the Meta campaign" but the tool needs an account ID, campaign ID, ad set ID, ad ID, platform, and date range.

Force every recommendation into a schema:

FieldRequired?Why
platformYesPrevents a Meta action from being sent to a Google tool.
account_idYesAvoids ambiguous brand or client routing.
object_typeYesCampaign, ad set, ad, keyword, asset group, landing page.
object_idYes when availableMakes the recommendation executable and auditable.
date_start and date_endYesPrevents cherry-picked comparisons.
metric_deltaYesForces evidence rather than opinion.
recommended_actionYesThe proposed change in plain English.
tool_payloadOnly after validationThe exact structured action, not prose.

This is where Sonnet 5's agentic gains help: it is better at carrying structured context across steps. But the schema still belongs in your product.

Step 4: Give Sonnet 5 a platform-specific checklist

Meta Ads checklist

Ask Sonnet 5 to check these before recommending creative changes:

  • Did frequency rise on the affected ad set?
  • Did CTR fall while CPM stayed stable?
  • Did conversion rate fall after the click?
  • Did a placement or audience mix shift?
  • Did a winning ad exit learning or hit fatigue?
  • Did a tracking or pixel event change?
  • Is the issue isolated to creative, audience, landing page, or budget?

Only after that should it draft an action. For example:

SymptomBetter recommendation
Frequency up, CTR down, CVR stableRefresh hook and first frame.
CTR stable, CVR downCheck landing page, offer, and tracking.
CPM up, CTR stableAudience auction pressure, not necessarily creative.
CPA up on one placementSplit placement analysis before changing creative.

Ask Sonnet 5 to check these before recommending Google changes:

  • Did the search-term mix change?
  • Did broad match or AI Max expansion enter weak terms?
  • Did final URL expansion route traffic to a weaker page?
  • Did negatives, brand exclusions, or assets change?
  • Is CPA movement volume-driven or quality-driven?
  • Did conversion lag explain the apparent drop?

The model should not add negatives blindly. It should propose candidate negatives with evidence:

Candidate negativeEvidence required
Off-intent querySpend and clicks with low or zero conversion.
Competitor queryStrategic decision, not automatic block.
Research queryLow conversion rate across enough clicks.
Brand-adjacent queryHuman approval because brand defense may matter.

Step 5: Add approval gates

Use three approval levels:

LevelAgent can doExamples
No approvalRead data, summarize, diagnoseDaily report, anomaly explanation
Soft approvalDraft a change packageNegative list, creative brief, budget recommendation
Hard approvalExecute after exact human confirmationPause ad, change budget, publish creative

The approval record should include the platform, object ID, proposed change, estimated impact, rollback plan, and reviewer.

Step 6: Use effort levels deliberately

Anthropic says Sonnet 5 supports effort levels and that higher effort expands cost-performance options on agentic search and computer-use work (Anthropic). Marketing teams should not run every task at the highest setting.

Use this routing:

TaskSuggested effort
Daily metric summaryLow or medium
Account anomaly diagnosisMedium
Cross-platform root-cause analysisMedium or high
Preparing executable change payloadsHigh
Investigating tracking or landing-page failuresHigh
Ambiguous strategy callEscalate to Opus 4.8 or human

A starter prompt for read-only diagnosis

Use a prompt like this after the tool layer has loaded structured data:

Analyze the attached Meta, Google Ads, GA4, and PostHog data for the last 7 days versus the previous 7 days. Identify the largest performance change by business impact. Separate volume, cost, click-through, conversion-rate, and mix effects. Cite the exact campaign, ad set, keyword, creative, or landing page objects behind the claim. Do not recommend a spend or targeting change unless the evidence points to one object-level action. End with a change package that requires human approval.

A starter prompt for creative refresh planning

Use this when the diagnosis points to creative fatigue:

Given the fatigued ads and their historical winners, propose 12 new creative hypotheses. Group them by hook, offer, proof, format, and audience angle. For each hypothesis, name the performance symptom it addresses, the platform placement it fits, and the first metric we should watch after launch. Do not write final ad copy until the hypotheses are approved.

Common setup mistakes

Mistake 1: Giving the model screenshots instead of data

Screenshots are useful for interface context. They are not enough for diagnosis. Sonnet 5 needs structured rows with date ranges, metric definitions, and object IDs.

Mistake 2: Letting prose become the tool payload

The model can write "reduce budget by 20%." Your tool should require a structured payload with object ID, current budget, new budget, reason, approval ID, and rollback note.

Mistake 3: Mixing brands or accounts

Marketing agents often fail when one user manages several brands. Always bind the data namespace: organization, brand, platform account, and connected credential.

Mistake 4: Treating recommendations as truth

Sonnet 5 should produce evidence-weighted hypotheses, not unquestioned commands. Force confidence labels: high, medium, low, and "needs data."

How Soku fits

Soku's role is to provide the workflow shell around models like Sonnet 5:

  • Connect the ad accounts and analytics tools.
  • Normalize the data and object IDs.
  • Give the model platform-safe tools.
  • Enforce approval gates.
  • Record the change log.
  • Measure the result after the action.

Claude Sonnet 5 is the reasoning and execution layer. Soku should remain the operating system around it.

Where to go next

Related Tools

Related Use Cases

Relevant Reads

Connect Ad Data Before You Automate

Soku gives AI agents clean ad-platform context, schema-safe tools, and approval gates before any recommendation reaches live spend.

Get Started for Free