POASAutomation:BuildingMargin-BasedBiddingScripts
ROAS tells Google to maximise revenue. POAS (Profit on Ad Spend) tells Google to maximise profit. The difference sounds subtle. The impact on your P&L is substantial.
This guide covers the technical architecture for implementing profit-based bidding, from injecting COGS (Cost of Goods Sold) into your conversion data, to building custom scripts that adjust bids based on margin, to feed strategies that segment products by profitability.
Why Revenue-Based Bidding Fails
What ROAS Optimises For
Maximum revenue per £1 spent, regardless of whether that revenue is profitable or loss-making at the SKU level.
The Problem
A £100 order with 20% margin generates £20 profit. A £50 order with 60% margin generates £30 profit. ROAS favours the £100 order. Profit favours the £50.
Smart Bidding cannot see margin. It only sees conversion value (usually revenue). So it bids more for high-revenue products, even when those products are low-margin or loss-making after returns.
The Architecture Options
There are three main approaches to profit-based bidding, ranging from simple to sophisticated:
Option 1: Margin-Weighted Conversion Value
Instead of sending revenue as conversion value, send contribution profit. This is the simplest approach but requires backend development.
Standard: conversionValue = orderTotal (£100)
Margin-weighted: conversionValue = orderTotal × marginRate (£100 × 0.4 = £40)
Pros: Simple to implement, works with standard Smart Bidding
Cons: Requires margin data at checkout, changes your reported ROAS (looks lower but is more accurate)
Option 2: Feed-Based Margin Segmentation
Use custom labels to segment products by margin tier, then run separate campaigns with different ROAS targets for each tier.
Custom Label Structure
- custom_label_0 = "margin_high" (60%+ margin, target 2.0 ROAS)
- custom_label_0 = "margin_medium" (40-60% margin, target 3.0 ROAS)
- custom_label_0 = "margin_low" (20-40% margin, target 4.0 ROAS)
- custom_label_0 = "margin_negative" (sub-20% margin, exclude or recovery only)
Pros: Uses standard Shopping/PMax, maintains revenue reporting
Cons: Requires accurate margin data in feed, more campaign management overhead
Option 3: Custom Scripts with COGS Data
Build automation that pulls margin data from your ERP, calculates actual profit by product, and adjusts campaigns accordingly.
Script Logic Flow
- 1. Pull last 30 days conversion data by product ID
- 2. Match to COGS data from ERP/inventory system
- 3. Calculate contribution profit = Revenue - COGS - Ad Cost
- 4. Identify products with negative contribution
- 5. Adjust bids down or exclude negative-profit products
- 6. Increase bids on high-profit products with headroom
Pros: Most accurate, can incorporate real-time COGS changes
Cons: Requires development resources, API integration, ongoing maintenance
Implementing Margin-Weighted Conversion Value
The most accessible approach for most brands. Here is the technical implementation:
Step 1: Calculate Margin at Checkout
Your checkout needs access to COGS data for each SKU. Most platforms can do this:
- • Shopify: Use metafields for cost_per_item
- • WooCommerce: Use regular price vs. cost fields
- • Custom platforms: Pull from ERP/inventory API
Step 2: Send Profit as Conversion Value
Google Tag Manager Setup
// Data Layer Push (at checkout)
dataLayer.push({
'event': 'purchase',
'ecommerce': {
'transaction_id': '12345',
'value': 75.00, // Contribution profit, not revenue
'currency': 'GBP',
'items': [...]
}
});
// Calculate profit server-side:
// profitValue = sum(item.price - item.cogs) - shipping_costStep 3: Adjust Your Targets
Since you are now sending profit instead of revenue, your target ROAS needs recalibration:
Old target: 4.0 ROAS (on revenue)
Average margin: 40%
New target: 1.6 ROAS (on profit) = 4.0 × 0.40
A 1.6 ROAS on profit means £1.60 of contribution profit for every £1 of ad spend. That is genuinely profitable, unlike a 4.0 revenue ROAS that might break even.
Feed Strategy for Margin Segmentation
For brands not ready for conversion value changes, feed segmentation is the next best option:
Required Feed Data
- • product_id (for matching)
- • price (selling price)
- • cost_of_goods_sold (your cost)
- • calculated_margin = (price - cogs) / price
- • custom_label_0 = margin tier assignment
Then build your campaign structure around these tiers:
- High-margin campaign: Products with 60%+ margin. Aggressive ROAS targets (2.0 to 2.5), higher budgets, broad reach.
- Medium-margin campaign: Products with 40 to 60% margin. Conservative ROAS targets (3.0 to 3.5), standard budgets.
- Low-margin campaign: Products with 20 to 40% margin. High ROAS targets (4.0+), limited budgets, remarketing focus.
- Exclusion list: Sub-20% margin products excluded from paid entirely unless specifically needed for cash recovery.
Advanced: Dynamic Margin Updates
Margins change. Supplier costs fluctuate. Promotions affect selling prices. Static margin data in feeds becomes stale quickly.
For brands spending £50k+/month, consider:
- Daily feed refreshes: Pull COGS from ERP nightly, recalculate margin tiers
- Promotion-aware logic: When a product goes on sale, automatically adjust its margin tier assignment
- Inventory integration: Products with excess stock might temporarily shift to "recovery" tier with lower profit requirements
"The boring stuff makes the money. COGS in your feed is not exciting. It is the difference between scaling revenue and scaling profit."
Common Implementation Mistakes
- Using gross margin instead of contribution:Gross margin ignores shipping, payment processing, and returns. Contribution margin is what matters.
- Static COGS that never update:If you loaded margin data once 6 months ago, it is probably wrong now.
- Ignoring return rates: A 50% margin product with 40% return rate has negative real margin. Factor returns into your calculations.
- Overcomplicating the first version:Start with margin tiers in custom labels. Perfect the data. Then add automation.
Ready to move from revenue-based to profit-based bidding? We can assess your current setup and recommend the right implementation path.
Book a Discovery CallGet our insights in your inbox
Plain-English thinking about Google Ads. No spam, unsubscribe anytime.