Skip to main content
Upstack calculates four tiers of contribution margin so you can optimize on profit, not vanity metrics like revenue or ROAS. Each tier subtracts an additional layer of costs:
LevelWhat’s subtractedWhat it tells you
CM1COGS (cost of goods sold)Gross margin
CM2+ Fulfillment, transaction & gateway fees, shippingPost-logistics margin
CM3+ Marketing and ad spendContribution margin (most commonly used)
CM4+ Operating expenses, agency fees, and otherOperating profit

Setup

1

Enter COGS in Shopify

Go to Shopify Admin → Products and select a product. For each variant, enter the Cost per item field. If you sell a product for 30anditcosts30 and it costs 5 to produce, enter $5. Upstack pulls this in automatically — no manual sync required.
After configuring COGS, allow approximately 4 hours for historical data to backfill. CM1 values for past orders populate automatically once the backfill completes.
2

Configure your other costs in Upstack

Open Settings → Cost Overview to add shipping, gateway fees, order costs, a fallback product margin, and fixed and variable costs. Each cost is assigned a category that maps to a contribution-margin tier:
Cost categoryCM tier
COGS (product cost)CM1
Fulfillment, transaction, gateway, shippingCM2
Marketing and ad spendCM3
Operating expenses, agency fees, otherCM4
Fixed and variable costs land in the tier matching their category. See Cost settings for a full walkthrough of every category.
3

Connect marketing spend

Spend from connected ad platforms (Meta, Google, TikTok) flows in automatically. For non-connected channels (influencer, podcast, and similar), add it under Settings → Cost Overview as a fixed or variable cost so it counts toward CM3.

P&L dashboard

Two views are available:
  • Summary — aggregate P&L across a date range
  • Daily breakdown — granular day-by-day performance
Key metrics include Net Revenue, COGS, CM1, CM2, CM3, CM4, MER, and NCCM3. Over 250 measures are available and fully customizable.
NCCM3 is contribution margin (CM3) for new customers only — net revenue minus product, fulfillment, transaction, shipping, marketing, and ad-spend costs. It’s the single most useful metric for evaluating whether your prospecting spend is profitable after all variable costs.
The LTV Cohort Dashboard shows customer lifetime value by acquisition cohort. Use it to measure how quickly cohorts pay back acquisition cost and identify your highest-value customer segments.This replaces standalone LTV tools like Lifetimely — the data is built directly from your Upstack event pipeline, so cohort metrics stay consistent with your P&L and attribution data.

Next step

Verify end-to-end delivery

Confirm the complete pipeline works — from storefront event through attribution to destination delivery.

Cost settings

Set up product, order, shipping, gateway, fixed, and variable costs in detail.

Attribution and reporting

Learn how Upstack attributes conversions and calculates reporting metrics across channels.

Attribution reporting dashboard

Explore the attribution reporting dashboard and available metrics.

Custom events

Configure NC Purchase, subscription events, and order source exclusions for ad platform optimization.

Connect a destination

Set up Meta CAPI as your first server-side destination for high-quality conversion events.