AI Blocks › Build and ship software
Meta and Google comparison code planner
Paste one prompt into a coding AI such as Claude Code. It builds a read-only module that compares your Meta and Google Ads results on matched dates. It checks spend balance, double-counted sales and mixed messages, and scores the channel mix only on what it could check.
Build a read-only Meta and Google Ads comparison in your code. Get a prompt for spend balance, double-counted sales and a channel score.
Free · No account · Made by AI Blocks · Tested · Updated 3 Nov 2026
What you get
What goes in
- Your code project, open in a coding AI
- Google campaign results and Meta ad set results for matched dates and currency
- Your store sales for the same dates (optional)
- Your target blended ROAS and top ad text (optional)
Before you start
- Read-only access to your Meta and Google Ads data, or typed sample rows to start with
- A coding AI that can read and edit your project
What comes out
- analyzeCrossChannel function: One read-only function with typed input and output, in your project's language and style.
- Findings: Balance, double counting, audience overlap, lift tests and mixed messages, each with evidence and a recommendation.
- Blended ROAS: A platform-reported figure and a store-based figure, labelled and kept apart.
- Channel-mix score: Points earned out of points possible, with a grade only when enough was checked.
- Not evaluated list: Each check that lacked data, with the reason, so a missing input never looks like a pass.
- Tests and assumptions: Tests on sample rows and the thresholds you need to review.
See the full layout
Every run hands it back in this order. Your details fill each gap.
Function: analyzeCrossChannel(input) -> DiagnosticOutput Findings: <checkId | severity | evidence | recommendation | impact or "not calculable"> Summary: platforms: meta and google spend, conversions, value, ROAS blendedRoas: platform-reported and store-based storeAttributionRatio: <reported / store sales, if given> channelMixScore: <earned> of <possible>, grade <A-F or not graded> topRecommendations: <up to five> notEvaluated: <check and reason> Thresholds and assumptions to review: <list> Tests: <results, or "not run">
Is it for you?
Use it when
- You are building your own reporting or agent tool and want one function that compares Meta and Google spend and sales.
- Meta and Google add up to more sales than your store shows, and you want a check for that in code.
- A developer needs a clear brief for a cross-channel module, including what to do when data is missing.
Skip it when
- You only want the comparison done on your own numbers, not built into software: use the Meta and Google budget comparison reviewer.
- You are not a developer and have no coding AI set up: use the Google Ads store account auditor or the Meta Ads 30-check account auditor.
- You have no way to read your Meta or Google results yet: set up access first, starting with the Google Ads developer access checker.
- You want a full Google Ads audit module, not a comparison: use the Google Ads audit engine builder.
Fill it in
Add what this task works from, then copy the request.
- A code project and a coding AI, such as Claude Code, that can edit it
- Google campaign results and Meta ad set results for the same dates, currency and time zone
- Your store sales for the same dates (optional)
- Your target blended ROAS (optional)
- Your top ad text from each platform (optional)
Run it
Download the complete instructions and supporting files. Add them to Claude, ChatGPT or Gemini once, then ask for it by name in any chat. Pasting the instructions into a chat works too.
Before and after this skill
Choose the steps you need. Bring your own material when you have it.
Before
Bring the material listed under Fill it in.
After
- Simple code coach
Use it if you have the code change.
Details
What it does
Meta and Google each report their own sales. Add the two together and the total is often higher than what your store really sold, because both claim the same buyer. A developer who builds a Meta and Google comparison tool needs to know exactly which checks to run and how to treat missing data. This prompt briefs your coding AI on one function that takes Meta and Google results, and optionally your store sales, and returns findings. The checks are channel balance, double counting, audience overlap, missing lift tests and mixed messages. Every threshold is a setting you review, not a fact. The score counts only the checks that had data. It shows points earned out of points possible, so a missing input never looks like a pass. The module only reads and recommends. It never changes a budget or an account.
What goes in and out
You give it
- A code project and a coding AI, such as Claude Code, that can edit it
- Google campaign results and Meta ad set results for the same dates, currency and time zone
- Your store sales for the same dates (optional)
- Your target blended ROAS (optional)
- Your top ad text from each platform (optional)
You get
- A prompt that builds one read-only comparison function with typed input and output
- Five checks for balance, double counting, audience overlap, lift tests and mixed messages
- A channel-mix score shown as points earned out of points possible, with a grade only when enough was checked
- A list of every threshold and assumption for you to review
- Tests on sample rows, with no real account used
Use it when
- You are building your own reporting or agent tool and want one function that compares Meta and Google spend and sales.
- Meta and Google add up to more sales than your store shows, and you want a check for that in code.
- A developer needs a clear brief for a cross-channel module, including what to do when data is missing.
- You want tests written for each check before any live account is touched.
More for Build and ship software
- Live audio processing builder
- nf-core sequencing pipeline planner
- Solidity smart contract developer
- Chroma search database builder
Every build and ship software skill
How the task works
- Looks at your project. Finds your language, test setup and any existing fetch code or result type, and reports what is missing.
- Checks inputs match. Stops if the two platforms use different dates, time zones or currencies.
- Runs five checks. Spend balance, double counting against store sales, audience overlap, missing lift tests and mixed messages. A check with no data is listed as not evaluated.
- Works out blended ROAS two ways. Platform-reported and store-based, shown as separate numbers and never mixed.
- Scores what it could check. Gives points earned out of points possible, and a grade only if at least 60 of 100 points were checkable.
- Tests on sample rows. Writes tests for each check, the score edges and the mismatch stop, with no live account.
Full instructions
- Decide where your data comes from. If you have code that fetches Meta and Google results, tell the AI where it is. If not, the prompt builds the function to take typed rows.
- Copy the prompt from the skill and fill in the angle brackets. Paste it into your coding AI with your project open.
- Read what the AI says about your project first. If it lists missing pieces, decide whether to add them or build without them.
- Review the thresholds it lists. Change any that do not suit your store before you trust a finding.
- Run the tests on the sample rows. Run it on a live account only when you decide to, read-only.
- Ask the AI to propose a weekly schedule if you want one, and approve it yourself.
Change the instructions
- Your store sales. Add them for the same dates. Without them the double-count check cannot run.
- Thresholds. The 70 percent spend share and 30 percent gap are starting values. Change them to suit your account size.
- A prior period. Add the period before. The audience overlap check needs it to see a trend.
- Your target ROAS. Give a target worked out from your margin. Without it the ROAS part of the score is skipped.
Words used in this task
- Blended ROAS: Sales divided by ad spend across both platforms together.
- Double counting: Meta and Google both claim the same sale, so their totals add up to more than the store sold.
- Lift test: A test that shows how many sales ads caused, by comparing a group that saw the ads with one that did not.
- Read-only: The code can look at data but cannot change budgets, bids or accounts.
Full instruction file
Meta and Google comparison coding prompt
This is a prompt you paste into a coding AI (Claude Code, Cursor, Codex or similar) that can read and edit your project. It builds one read-only analysis module that puts Meta and Google Ads results next to each other. It recommends. It never changes a budget, a bid or an account.
It is for people building software. If you only want the comparison done on your numbers, use the Meta and Google budget comparison reviewer instead.
This prompt has its own output, a DiagnosticOutput with a notEvaluated list. If the "Before you start" list below mentions MISSING lines or CHECKS MISSED, read them as notEvaluated: name each check that could not run and why.
Before you start
Use the material below to do this job. If facts or tool access are missing, explain what you can finish and what must wait.
What you need (use your own material or the linked skill):
- A codebase (yours): a project's code, in a folder or repo the AI can open.
How to start:
- Look first. Use what they've already attached, pasted or put in their about-me note. In a coding assistant with file access, look in the project too for these by name.
- Check what's missing. Look for a codebase. They can attach files, paste the details, or share a file path your assistant can read. Ask only for missing facts that change the result. If they ask you to start with what they have, complete the parts you can and mark the gaps.
- Do the job. Follow the method with the facts and tools you have. Mark each gap with
MISSING:where it belongs and never invent a fact to fill it. Keep the answer tight: say each point once and merge steps that give the same thing. In CHECKS MISSED, list checks that failed or could not run. If every required check ran and passed, write “none”.
What you need first
Gather first: the project folder, the Meta and Google result rows, store sales for the same dates, and your target ROAS.
- A project with code you can edit, and a coding AI with access to it.
- Meta and Google Ads results the module can read: Google campaign cost, conversions and conversion value; Meta ad set cost, conversions and conversion value. If your project already has code that fetches these, the prompt reuses it. If it does not, the AI builds the module to take typed rows as input, so it still works and can be tested on sample rows. Fetching live data needs read-only access to both ad accounts (for example a Google Ads API developer token and a Meta token that can read ads). Setting those up is a separate job.
- Your store's total sales for the same dates (optional): from Shopify or your shop. It makes the double-count check possible. Without it that check is skipped and said so.
- A target blended ROAS (optional). Without it the ROAS part of the score is skipped.
- The same date range, time zone and currency for both platforms. If they differ, the module stops and says so.
Paste this into your coding AI
Fill in the angle brackets first.
Build a read-only cross-channel analyzer that compares Meta and Google Ads performance and returns budget, attribution-overlap and channel-strategy findings. It must never change a budget, bid or account.
First, look at my project: language, folder layout, how tests run, whether there is already a result type for findings, and whether code already fetches Google Ads or Meta data. Tell me what you found. If something I need is missing, list it and build the part that does not depend on it.
## What to build
Function: analyzeCrossChannel(input) returns DiagnosticOutput. Put it in <the folder where my analysis code lives>. Use my project's language and style.
Input:
- google: campaign rows { name, cost, conversions, conversionValue }
- meta: ad set rows { name, cost, conversions, conversionValue }
- dateRange: one start and end date, one time zone, one currency for everything
- priorPeriod (optional): the same two row sets for the period before, for trends
- storeSales (optional): total store sales for the same dates and currency
- targetBlendedRoas (optional)
- topAdText (optional): the main ad copy of the top-spend Google and Meta ads
- thresholds: configurable, with the starting values below. They are starting assumptions I must review, not facts.
dominantSpendShare = 0.70, doubleCountGap = 0.30, messagingOverlap = 0.30, maxShiftPct = 10
If google and meta use different currencies or date ranges, return one high-severity finding "inputs-do-not-match" and stop.
If the project has no result type yet, use these two:
Finding = { checkId, severity: critical|high|medium|low|info, title, recommendation, evidence, impact?: { amount, currency, basis } }
DiagnosticOutput = { findings, summary, notEvaluated: [{ check, reason }], dateRange, currency }
## Checks
a. Channel balance: if one platform has more than dominantSpendShare of spend and its ROAS is below the blended ROAS, emit "channel-misallocation" (high). Recommend testing a shift of no more than maxShiftPct of spend toward the other channel. State both ROAS figures and the current split. ROAS is an average, not a promise about extra spend, so word it as a test.
b. Double counting: if platform-reported conversion value added together is more than storeSales by doubleCountGap or more, emit "double-counted-conversions" (high). Show reported, actual and the ratio. Use store sales as the source of truth for blended ROAS. If storeSales is missing, add this to notEvaluated. Do not guess.
c. Audience overlap signal: needs priorPeriod. If Meta retargeting CPM fell while Google brand-search impressions rose, emit "audience-overlap" (medium) and call it a signal, not proof. Without priorPeriod or those row types, add it to notEvaluated.
d. Lift tests: if a lift or holdout test is not recorded for a platform (the input says so), emit "no-incrementality-test" (low). If the input does not say, add it to notEvaluated.
e. Mixed messages: compare the main words in the top Google and Meta ad text after removing common words. If less than messagingOverlap of the words match, emit "messaging-inconsistency" (medium). Call it a rough check. Without topAdText, add it to notEvaluated.
Every finding includes evidence numbers and, where it can be worked out from the inputs, a money impact in the account currency with the basis. If it cannot be worked out, say "impact not calculable" instead of guessing.
## Blended ROAS
- Platform-reported blended ROAS = (Meta value + Google value) / (Meta cost + Google cost).
- Store blended ROAS = storeSales / (Meta cost + Google cost), only if storeSales is given.
Report both and label them. Never mix them in one number.
## Channel-mix score (0 to 100)
Points: blended ROAS against target 40, attribution discipline 25, budget balance 20, lift-test discipline 15.
- Score only the parts that could be checked. Show the points earned out of the points possible, for example "52 of 75 possible".
- Missing data is never full marks and never zero. List each skipped part in notEvaluated.
- Grade from the percent earned: A 90 or more, B 80, C 70, D 60, F below 60. These are starting assumptions, and the grade is shown only when at least 60 of the 100 points could be checked.
## Output summary
platforms { meta and google: spend, conversions, conversionValue, roas }, blendedRoas (both kinds), storeAttributionRatio (if storeSales), channelMixScore { earned, possible, grade }, topRecommendations (up to five, ranked by severity then money impact), notEvaluated.
## Failure handling
If one platform has no rows, return one high-severity finding "data-unavailable" for it, skip the checks that need it, and still run the rest. Do not fail the whole run.
## Tests
Write tests with sample rows only, no real accounts:
- each check with a sample that triggers it and a sample that does not
- double counting with storeSales present and absent
- score and grade at the edges, including when a part is skipped
- audience overlap skipped when priorPeriod is missing
- mismatched currency or dates stops the run
## Rules
- Read-only. Do not call any ad API from this module.
- Do not install packages, change config, add a schedule or run against a live account. Ask me first.
- Do not invent numbers. Say what you ran and what you did not.
## When you are done, show me
1. The function signature and the types
2. A sample DiagnosticOutput from the test rows
3. The test results (say if you could not run them)
4. A list of the assumptions and thresholds I need to review
Check the result
- The thresholds are listed for you to review, not hidden in the code.
- Missing data is listed under notEvaluated, and the score shows points earned out of points possible.
- Nothing in the module can change an account.
- The tests pass on sample rows. Run a live account only when you say so, and keep it read-only.
After it works
A weekly run suits this kind of comparison, because you need paired data across enough days to be meaningful. Seven days is a starting assumption of this prompt, not a rule: choose a window that fits how fast your sales show up. Add a schedule only if you want one. Ask the AI to propose it, then approve it.
After this
When you've handed it back, suggest what they could do next in one short question. It's a suggestion: if they're done, that's fine. Offer these, and say they can type their own:
- The Simple code coach. It takes the code change. If they pick one and that skill is added here, carry straight on with what you just made. If not, give the link and say what to bring.