Profit Tracking

Shopify COGS Setup: The Foundation of Accurate Profit Tracking

March 8, 2026 · 6 min read · metriq team

Every profit dashboard, MER calculation, and AI recommendation sits on one fragile layer: cost of goods sold.

Get COGS wrong and high ROAS campaigns look like heroes while the bank account disagrees. Get COGS right — updated, SKU-granular, and aligned with how orders actually ship — and channel decisions finally match finance reality.

Shopify stores COGS in more than one place, and none of them automatically stay correct as suppliers reprice, freight spikes, or bundles change. This guide walks through how to set up COGS for accurate profit tracking, what to avoid, and how to maintain the system when the business moves faster than the spreadsheet.

Why COGS Is the Highest-Leverage Data in Your Stack

Ad platforms optimize toward revenue events. Shopify records what customers paid. COGS is where revenue turns into margin.

A 10% error in COGS on a 40% margin business can flip a campaign from “scale” to “pause.” Multiply that across thousands of orders and dozens of SKUs, and stale unit costs become a silent tax on every growth decision.

Profit tracking without COGS is just revenue tracking with extra steps.

What COGS Should Include for Ecommerce

Unit product cost — what you pay the manufacturer or wholesaler per SKU.

Inbound logistics — freight from factory to warehouse, duties, customs brokerage, allocated per unit.

Packaging — boxes, mailers, inserts, tissue, stickers if consistently included and not tracked separately as marketing.

Labeling and kitting — barcodes, assembly labor for bundles if not expensed elsewhere.

What typically stays out of COGS (but still affects net profit):

  • Meta and Google ad spend (subtract after contribution margin)
  • Payment processing fees (often modeled separately per order)
  • Outbound shipping to customer (variable fulfillment cost)
  • Salaries, rent, software (fixed overhead)

Consistency matters more than philosophical purity. Document what you include and apply it the same way in every report.

Where Shopify Stores Cost Data (And the Gaps)

Product cost field

Shopify allows a cost per item on each variant. This is the natural anchor for profit apps and analytics layers that read via API.

Pros: Native, variant-level, accessible to integrations.

Cons: Easy to bulk-import wrong; no built-in reminder to update; bundles and kits need manual logic.

Inventory systems and ERPs

Brands on Cin7, Brightpearl, NetSuite, or similar often treat the ERP as cost master. Shopify cost fields become a downstream sync.

Pros: Landed cost workflows, purchase orders, FX handling.

Cons: Sync lag; variant ID mismatches; historical orders need frozen cost snapshots.

Spreadsheets

Still common. Export variants, maintain COGS column, re-import or manual entry.

Pros: Flexible for allocations and freight math.

Cons: Version chaos; no audit trail; breaks at scale.

For profit tracking, pick one cost master and flow it to wherever margin is calculated — analytics tool, data warehouse, or Metriq-style profit layer.

Step-by-Step: Shopify COGS Setup for Profit Tracking

Step 1: Standardize variant identifiers

Profit tracking joins orders to costs on variant ID (or SKU with strict uniqueness). Audit:

  • Duplicate SKUs across products
  • Legacy variants still receiving ad traffic
  • Marketplace SKUs not mapped

Fix duplicates before importing costs. Bad keys create orphan margin.

Step 2: Calculate landed cost per variant

For each SKU:

Landed Cost = (Unit Purchase Cost + Inbound Freight Allocation + Duties + Packaging) ÷ Units in Shipment

Example: You import 2,000 units at $8.50 each. Freight and duties total $3,000. Packaging adds $0.40/unit.

Freight/duty per unit: $3,000 ÷ 2,000 = $1.50

Landed cost: $8.50 + $1.50 + $0.40 = $10.40

Enter $10.40 in Shopify cost per item for that variant — or store in ERP and sync.

Step 3: Handle multiple suppliers and price changes

When supplier A ships at $10.40 and supplier B at $11.10, options:

  • Weighted average cost across POs (common for profit tracking)
  • FIFO layers (more accurate, heavier operationally)
  • Latest PO cost (simple, can swing margins sharply)

Document the method. Finance may prefer weighted average; growth needs stability week to week.

When costs change, update forward and decide whether to restate historical orders. Most profit dashboards use cost at time of order snapshots — ideal — or current cost applied retroactively — simpler but distorts history.

Step 4: Map bundles, kits, and BOGO offers

Bundles break naive COGS if the sold SKU is a virtual bundle variant.

Approaches:

  • Set bundle variant cost = sum of component costs × quantities
  • Explode bundle line items in analytics to component SKUs at order processing time
  • Use fixed bundle cost updated when any component changes

Never leave bundle cost at $0 because “components have costs.” The order line shows the bundle.

Step 5: Validate against a physical order sample

Pick ten recent orders spanning single-SKU, multi-SKU, discount, refund, and bundle. Manually compute:

Expected COGS = Σ (quantity × landed cost per variant)

Compare to profit tool output. Investigate every cent of difference — usually unmapped variants or tax-inclusive purchase records mistaken for ex-tax cost.

Step 6: Connect COGS to channel reporting

With costs in place, profit tracking adds:

  • Payment fees (percent + fixed per order rules)
  • Shipping/fulfillment model
  • Return allowance

Output: contribution margin by order, rollable to campaign via UTM or platform join.

COGS alone is not profit — but profit without COGS is fiction.

Common COGS Mistakes on Shopify

Using product price instead of cost

Happens during rushed imports. Margin looks artificially huge until someone notices.

Ignoring FX and tariff shifts

Overseas manufacturers invoicing in USD today and CNY tomorrow. Without FX in landed cost, prospecting scales into a margin cliff after the next PO.

Forgetting packaging on low-ticket goods

$0.35 packaging on a $18 item is two margin points. Material at volume.

Stale costs for hero SKUs

Ads rotate to winning products; COGS updated quarterly. The highest-volume SKU is often the stalest.

Treating free gifts as zero cost

GWP line items with $0 price still carry COGS. Attribution and promo analysis must include them.

Double-counting components in bundles

Both bundle and components carrying full cost. Margin collapses incorrectly; you pause profitable campaigns.

Maintenance Rhythm: Keeping COGS Honest

On every new PO receipt: Update weighted average or FIFO layer; push to Shopify cost field.

Monthly: Review top 20 SKUs by revenue — confirm costs moved if supplier emails mentioned increases.

On bundle launch: Set bundle cost formula in checklist; block launch if cost blank.

Quarterly: Audit bottom 80% long-tail SKUs for drift — returns and ads often concentrate in heroes, but long-tail errors aggregate.

On promo: If offering a high-COGS SKU as GWP, model promo margin before scaling spend.

Assign an owner. COGS without ownership decays. Finance, ops, or a dedicated revenue operations role — pick one throat to choke.

COGS and Returns

Refunded orders should reverse revenue and the COGS associated with returned units if inventory is not resellable — or partially reverse if restocked.

Simple model: apply trailing return rate × COGS as allowance on forward-looking profit views.

Advanced model: integrate return line items from Shopify refunds and restore COGS only on non-restocked goods.

Profit tracking accuracy improves when returns touch both revenue and cost, not revenue alone.

Integrations and API Sync

If using a profit analytics connector:

  • Grant read access to products/variants and orders
  • Schedule nightly sync of cost fields after any ERP update
  • Log cost changes with timestamp for audit

API-based sync beats manual CSV because Black Friday does not wait for someone to upload a sheet.

From COGS to Decisions

Once COGS is reliable, downstream wins arrive quickly:

  • Campaign leaderboard by contribution profit reorders budget away from high-ROAS, low-margin SKUs
  • Creative briefs cite margin-safe products
  • Promo planning compares discount depth against contribution floor
  • Finance reviews align with growth dashboards — same COGS definition

Without COGS, those tools narrate revenue. With COGS, they narrate the business.

Quick Reference Checklist

  • One cost master system identified
  • Landed cost formula documented
  • All active variants have non-zero cost (except true digital $0 COGS)
  • Bundles mapped to component costs
  • Ten-order manual validation passed
  • Update process tied to PO receipts
  • Owner assigned for monthly hero-SKU review
  • Profit tool receiving synced costs

The Foundation Stays Boring — and Critical

COGS setup is not glamorous work. No creative director celebrates a freight allocation spreadsheet. But every sophisticated Meta strategy, Google tROAS target, and AI analyst recommendation depends on knowing what you paid for what you sold.

Shopify gives you the storefront and order truth. You supply the cost truth. Nail COGS once, maintain it weekly, and profit tracking stops being a debate — it becomes the shared language your whole team uses to decide what to scale next.