Track blended ROAS from your Shopify revenue and Meta and Google Ads spend

Every Monday: last week's Shopify revenue divided by your total Meta and Google Ads spend, the blended ROAS no ad dashboard shows you.

Runs
Mondays at 8:00
Posts
Stat tile

From your apps to your board

How the skill works: your agent reads total last week's revenue from Shopify; meta ads spend from Meta Ads; google ads spend from Google Ads; store domain, google ads customer id, meta ad account id from What you tell it, mondays at 8:00, and gives you blended roas (mer) and the report in the chat.

Reads

  • ShopifyTotal last week's revenue
  • Meta AdsMeta Ads spend
  • Google AdsGoogle Ads spend
  • What you tell itStore domain, Google Ads customer ID, Meta ad account ID
reads
Your agentClaude Code, Codex, Cursor or GeminiMondays at 8:00
posts

You get

  • Blended ROAS (MER)A stat tile on your board, with its trend
  • The report in the chatEvery run, with or without Briefkin

What you get

  • Blended ROAS last week and an 8-week trend.
  • Shopify revenue and total ad spend, each with the change on the week before.
  • By platform: spend, the ROAS the platform reports, and the revenue it claims.
  • One line on what moved it, for example "Revenue +9% on 3% less spend".

The card on the right is a sample. Yours shows your own numbers and updates in place every run.

What lands on your board

Acme StoreBlended ROAS (MER)3.4x+13% vs previous period, bettervs last report
Shopify revenue$142.8k+9.0% vs previous period, better
Ad spend$42.0k-3.0% vs previous period, better
Meta reports 2.9xGoogle reports 4.1x
An example with made-up numbers. Your agent posts your real ones.

What it does

Meta says its ROAS is 2.9 and Google says 4.1, and both are claiming some of the same orders. Store owners and ecommerce marketers who spend on both end up with two flattering numbers and no answer to the plain question: for every dollar on ads, how much came into the store?

Blended ROAS (also called MER) answers it with real revenue over real spend. Every Monday the agent sums last week's Shopify orders, adds up the spend from both ad accounts, and posts the ratio with the platforms' own figures beside it, so you can see how much credit they are double counting.

How it works

  1. 1Total last week's revenue

    Page through the Admin GraphQL orders query with query: "created_at:>=2026-10-05 created_at:<2026-10-12 test:false" (last week's dates) and first: 250. Skip orders with a cancelledAt, and sum currentTotalPriceSet.shopMoney.amount minus currentTotalTaxSet.shopMoney.amount, so refunds and edits are already taken off.

  2. 2Get Google Ads spend

    Run SELECT metrics.cost_micros, metrics.conversions_value FROM customer WHERE segments.date BETWEEN '2026-10-05' AND '2026-10-11' for each account through search (or the Google Ads MCP server's search tool). Divide cost_micros by 1,000,000.

  3. 3Get Meta Ads spend

    Call GET /act_<AD_ACCOUNT_ID>/insights on the Marketing API with fields=spend,purchase_roas, level=account and a time_range of the same seven days, or run meta ads insights get with Meta's Ads CLI. Use the account's currency and convert if it differs from the shop's.

  4. 4

    4Work out blended ROAS

    Blended ROAS is Shopify revenue divided by Google plus Meta spend. Save it weekly to a JSON file (backfill 8 weeks on the first run), and put each platform's own ROAS and attributed revenue next to it, so the overlap is visible.

  5. Post it to the board

    With BRIEFKIN_TOKEN set, the agent sends the result as one card that updates in place every run. Without it, you get the report in the chat.

Install and run it

Pick your agent, where the data comes from and how to schedule it; the commands below follow.

Agent
Data
Schedule
  1. Install the skill

    One command. It puts the SKILL.md in ~/.claude/skills and in ~/.agents/skills, which Codex, Cursor, Gemini CLI, Copilot CLI and OpenCode read too.

    shellcurl -fsSL https://briefkin.dev/skills/shopify-blended-roas/install | sh
  2. Run it

    Ask Claude Code:

    promptRun the shopify-blended-roas skill

    Or paste the prompt instead of installing:

    promptFor last week (Monday to Sunday), sum my Shopify revenue from the Admin GraphQL API (orders created in the week, not cancelled or test, currentTotalPriceSet minus currentTotalTaxSet). Get total spend and conversion value from Google Ads (GAQL on the customer resource) and spend and purchase_roas from the Meta Marketing API insights at account level for the same dates. Give me blended ROAS (Shopify revenue divided by total spend), each platform's spend and own ROAS, and the change from the week before. End with one line on what moved the number.
  3. Put it on a schedule

    Mondays at 8:00, from cron on any machine where Claude Code is signed in:

    crontab0 8 * * 1 claude -p "Run the shopify-blended-roas skill"

    Add it with crontab -e. A laptop asleep at that time runs it when it wakes if you use launchd or Task Scheduler instead; GitHub Actions works for the API route.

  4. Send it to your board

    Connect Briefkin once with curl -fsSL https://briefkin.dev/install | sh and every run lands on your board as a stat tile. How setup works

View the SKILL.mdRaw file
SKILL.md---
name: shopify-blended-roas
description: "Every Monday: last week's Shopify revenue divided by your total Meta and Google Ads spend, the blended ROAS no ad dashboard shows you. Use when the user asks for this, or when it runs on a schedule."
---

# Shopify blended ROAS across Meta and Google Ads

Every Monday: last week's Shopify revenue divided by your total Meta and Google Ads spend, the blended ROAS no ad dashboard shows you.

Meta says its ROAS is 2.9 and Google says 4.1, and both are claiming some of the same orders. Store owners and ecommerce marketers who spend on both end up with two flattering numbers and no answer to the plain question: for every dollar on ads, how much came into the store?

Blended ROAS (also called MER) answers it with real revenue over real spend. Every Monday the agent sums last week's Shopify orders, adds up the spend from both ad accounts, and posts the ratio with the platforms' own figures beside it, so you can see how much credit they are double counting.

## Two ways to get the data

Use the API or MCP route when you have an MCP server, a CLI or an API token for the app. Otherwise, if you can drive a browser the user is signed in to (Claude in Chrome, a Playwright or Chrome DevTools MCP server), use the browser route. Say which one you used.

## Route A: API or MCP server

### What you need

- Shopify Admin API access with `read_orders`, through a custom app token in `SHOPIFY_ACCESS_TOKEN` or a Shopify connector.
- Read access to both ad accounts: the official Google Ads MCP server (read only) or the Google Ads API with OAuth, and `ads_read` on the Meta ad account through a Marketing API token or Meta's Ads CLI.

If something is missing, say what and stop; do not invent numbers.

### Steps

1. **Total last week's revenue** (Shopify): Page through the Admin GraphQL `orders` query with `query: "created_at:>=2026-10-05 created_at:<2026-10-12 test:false"` (last week's dates) and `first: 250`. Skip orders with a `cancelledAt`, and sum `currentTotalPriceSet.shopMoney.amount` minus `currentTotalTaxSet.shopMoney.amount`, so refunds and edits are already taken off.
2. **Get Google Ads spend** (Google Ads): Run `SELECT metrics.cost_micros, metrics.conversions_value FROM customer WHERE segments.date BETWEEN '2026-10-05' AND '2026-10-11'` for each account through `search` (or the Google Ads MCP server's `search` tool). Divide `cost_micros` by 1,000,000.
3. **Get Meta Ads spend** (Meta Ads): Call `GET /act_<AD_ACCOUNT_ID>/insights` on the Marketing API with `fields=spend,purchase_roas`, `level=account` and a `time_range` of the same seven days, or run `meta ads insights get` with Meta's Ads CLI. Use the account's currency and convert if it differs from the shop's.
4. **Work out blended ROAS**: Blended ROAS is Shopify revenue divided by Google plus Meta spend. Save it weekly to a JSON file (backfill 8 weeks on the first run), and put each platform's own ROAS and attributed revenue next to it, so the overlap is visible.

## Route B: the browser

### What you need

- Signed in to Shopify as the owner or a staff member with Analytics and Reports permissions, to Google Ads with at least Read only access on the accounts, and to a Meta account with Analyst access or higher on the ad account.

If something is missing, say what and stop; do not invent numbers.

### Steps

Start at https://admin.shopify.com/. The user is signed in already; never type passwords or codes, and ask if a sign-in page appears.

1. **Read last week's Shopify revenue**: admin.shopify.com lists your stores; open the store, then **Analytics > Reports** and the **Sales over time** report. Set the date to last Monday to Sunday with **Compare to: Previous period**. Revenue for the card is **Total sales** minus **Taxes** (that is after returns and discounts, with shipping in), both columns in the report's totals row.
2. **Read Google Ads spend**: Open https://ads.google.com/ and the **Campaigns** overview for each account (or the manager account to see all). Set the date range to the same seven days with "Compare" on, and read **Cost**, **Conv. value** and **Conv. value / cost** from the totals row.
3. **Read Meta Ads spend**: Open https://adsmanager.facebook.com/, pick the ad account, set the date to the same week and read **Amount spent** and **Purchase ROAS** from the account totals row at the bottom of the Campaigns tab (add the Purchase ROAS column through **Columns** if it is not shown).
4. **Work out blended ROAS**: Blended ROAS is the Shopify revenue divided by Google plus Meta spend, after converting currencies if the ad accounts bill in another one. Put each platform's own ROAS and claimed revenue next to it, keep the week's numbers in a file for the 8-week trend, and write one line on what moved the ratio.

Note: Three apps, three date pickers: the usual mistake is one of them still on a default range, so read the range back before using a number. Meta reports in the ad account's time zone and Shopify in the store's, so a day can sit on either side of midnight; the gap is small over a week. Google Ads conversion values can keep updating for a few days after the week ends.

## The report

- **Blended ROAS** last week and an 8-week trend.
- **Shopify revenue** and **total ad spend**, each with the change on the week before.
- **By platform**: spend, the ROAS the platform reports, and the revenue it claims.
- One line on what moved it, for example "Revenue +9% on 3% less spend".

## Post it to Briefkin

When `BRIEFKIN_TOKEN` is set, or `~/.config/briefkin/env` exists (the installer from https://briefkin.dev/docs writes it), also send the result to the user's Briefkin board as one card. Keep the `item_key` the same on every run so the card updates in place, use a new `event_id` per run, and put today's real numbers in place of the example ones. If the request fails, say so once and carry on.

```bash
[ -n "${BRIEFKIN_TOKEN:-}" ] || . ~/.config/briefkin/env
curl -sS -X POST "${BRIEFKIN_URL:-https://briefkin.dev}/v1/events" \
  -H "authorization: Bearer $BRIEFKIN_TOKEN" \
  -H "content-type: application/json" \
  -d @- <<'JSON'
{
  "v": 1,
  "event_id": "shopify-blended-roas/<date of this run, e.g. 2026-10-16>",
  "item_key": "shopify-blended-roas",
  "project": "Acme Store",
  "source": "Shopify blended ROAS across Meta and Google Ads skill",
  "kind": "metric",
  "title": "Blended ROAS 3.4x last week",
  "metric": {
    "label": "Blended ROAS (MER)",
    "value": 3.4,
    "unit": "x",
    "better": "higher",
    "period_start": "<start of the period, ISO 8601>",
    "period_end": "<end of the period, ISO 8601>"
  },
  "glance": [
    {
      "type": "Grid",
      "props": {
        "columns": 2
      },
      "children": [
        {
          "type": "Stat",
          "props": {
            "label": "Shopify revenue",
            "value": "$142.8k",
            "delta": 9
          }
        },
        {
          "type": "Stat",
          "props": {
            "label": "Ad spend",
            "value": "$42.0k",
            "delta": -3
          }
        }
      ]
    },
    {
      "type": "Badges",
      "props": {
        "items": [
          {
            "label": "Meta reports 2.9x"
          },
          {
            "label": "Google reports 4.1x"
          }
        ]
      }
    }
  ],
  "widget": [
    {
      "type": "Table",
      "props": {
        "columns": [
          "Source",
          "Spend",
          "Platform ROAS",
          "Revenue claimed"
        ],
        "align": [
          "left",
          "right",
          "right",
          "right"
        ],
        "rows": [
          [
            "Meta Ads",
            "$26,400",
            "2.9x",
            "$76,560"
          ],
          [
            "Google Ads",
            "$15,600",
            "4.1x",
            "$63,960"
          ],
          [
            "Both, blended",
            "$42,000",
            "3.4x",
            "$142,800 in Shopify"
          ]
        ]
      }
    },
    {
      "type": "Callout",
      "props": {
        "text": "Meta and Google together claim $140,520 of the $142,800 the store took, so their numbers overlap. Blended ROAS rose from 3.0x because revenue grew 9% on 3% less spend.",
        "tone": "info"
      }
    }
  ],
  "size": "md"
}
JSON
```

Widgets come from the Briefkin catalog (https://briefkin.dev/v1/catalog). Without a token, just give the user the report.

Set `period_start` and `period_end` to the window the number covers: the tile names it from them ("Last 7 days", "Today", "This month"). For a count right now (open items, a balance), send `"period_label": ""` so no period shows; for another name, send it as `period_label` (at most 24 characters).

## Run it on a schedule

Suggested: Mondays at 8:00 (`0 8 * * 1`). From cron, with the agent signed in on that machine:

```bash
0 8 * * 1 claude -p "Run the shopify-blended-roas skill"
# Codex: codex exec, Gemini CLI: gemini -p, Copilot CLI: copilot -p, OpenCode: opencode run
```

Or use the agent's own scheduler (Claude Code routines, Codex automations, Claude or ChatGPT scheduled tasks): https://briefkin.dev/skills/shopify-blended-roas#schedule

Source: https://briefkin.dev/skills/shopify-blended-roas

What your agent needs

  • Shopify Admin API access with read_orders, through a custom app token in SHOPIFY_ACCESS_TOKEN or a Shopify connector.

  • Read access to both ad accounts: the official Google Ads MCP server (read only) or the Google Ads API with OAuth, and ads_read on the Meta ad account through a Marketing API token or Meta's Ads CLI.

Connecting Shopify

  1. Shopify AI Toolkit. Shopify's plugins for Claude Code, Codex and Cursor run store tasks through Shopify CLI's authenticated store context. Its Dev MCP server (npx -y @shopify/dev-mcp@latest) covers docs and API schemas, not your store's orders; for store data, community MCP servers exist.
  2. Admin API with an app token. Create an app for the store, install it with read scopes such as read_orders, read_products and read_inventory, and store SHOPIFY_STORE_DOMAIN (acme.myshopify.com) and SHOPIFY_ACCESS_TOKEN. Requests go to https://acme.myshopify.com/admin/api/2026-10/graphql.json with the X-Shopify-Access-Token header. Orders older than 60 days also need read_all_orders.

Request only read_ scopes when you install the app; Shopify enforces them per token, so the agent can't edit products, refund or cancel orders.

Connecting Meta Ads

  1. Meta Ads MCP server, Meta's official remote server at https://mcp.facebook.com/ads, with tools for reporting, ad and catalog management, datasets and troubleshooting. You sign in through Facebook Login for Business. For Claude Code, Meta documents claude mcp add --transport http --client-id <META_APP_ID> meta-ads https://mcp.facebook.com/ads, using a Meta developer app with the ads MCP use case added; clients that send headers can pass a user access token as a Bearer token instead (get started). Codex and Cursor take the same URL.
  2. Meta Ads CLI. Meta's command-line tool installs with pip install meta-ads, reads the token from ACCESS_TOKEN, and returns insights with meta ads insights get --fields spend,impressions,ctr,cpc, which suits scheduled runs from Claude Code or Codex.
  3. Marketing API with a system user token. In Business Settings, create a system user, give it the ad account with View performance access, and generate a token with the ads_read permission. The skill reads META_ACCESS_TOKEN and META_AD_ACCOUNT_ID (act_1234567890).

The MCP server can create and edit ads when you grant management permissions. For unattended reports, a system user with only ads_read and View performance can't touch a bid, a budget or an ad.

Connecting Google Ads

  1. Google Ads MCP server, Google's open-source, read-only server (google-ads-mcp, source). Run it locally with pipx run --spec git+https://github.com/googleads/google-ads-mcp.git google-ads-mcp, or deploy it to Cloud Run for remote clients. Its tools are list_accessible_customers, search for GAQL and get_resource_metadata (docs).
  2. Google Ads API with OAuth. Enable the Google Ads API in a Google Cloud project, sign in with Application Default Credentials (gcloud auth application-default login with the adwords scope) or an OAuth client, and set GOOGLE_PROJECT_ID. Add GOOGLE_ADS_LOGIN_CUSTOMER_ID when you reach client accounts through a manager account, and write customer IDs without dashes.

The adwords scope can't be narrowed, so sign in as a Google Ads user with Read only access; the MCP server has no write tools either way.

Questions

Why is blended ROAS lower than what Meta and Google report?

Each platform credits itself with any order it touched inside its attribution window, so one order can count in both. Blended ROAS divides the revenue the store actually took by everything you spent, which makes it the number to plan budgets with, and the platform numbers useful for comparing campaigns within one platform.

Which revenue does it count?

Orders created during the week in the shop's currency, after refunds and order edits, without tax, with cancelled and test orders left out. Shipping stays in. If you would rather use net sales without shipping, say so in the prompt and keep it the same every week.

Do I need Briefkin to use the Shopify blended ROAS across Meta and Google Ads skill?

No. The skill runs with your own agent and gives you the report in the chat. With a Briefkin token set, each run also posts it to your board as a stat tile, so you can glance at it instead of asking again.

Which agents can run it?

Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot CLI, OpenCode, Windsurf and Amp all read SKILL.md files. The install command puts it in ~/.claude/skills and ~/.agents/skills, where they look. ChatGPT, the Claude app and Grok take the prompt instead. Pick your agent under "Install and run it" and the commands change to match.

Can it work without an API or MCP server, from my browser?

Yes. Switch the data source to "Your browser" and the steps change to the Shopify, Meta Ads and Google Ads pages themselves: the agent opens admin.shopify.com in a browser you are signed in to and reads the numbers off the page. Claude Code, Codex, Cursor, Claude app and ChatGPT can drive a browser out of the box; Gemini CLI, Copilot CLI and OpenCode need a Playwright or Chrome DevTools MCP server first. It is slower than the API and needs you signed in, so it suits a report you run by hand or from a scheduler on your own computer.

Watch blended roas (mer) on your board, run after run

Skills are free to use with any agent. Briefkin is where their results land: one board for every report, number and question your agents send, with a ping when something needs you.

Free during the open beta. No card.