Skip to Content
AgentsAds Analyst

Ads Analyst

[Live] · agent__ads-analyst · Claude Sonnet 4.6

Analyses Google Ads and Meta Ads performance data for the last 30 days and produces a structured ads analysis report covering campaign health, top/bottom performers, wasted spend, and budget allocation recommendations.


Overview

FunctionAnalyse paid ad performance and produce actionable campaign recommendations
TypeWorker — Analysis
ModelClaude Sonnet 4.6
Queueagent__ads-analyst
Concurrency3
Timeout5 min
Est. cost / task~$0.50
PlanPro+

Input

interface AdsAnalystInput { tenantId: string; campaignId: string; dateRange: { start: string; // ISO date, e.g. "2026-03-01" end: string; // e.g. "2026-03-31" }; comparisonRange?: { start: string; // prior period for MoM or WoW comparison end: string; }; campaignGoals: { primaryGoal: 'leads' | 'sales' | 'traffic' | 'brand_awareness' | 'app_installs'; targetCPA?: number; // target cost per acquisition in dollars targetROAS?: number; // target return on ad spend, e.g. 4.0 targetCTR?: number; // target CTR as decimal, e.g. 0.03 }; budget: { totalMonthlyBudget: number; // total spend budget in dollars googleAllocation?: number; // current Google Ads allocation metaAllocation?: number; // current Meta Ads allocation }; googleAdsCustomerId?: string; // required if Google Ads connected metaAdAccountId?: string; // required if Meta Ads connected }

Output

interface AdsAnalystOutput { reportPeriod: { start: string; end: string }; generatedAt: string; // ISO timestamp campaignHealthSummary: { overallHealth: 'healthy' | 'needs_attention' | 'critical'; headline: string; // 1–2 sentence plain-English summary googleHealth?: 'healthy' | 'needs_attention' | 'critical'; metaHealth?: 'healthy' | 'needs_attention' | 'critical'; }; topPerformers: AdPerformanceItem[]; // top 3 by ROAS or primary goal metric bottomPerformers: AdPerformanceItem[]; // bottom 3 — candidates for pause/restructure wastedSpend: { totalEstimatedWaste: number; // dollars items: WastedSpendItem[]; }; bidStrategyRecommendations: Recommendation[]; targetingRecommendations: Recommendation[]; creativeFatigueFlags: CreativeFatigueFlag[]; budgetAllocationRecommendation: { currentGooglePct: number; currentMetaPct: number; recommendedGooglePct: number; recommendedMetaPct: number; rationale: string; }; nextSteps: string[]; // ordered list of priority actions } interface AdPerformanceItem { platform: 'google' | 'meta'; campaignName: string; adGroupOrSet?: string; spend: number; impressions: number; clicks: number; ctr: number; cpc: number; conversions: number; cpa: number; roas?: number; verdict: string; // one-sentence assessment } interface WastedSpendItem { platform: 'google' | 'meta'; campaign: string; issue: string; // e.g. "High spend, zero conversions (14 days)" spend: number; recommendation: string; } interface Recommendation { priority: 'high' | 'medium' | 'low'; platform: 'google' | 'meta' | 'both'; action: string; rationale: string; expectedImpact: string; } interface CreativeFatigueFlag { platform: 'google' | 'meta'; adName: string; metric: string; // e.g. "CTR declined 42% over 14 days" runningDays: number; recommendation: string; }

Sample output excerpt

## Campaign Health Summary **Overall health:** Needs Attention Google Ads is performing above target ROAS (4.8 vs. 4.0 target), but Meta Ads has three ad sets with frequency > 4.5 showing declining CTR — creative refresh required. Total estimated wasted spend this month is $1,240, concentrated in two non-converting Google Display campaigns. --- ## Top Performers | Platform | Campaign | Spend | Conv. | CPA | ROAS | Assessment | |---|---|---|---|---|---|---| | Google | Brand Search — Exact | $2,100 | 87 | $24.14 | 7.2x | Healthy — increase budget 20% | | Meta | Retargeting — 30d Visitors | $890 | 34 | $26.18 | 5.8x | Strong ROAS — expand audience | | Google | Competitor Keywords | $1,450 | 41 | $35.37 | 4.1x | On target — maintain current bid | --- ## Wasted Spend | Campaign | Platform | Issue | Spend | Action | |---|---|---|---|---| | Display Remarketing — Broad | Google | 0 conversions in 14 days | $640 | Pause — reallocate to Brand Search | | Interest Expansion — Cold | Meta | CPA $148 vs. $45 target | $600 | Narrow audience; test lookalike seed | --- ## Budget Allocation Recommendation **Current:** Google 60% / Meta 40% **Recommended:** Google 70% / Meta 30% **Rationale:** Google ROAS is 4.8x vs Meta's 2.9x this period. Shifting $800/month to Google Search and Competitor campaigns is projected to improve blended ROAS from 3.6x to 4.1x.

How It Works

  1. Fetch Google Ads performance data. Call google_ads_reports to pull campaign-level, ad group-level, and keyword-level metrics for the date range. Fetch the comparison period in parallel for MoM calculations.

  2. Fetch Meta Ads performance data. Call meta_ads_insights to pull campaign, ad set, and ad-level metrics including frequency, reach, CPM, CTR, and conversion data.

  3. RAG: business context. Query Client Documents for campaign goals, seasonal patterns, and any promotions running in the period that could explain performance spikes or dips. Query Competitor Research for any competitor activity or positioning shifts that might explain changes in CTR or CPA.

  4. Identify top and bottom performers. Rank campaigns by ROAS (if e-commerce) or CPA (if lead gen) relative to the stated target. Flag anything more than 30% above target CPA or below target ROAS as a concern.

  5. Identify wasted spend. Flag any campaign or ad set with: zero conversions in 7+ days with spend > $200; CPA more than 3x target; CTR below 0.5% on Search; frequency > 5 on Meta.

  6. Check for creative fatigue. On Meta, compare CTR trajectory over the last 14 days per ad creative. A CTR decline > 30% over 14 days with frequency > 3 is flagged as fatigued.

  7. Generate bid strategy and targeting recommendations. Based on performance data and campaign goals, produce specific, data-backed recommendations — not generic advice.

  8. Calculate budget allocation recommendation. Compare blended ROAS and CPA across Google vs. Meta. If variance exceeds 1.5x, recommend reallocation. Include specific dollar amounts and projected impact.


System Prompt

You are an expert paid advertising analyst for a digital marketing agency. Your job is to analyse Google Ads and Meta Ads performance data and produce a structured analysis report with specific, data-backed recommendations. CLIENT CONTEXT: {{CLIENT_CONTEXT}} KNOWLEDGE BASE CONTEXT: {{RAG_CONTEXT}} You have been provided with: - Google Ads performance data (campaigns, ad groups, keywords) for the analysis period - Meta Ads performance data (campaigns, ad sets, ads) for the analysis period - Campaign goals including target CPA/ROAS - Current budget allocation - Prior period data for comparison Your analysis must: 1. Open with a plain-English campaign health summary a non-technical client can understand 2. Identify the top 3 and bottom 3 performers by primary goal metric (ROAS for e-commerce, CPA for lead gen) 3. Quantify wasted spend — be specific about which campaigns, why they're wasted, and the exact dollar amount 4. Flag creative fatigue with data (CTR trend, frequency, days running) 5. Give bid strategy recommendations tied to observed performance data — cite specific numbers 6. Give a budget reallocation recommendation with projected impact 7. Produce a prioritised next steps list (no more than 5 items) Rules: - Every recommendation must cite the specific metric driving it - No generic advice (e.g. "test more ad creatives" is insufficient — name the specific ad set and the fatigue signal) - Flag any anomalies that might be explained by known seasonality or promotions from the client context - If comparison period data is unavailable, note this and proceed with absolute metrics only Output as the AdsAnalystOutput JSON schema followed by a Markdown narrative report suitable for client delivery.

Skills Injected

Skill filePurpose
client-context-file.mdCompany, brand, audience — always injected
ads-benchmarks.mdIndustry-average CTR, CPA, ROAS, and CPM benchmarks by vertical — used to contextualise client performance
kpi-definitions.mdCanonical metric definitions (ROAS, CPA, CTR, frequency, CPM) to ensure consistent interpretation

ads-benchmarks.md — content

# Ads Performance Benchmarks by Industry These benchmarks are used to contextualise client performance. Always compare against the client's own historical data first. Use industry benchmarks as a secondary reference when historical data is unavailable or the client is new to paid advertising. ## Google Ads — Average CTR by Industry | Industry | Search CTR | Display CTR | |---|---|---| | Legal | 4.76% | 0.59% | | E-commerce | 2.69% | 0.51% | | Finance | 2.65% | 0.52% | | Health & Medical | 3.27% | 0.59% | | B2B/SaaS | 2.41% | 0.46% | | Home Services | 4.80% | 0.72% | ## Google Ads — Average CPA by Industry | Industry | Avg CPA (Search) | |---|---| | E-commerce | $45.27 | | Legal | $86.02 | | Finance | $81.93 | | B2B/SaaS | $116.13 | | Health & Medical | $78.09 | ## Meta Ads — Average Benchmarks | Metric | Average Across Industries | |---|---| | CTR (Link) | 0.90% | | CPM | $14.90 | | CPC | $1.68 | | Conversion Rate | 9.21% | ## Creative Fatigue Thresholds (Meta) - Frequency > 3.5 within 7 days: monitor - Frequency > 5.0 within 14 days: refresh creative - CTR decline > 30% over 14 days: fatigued regardless of frequency ## ROAS Health Indicators - ROAS < 1.0: Actively losing money — pause immediately - ROAS 1.0–2.0: Below breakeven for most businesses — investigate - ROAS 2.0–4.0: Acceptable depending on margins - ROAS > 4.0: Strong — consider scaling

RAG Usage

DatasetQueryWhen
Client Documents"campaign goals KPIs seasonal promotions [month]"Step 3 — to understand whether performance anomalies are expected (e.g. a sale event causing CPA spike)
Client Documents"target CPA ROAS budget allocation"Step 3 — cross-reference stated goals vs. what was injected in the job input
Competitor Research"competitor ads positioning [industry] [month]"Step 3 — to flag if changes in competitor ad activity might explain shifts in the client’s impression share or CTR
Website ContentNot typically queriedOnly if a landing page issue is suspected (e.g. high ad CTR but low conversion rate)
Published ContentNot typically queriedNot relevant to ads analysis

RAG query strategy: Client Documents is the primary dataset for this agent. Run the goals/seasonal query first — it determines whether an underperforming campaign should be flagged as a problem or noted as an expected outcome of a deliberate decision. Competitor Research is secondary and only queried if the data shows an unexpected shift in impression share or CTR that can’t be explained by internal factors.


Tools Required

ToolMethodPurposeRequired?
rag_searchsearchQuery tenant knowledge baseYes
google_ads_reportsgetCampaignPerformanceFetch campaign, ad group, keyword metrics from Google AdsYes (if Google connected)
google_ads_reportsgetAdGroupPerformanceAd group level breakdownYes (if Google connected)
meta_ads_insightsgetCampaignInsightsFetch campaign, ad set, ad metrics from MetaYes (if Meta connected)
meta_ads_insightsgetAdCreativeInsightsPer-creative CTR trend for fatigue detectionYes (if Meta connected)

HITL Gates

  • Review type: analysis_review
  • Risk level: medium
  • Trigger: Always — ads analysis reports are always reviewed before delivery to the client.
  • Reviewer sees: The full Markdown narrative report and the structured JSON output side by side. Budget reallocation recommendations are highlighted for explicit approval before any changes are applied.
  • Budget changes: Any budget reallocation recommendations are NOT applied automatically. A separate job with type ads_budget_update must be explicitly approved and dispatched.

Guardrails

RuleEnforcement
Every metric cited must appear in the raw dataPost-generation check: all numeric claims in the narrative are validated against the input data
Top/bottom performer lists must contain exactly 3 entries eachCount check; if fewer than 3 campaigns exist, list all available and note the count
Budget recommendation percentages must sum to 100Arithmetic check on recommendedGooglePct + recommendedMetaPct
No recommendations that would increase spend above stated budgetReallocation must stay within totalMonthlyBudget
Creative fatigue flags must include CTR data and days runningStructural validation — flags without these fields are removed

Tenant Settings Used

SettingHow it’s used
industrySelects the correct benchmark row from ads-benchmarks.md for contextualising performance
targetAudienceInforms targeting recommendations — e.g. B2B audiences may suggest LinkedIn over Meta
brandVoiceApplied to the narrative report tone — analysis is data-driven but the write-up mirrors client’s communication style

Cost Profile

Avg input tokens~10,000 (ads data + RAG results + skills)
Avg output tokens~5,000 (JSON output + Markdown narrative)
Est. cost / task~$0.50

Error Handling

ErrorResponse
Google Ads API returns no dataProceed with Meta-only analysis; flag “Google Ads data unavailable — check integration” in report
Meta Ads API returns no dataProceed with Google-only analysis; flag “Meta Ads data unavailable — check integration” in report
Both APIs unavailableFail job; create escalation record: “Ads analysis cannot proceed — no platform data available”
No conversions tracked on either platformProceed with reach/click/CTR analysis only; note “No conversion data — verify conversion tracking setup” as critical action item
Comparison period data unavailableProceed with absolute metrics; note MoM comparisons are not available for this period
ROAS or CPA cannot be calculated (missing revenue/conversion data)Use CTR and spend efficiency as proxy metrics; flag that ROAS/CPA are unavailable

© 2026 Leadmetrics — Internal use only