Guide
How to get cost of goods into your Google Ads profit numbers
There are two routes. Inside Google, you add cart data to your purchase conversion tag and the cost_of_goods_sold attribute to your Merchant Center feed, and Google Ads then reports cost of goods sold (COGS) and gross profit per product. Outside Google, you join Google’s spend per item ID to the cost per item stored in Shopify, in a spreadsheet or a tool such as Opteno, and subtract Shopify refunds along the way.
Last checked · More guides
Two routes, and what each one gives you
Google Ads can only report profit if it knows what each product costs you. Route 1 gives Google that information directly: cart data says which items were sold, and cost_of_goods_sold says what each one cost. Route 2 does the arithmetic outside Google, using Shopify’s costs and orders.
- COGS is what one unit costs you. Shopify calls it cost per item, and Google’s feed attribute for it is cost_of_goods_sold.
- Gross profit is revenue − COGS. Google states it as “profit = revenue - COGS”.
- Net profit, as this guide and Opteno use it, is revenue − COGS − ad spend. It leaves out shipping, payment fees and other overheads.
- POAS is (revenue − COGS) ÷ ad spend, and break-even is 1.00×.
Route 1: cart data and cost_of_goods_sold inside Google Ads
This route adds COGS, gross profit and gross profit margin to Google Ads’ Conversions columns at campaign, ad group and product level. It takes one change to your tag and one to your feed.
Step 1: Check the prerequisites
Google lists “the ability to edit website or app code” and linked Google Ads and Merchant Center accounts. The purchase has to be a biddable conversion set to Primary. It can come through the Google tag or Tag Manager, or be imported from Analytics, Firebase or Search Ads 360.
Step 2: Add cart data to the purchase tag
Every line in the items array needs an id (item_id when the conversion is imported from Google Analytics or Firebase), a price and a quantity. Google defines price as the “sales price of a single item, excluding tax, shipping, and any transaction level discounts”. The discount, aw_merchant_id, aw_feed_country, aw_feed_language and currency fields are optional.
Step 3: Match item IDs exactly
Google’s rule: “Item IDs passed in the items array of your conversion tag must exactly match the id attribute in your Merchant Center feed.” You can download the flagged item IDs from the diagnostics section for your conversion action.
Step 4: Add cost_of_goods_sold to the feed
The attribute is optional for each product. Its value is a number plus an ISO 4217 currency code, such as 10.01 USD. Send it in the main feed, in a supplemental feed or through the Merchant API, and use the conversion’s currency where you can.
Step 5: Estimate if you have to
Google’s own example: “you can estimate your COGS as 80% percent of the product price.” Merchant Center says the value “does not need to be exact”, and recommends an average where a product’s cost varies.
Step 6: Test, then read the columns
After Google’s test step, you get orders, revenue, COGS, gross profit and gross profit margin, plus Report Editor templates for items advertised, sold and cross-sold.
Google’s own example: an item with no cost is left out
A shopper clicks an ad for a $10 hat and buys it along with a $20 shirt. The hat has a COGS of $3 and the shirt has no COGS value. Google reports a gross profit of $7 ($10 − $3), so the shirt is simply left out of the figure.
Route 2: join Google’s spend to Shopify’s cost per item
This route needs no tag or feed change. Shopify already holds the cost of each variant, and Google already reports spend per item ID, so the work is joining the two.
Step 1: Fill in cost per item on every variant
Shopify says: “If your product has variants, then you need to edit each variant to add the cost per item.” The field does not change on its own, so update it whenever a supplier price changes.
Step 2: Get spend per product
In Google Ads, the Products page (under Campaigns) shows cost per product for Standard Shopping and Performance Max at account level. Use a date range that ends yesterday, and use the same range in Shopify.
Step 3: Map item IDs to variants
Use your feed’s id mapping. Keep any spend you can’t match on its own unattributed line instead of spreading it across products.
Step 4: Take revenue from Shopify
For each variant, take gross sales, discounts, refunds (Shopify calls them sales reversals) and units sold. Revenue = gross sales − discounts − refunds, which is Shopify’s net sales and already excludes tax and shipping.
Step 5: Compute
COGS = units × cost per item. Gross profit = revenue − COGS. Net profit = gross profit − ad spend. POAS = gross profit ÷ ad spend.
Step 6: Convert currency day by day
If your ad account and store use different currencies, convert each day’s spend at that day’s rate, then add the days up.
Worked example (illustrative figures)
Take one variant over 30 days: 60 units sold at $50, with no discounts, is $3,000 of gross sales. $200 is refunded, so revenue is $2,800. At $20 cost per item, COGS is $1,200 (this assumes refunded stock is not resold). With $900 of ad spend, gross profit is $1,600 and net profit is $700. ROAS (revenue ÷ ad spend, $2,800 ÷ $900) is 3.11×, and POAS (gross profit ÷ ad spend, $1,600 ÷ $900) is 1.78×, which is above break-even.
The two routes side by side
Pick Route 1 for profit inside Google Ads if you can change your conversion code. Pick Route 2 for Shopify’s real costs and refunds without touching your site.
Setup
Route 1: cart data in the purchase tag, a linked Merchant Center account and cost_of_goods_sold in the feed. Route 2: cost per item in Shopify plus a repeated export and join. In Opteno, that is two OAuth sign-ins, with no script and no pixel.
Where the numbers live
Route 1: in Google Ads columns and the Report Editor. Route 2: in your spreadsheet, or in Opteno as one row per product with variant, country and market breakdowns.
When a cost is missing
Route 1: the item is left out of gross profit. Opteno: the figure is marked as unavailable and the variant is named.
Refunds
Route 1: Google’s help doesn’t say whether refunds reduce cart data gross profit. Its general method for returned purchases is a conversion adjustment (restate or retract), which needs the transaction ID sent with the conversion. Route 2: refunds are subtracted from Shopify revenue.
Currencies
Route 1: Google recommends giving COGS in the conversion’s currency. Opteno: store and ad account currencies can differ. Spend is converted at each day’s rate, and a day with no usable rate is shown as not computable.
Product exclusions
Route 1 or a spreadsheet: you edit listing groups or product groups yourself. Opteno plans offer exclusions in Performance Max asset groups, checks them with Google in a dry run and applies them only after a person approves. It never changes budgets or bids.
What Opteno does
Opteno does Route 2 for you on every sync, with no tag involved.
- Setup is two OAuth flows, one for Shopify and one for Google Ads. There is no storefront script, no pixel and no change to how your ads run.
- Opteno joins Shopify orders, refunds and cost per item to Google’s daily spend, using the product offer identifier that Google reports spend against.
- Cost of goods comes from each sold variant’s cost per item, or from a store-wide cost percentage if you set one.
- If a sold variant has no cost, the figure is marked as unavailable and the variant is named, rather than shown as zero.
- Revenue = gross sales − refunds. POAS = (revenue − cost of goods) ÷ ad spend. Net profit = revenue − cost of goods − ad spend.
- Figures cover rolling 7, 14, 30 and 60-day windows ending yesterday, and unattributed spend is reported separately.
When Google’s route fits better
Use cart data if you want profit inside Google Ads, cross-sell reports or sold-product data for Search campaigns. Opteno does not compute halo attribution, and it covers Google Shopping and Performance Max only, not Meta. The two routes don’t conflict, so you can run both.
Pricing is per store per month, in US dollars: $14.99 for one store, $11.99 each for two, and $9.99 each for three or more. The 7-day free trial needs a card to start.
Questions people ask
Can Google Ads report profit instead of revenue?
Yes, as gross profit, once you send cart data and add cost_of_goods_sold to your feed. Google calculates profit = revenue − COGS, which does not include ad spend. To see profit after advertising, subtract spend yourself, or divide gross profit by spend to get POAS.
Is an estimated COGS, such as 80% of price, good enough?
Google allows estimates, and Merchant Center says the value doesn’t need to be exact. But one percentage gives every product the same margin, so gross profit just ranks products by revenue. In the worked example, the real cost gives a POAS of 1.78×, while estimating COGS at 80% of the $50 price ($40 a unit, so $2,400 for 60 units) gives (2,800 − 2,400) ÷ 900 = 0.44×, the opposite verdict. (Illustrative figures from the worked example.)
Why is my Google Ads gross profit lower than I expected?
Two documented causes are items without a cost_of_goods_sold value, which Google leaves out, and item IDs in the tag that don’t exactly match the feed id. Only items from a linked Merchant Center account count. The conversion action’s diagnostics list the flagged IDs.
Do refunds come off Google’s gross profit?
Google’s cart data help doesn’t say. Its general way to reflect a returned purchase is a conversion adjustment: you restate the conversion’s value or retract the conversion, identified by the transaction (order) ID sent with it. Adjustments made within 7 days of the conversion being first recorded are used by automated bidding, and adjustments can be made within 54 days overall. Google does not document whether a restatement changes the COGS or gross profit columns.
Where do I enter cost of goods in Shopify?
You enter it on each variant: in the Price section, click Cost per item and type the cost. If you resell a product, Shopify suggests entering the price you paid the manufacturer, excluding taxes, shipping and other costs.
See which products are losing you money
Connect Shopify and Google Ads in under five minutes. From $14.99 a month, cancel whenever you want, and no change to your store or your campaigns without your approval.