To get blended ROAS by campaign, give every ad account's pipeline the same rules, ending in a Group by rule on date and campaign_name, and send them all to one PostgreSQL table. The group rule sums cost, clicks, impressions, conversions and conversion_value for each day and campaign, then works out ctr, cpc, cpm, cpa and roas again from those totals. In the table, compute ROAS for any period or any mix of platforms as summed conversion_value divided by summed cost. Never average a column of ROAS values. cost stays in each account's own currency unless an fx rule converts it.
Why the ratio has to come from totals
ROAS is conversion value per unit of ad spend. Google's help page on Target ROAS bidding treats it as the Conv. value/cost figure, written as a percentage when multiplied by 100: five units of sales for each unit spent is 500%.
The trap is to average ratios that were already worked out per row. Say campaign A spent 1,000 and earned 4,000 in value (ROAS 4), and campaign B spent 10 and earned 100 (ROAS 10). The plain average of the two ratios is 7. The real blended figure is 4,100 divided by 1,010, about 4.06. Summing the numerator and the denominator first, then dividing once, avoids this at every level: day to week, campaign to platform, platform to total.
etlmcp follows that rule itself. The rows it stores carry ctr, cpc, cpm and cpa computed per row, and no roas column. A group rule does not average those ratios: it throws them away and computes new ones from the summed metrics. It writes roas only when the group's cost is above zero and its conversion_value is present, so a zero-spend group gets no ROAS rather than a division error. See the Group by rule for every column it keeps and drops.
Step 1: one rule list for every pipeline
A pipeline reads one source, such as one ad account, and its rules run on that source's rows alone. A group rule therefore rolls up within one account. Blending across accounts and platforms happens in the destination, where several pipelines can write to the same table.
Use the same rule list on each pipeline, so that every pipeline writes the same columns:
[
{"op": "group", "by": ["date", "network", "campaign_name", "currency"]},
{"op": "select", "fields": ["date", "network", "campaign_name", "currency",
"impressions", "clicks", "cost", "conversions", "conversion_value",
"ctr", "cpc", "cpm", "cpa", "roas"]}
]
Two choices in it matter:
- What goes in
by. A group's output keeps only thebycolumns, the summed metrics, the recomputed ratios and summed platform extras.networkandcurrencydisappear unless you list them. Within one pipeline each is a single value, so adding them does not split any group, and you need both later in SQL. - The
selectafter it. A group dropsroasfrom a row whose cost is zero, and each platform brings its own extras. Theselectmakes every pipeline deliver exactly the same column list, with an emptyroaswhere there was nothing to divide. Matching lists give the shared table one shape, whichever pipeline happens to create it, so no later load meets a table that is missing one of its columns.
Step 2: decide on currency before you group
etlmcp never converts money by itself. Each row's cost and conversion_value are in the currency of the account they came from: the account currency on a Google Ads row, for example, and the account currency on a Meta row, where conversion_value is the value of Meta's grouped purchase action. If your accounts report in more than one currency, a sum of cost across them in SQL adds unlike numbers.
You have two options:
- Keep native currencies and always group by
currencyin SQL, as in the queries below. Each currency gets its own blended figure. - Convert in the pipeline with an
fxrule placed before the group rule, one forcostand one forconversion_value, with rates you supply:
[
{"op": "fx", "field": "cost", "to": "USD", "rates": {"EUR": 1.05}},
{"op": "fx", "field": "conversion_value", "to": "USD", "rates": {"EUR": 1.05}},
{"op": "group", "by": ["date", "network", "campaign_name", "currency"]}
]
The rates here are made up: use your own. An fx rule converts only the column it names, plus cpc, cpm and cpa when that column is cost, which is why revenue needs its own rule. Put it first: once a group without currency in by has run, the rows no longer say what currency they are in, and etlmcp refuses an fx rule with rates after it when you save. The fx rule page covers the rate format and its errors.
Step 3: blend in SQL
Point each pipeline at the same PostgreSQL destination and table, here public.ad_campaigns_daily. Each run deletes and rewrites only its own pipeline's rows for the dates it covers, marked in the _etlmcp_pipeline_id column, so pipelines sharing the table do not overwrite each other. How PostgreSQL rows are replaced explains the mechanism.
Blended ROAS by campaign for one month, all platforms together:
SELECT campaign_name,
currency,
SUM(cost) AS cost,
SUM(conversion_value) AS conversion_value,
SUM(conversion_value) / NULLIF(SUM(cost), 0) AS blended_roas
FROM public.ad_campaigns_daily
WHERE date BETWEEN DATE '2026-11-01' AND DATE '2026-11-30'
GROUP BY campaign_name, currency
ORDER BY cost DESC;
The same campaigns split by platform, so you can see which one carries the blend:
SELECT campaign_name,
network,
currency,
SUM(cost) AS cost,
SUM(conversion_value) / NULLIF(SUM(cost), 0) AS roas
FROM public.ad_campaigns_daily
WHERE date BETWEEN DATE '2026-11-01' AND DATE '2026-11-30'
GROUP BY campaign_name, network, currency
ORDER BY campaign_name, cost DESC;
NULLIF returns an empty result for a campaign with no spend instead of failing the query. The stored roas column is right for its own day and campaign, but an AVG(roas) over it repeats the averaging mistake above, so leave it out of anything wider than one row.
What "blended" can and cannot tell you
A campaign only blends with itself when its name is identical on every platform: campaign_name is matched as exact text. Name campaigns the same way everywhere, or map names to a shared label in SQL before you group.
The numerator is each platform's own claim. Every platform credits conversions under its own attribution rules, and the same order can be counted by more than one of them, so a blended platform ROAS can overstate sales. For the business-level view, compare it with store revenue over total spend, as described in MER vs platform ROAS. If you report from Data Studio (formerly Looker Studio), now branded Data Studio, run these queries as a view in the database rather than as a blend; blending in Looker Studio explains why.