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:Documentation Index
Fetch the complete documentation index at: https://docs.upstackdata.com/llms.txt
Use this file to discover all available pages before exploring further.
| Level | What’s subtracted | What it tells you |
|---|---|---|
| CM1 | COGS (cost of goods sold) | Gross margin |
| CM2 | + Fulfillment, transaction fees, shipping | Post-logistics margin |
| CM3 | + Marketing spend | Contribution margin (most commonly used) |
| CM4 | + Fixed costs / OpEx | Operating profit |
Setup
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 5 to produce, enter $5.Upstack pulls this data automatically — no manual sync required.
If you don’t maintain per-product costs, set a flat margin default in Upstack (e.g., “60% margin across all products”) under Settings → Custom Costs → Default Margin. This applies to any product without an explicit cost-per-item in Shopify.
After configuring COGS, allow approximately 4 hours for historical data to backfill. CM1 values for past orders will populate automatically once the backfill completes.
Configure custom costs in Upstack
Navigate to Settings → Custom Costs and configure each cost type:Gateway / transaction costs — set as a percentage of order value. Example: Shopify Payments at 2.9% per transaction.Per-order costs — set as a flat dollar amount per order. Example: pick-and-pack fee of $2 per order.Shipping profiles — configure based on weight ranges and destination countries, or enter a flat average shipping cost.Each cost is assigned to a CM level:
| Cost type | CM level |
|---|---|
| COGS | CM1 |
| Fulfillment / transaction fees | CM2 |
| Marketing spend | CM3 |
| Fixed costs / OpEx | CM4 |
Connect marketing spend
Connected ad platforms (Meta, Google, TikTok) — spend data flows automatically from your connected sources. No manual entry needed.Non-connected channels (AppLovin, influencer spend, podcast ads):
- Go to Settings → Fixed Costs → Marketing Spend
- Enter as a recurring monthly amount with start and end dates, or enter manually each month
- Daily cost is averaged across the month
P&L dashboard
Two views are available:- Summary — aggregate P&L across a date range
- Daily breakdown — granular day-by-day performance
LTV cohort dashboard
LTV cohort dashboard
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.
Related
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.