Optimizing on profit instead of ROAS: what it takes to feed COGS into your ad decisions
Every ad platform optimizes toward revenue it can attribute at click time, which means it will confidently scale a campaign selling your worst-margin product. Optimizing on profit needs three things the platform doesn't have: your cost of goods, your real returns, and a way to get them back into the decision. Here's what that actually takes.
Why platform ROAS misleads
| What the platform sees | What it can't see |
|---|---|
| Revenue attributed at click time | Cost of goods on what sold |
| A conversion event fired | The refund three weeks later |
| Order value before adjustments | Discount codes, shipping subsidy, payment fees |
| Its own share of the conversion | Whether another channel actually drove it |
The concrete failure this causes
Two campaigns both return 4x ROAS. One sells a product at 60% margin; the other sells a loss-leader at 15% margin with a high return rate. The platform sees identical performance and will happily push budget toward whichever converts more cheaply. On revenue they're equal; on profit one is funding the business and the other is consuming it.
This is not an edge case — it's the default state of any account with meaningfully varied margin across its catalogue.
What you need to close the loop
- 1Cost of goods per product, from your store or ERP — the single input most teams are missing.
- 2Real settled revenue, after refunds, returns and discounts, not the conversion value the platform recorded.
- 3A join key between ad spend and orders — usually order-level data with campaign attribution attached.
- 4Somewhere to compute it — a warehouse where ad cost and order data can sit together, most commonly BigQuery.
- 5A decision that consumes it — a report someone reads, or an agent that proposes budget changes ranked by profit rather than ROAS.
The pragmatic middle path
Full profit attribution is a real project. A cheaper version captures most of the value: group products into a few margin tiers rather than costing every SKU, and evaluate campaigns by which tier they actually sell. That alone surfaces the loss-leader-scaling problem, and it can be built in an afternoon rather than a quarter.
Start there, and only invest in per-SKU costing once the tiered view proves the gap is worth closing precisely.
Where an agent helps
Once the data exists, the recurring work is the join and the ranking — pulling ad cost across platforms, joining it to settled revenue and COGS, and ranking campaigns by contribution rather than ROAS. That's a query an agent can write and re-run on a schedule, delivered as a self-refreshing dashboard so the profit view is current when a budget decision comes up rather than reconstructed after it.
For the underlying pattern, see true ROAS from your own data; for store-side revenue specifically, the Shopify skills cover connecting order data to ad performance.
Frequently asked questions
- Why is platform ROAS misleading?
- It measures revenue attributed at click time, before cost of goods, refunds, returns, discounts and fees. Two campaigns showing identical ROAS can have completely different profit contribution if they sell products at different margins.
- How do I optimize ad campaigns on profit instead of revenue?
- You need cost of goods per product, settled revenue after refunds and discounts, a join key between spend and orders, a warehouse to compute in, and a decision process that consumes the result. The first four are data work, not AI work.
- Can I feed COGS data into Google Ads directly?
- You can supply adjusted conversion values, which helps, but it still runs through the platform's own attribution. Computing profit in your own warehouse gives you a number you control and can reconcile across platforms rather than one per platform.
- Is per-SKU margin data required to start?
- No — grouping products into a few margin tiers captures most of the value and can be done quickly. That's usually enough to reveal whether a campaign is scaling a loss leader, which is the expensive problem.
- Can an AI agent optimize for net profit?
- It can do the recurring join and ranking once the margin and settled-revenue data exist somewhere it can read — pulling cross-platform spend, joining to real revenue, and ranking campaigns by contribution. It cannot infer margins you haven't recorded.