August 8, 2026 · 8 min read
Playbooks

Optimizing on profit instead of ROAS: what it takes to feed COGS into your ad decisions

TL;DR

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 seesWhat it can't see
Revenue attributed at click timeCost of goods on what sold
A conversion event firedThe refund three weeks later
Order value before adjustmentsDiscount codes, shipping subsidy, payment fees
Its own share of the conversionWhether another channel actually drove it
None of this is the platform behaving badly — it genuinely does not have your margin data. It optimizes the only number it holds.

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

  1. 1Cost of goods per product, from your store or ERP — the single input most teams are missing.
  2. 2Real settled revenue, after refunds, returns and discounts, not the conversion value the platform recorded.
  3. 3A join key between ad spend and orders — usually order-level data with campaign attribution attached.
  4. 4Somewhere to compute it — a warehouse where ad cost and order data can sit together, most commonly BigQuery.
  5. 5A decision that consumes it — a report someone reads, or an agent that proposes budget changes ranked by profit rather than ROAS.
Steps 1-4 are a data problem, not an AI problem. No agent can infer your margins; it can only use them once they exist somewhere it can read.

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.
Run your ad ops with an agent you can trust

Start free — 2,500 credits a month, no credit card. Every write waits for your approval.

Keep reading