---
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
