There’s one question that tests every analytics setup: “Does your revenue number match finance?”
In Mixpanel, the answer is usually “roughly”, and “roughly” is where trust starts to fade. Revenue is either too high (duplicate purchase events), too low (ad blockers, missing server-side orders), or just strange (three currencies added together as if they were one).
This guide shows how to track revenue in Mixpanel so the number holds up, from event design to the reports that use it.
How Mixpanel thinks about revenue
Mixpanel doesn’t need a special “revenue” event. Revenue is simply a numeric property on an event, usually your purchase event, and reports sum it. In Insights, you choose Property sum as the measurement and pick the numeric property. In Funnels, Mixpanel can sum a property at each step to show how much value converted or dropped off.
You may also see older documentation for a track_charge method on user profiles, which recorded transactions for Mixpanel’s legacy Revenue report. For new implementations, I build revenue on events instead. It’s more flexible, works across every report, and fits Mixpanel’s event-based model. Check Mixpanel’s current docs if you maintain an older project that still uses charges.
Step 1: Design your revenue events
Revenue is never just one event. Decide up front which money events you need:
| Event | When it fires | Key properties |
|---|---|---|
purchase_completed | Payment confirmed | order_id, revenue, currency, revenue_usd, items, discount, coupon |
subscription_started | First paid subscription | plan, billing_cycle, mrr, currency |
subscription_renewed | Each renewal | plan, revenue, currency |
subscription_upgraded / downgraded | Plan change | from_plan, to_plan, mrr_change |
refund_issued | Refund processed | order_id, refund_amount, currency, reason |
Two rules I never break:
- Fire purchase events on confirmation, not on click. “User clicked Pay” is not revenue. “Payment succeeded” is.
- Track refunds as their own events. Mixpanel events can’t be edited after the fact, so a refund must be a new event, not a change to the old one.
Step 2: Get the properties right
Use numbers, not strings
revenue: 49.99 works. revenue: "$49.99" doesn’t; Mixpanel can’t sum a string. Check this in the Events view JSON (post 11).
Decide what “revenue” means
Is it before or after tax? Before or after discounts? Including shipping? Write it down in your tracking plan and stick to it. I usually send several explicit properties rather than one ambiguous one:
mixpanel.track('purchase_completed', {
order_id: 'ORD-10421',
revenue: 84.00, // net of discount, excluding tax and shipping
tax: 7.56,
shipping: 5.00,
discount: 10.00,
currency: 'EUR',
revenue_usd: 91.30, // converted at time of purchase
item_count: 2,
coupon: 'AUTUMN10'
});
Handle multiple currencies
If you sell in more than one currency, never sum the raw revenue property across currencies. Send a converted value in one reporting currency (like revenue_usd) calculated at the time of purchase, plus the original currency and amount. Report on the converted property.
Include product details
Sending an items list with product ID, name, category, price and quantity lets you analyze revenue by product. If category or brand change over time, enrich with a lookup table instead of hard-coding them (post 17).
Step 3: Send revenue from the most reliable source
Browser-only revenue tracking always undercounts. Ad blockers, closed tabs and slow confirmation pages all lose purchases.
In order of reliability:
- Server-side from your payment system or backend (post 23 shows server-side GTM with Stape).
- Platform events, such as Shopify’s checkout pixel (post 25).
- Browser SDK on the confirmation page, as a last resort.
Renewals and refunds almost always happen without the user on your site, so they must come from the server.
Step 4: Prevent double-counting
The number one cause of inflated Mixpanel revenue is the same purchase arriving twice: a page refresh on the thank-you page, a retry, or browser and server both sending it.
The fix is $insert_id. Base it on the order ID:
mixpanel.track('purchase_completed', {
$insert_id: 'purchase_ORD-10421',
order_id: 'ORD-10421',
revenue: 84.00
});
If the same order is sent twice with the same event name, distinct ID, timestamp and insert ID, Mixpanel shows it once. Post 3 explains the rules.
Step 5: Build the revenue reports
Total revenue
In Insights, select purchase_completed, change the measurement to Property sum and choose revenue_usd.
Net revenue
Add a second metric: Property sum of refund_amount_usd on refund_issued. Then use a formula to subtract B from A. Save it as a metric so everyone uses the same definition.
Average order value
Use Property average of revenue_usd, or a formula of total revenue divided by total purchases.
Revenue per user
Use a formula of total revenue divided by unique users who did any event (or who signed up) in the period.
Revenue by channel
Break down revenue by UTM source or an attribution model (post 5). This is the report marketing will ask for first.
Revenue in a funnel
In Funnels, sum revenue_usd on the final step to see how much revenue each acquisition source or variant produced.
Step 6: Reconcile with finance
Once a month, compare Mixpanel revenue to your payment system for the same period and currency. Expect small differences from timezones (Mixpanel reports in your project timezone) and timing (when the event fired versus when the payment settled). Large or growing differences mean something is missing or duplicated.
A practical rule I give clients: Mixpanel is for analyzing revenue (which behaviors, channels and products drive it), finance is for reporting it. Aim for close agreement, not to the cent.
Mistakes to avoid
- Revenue as a string.
- Tracking purchases on button click.
- Summing mixed currencies.
- No
$insert_idon purchases. - No refund events, so revenue only ever goes up.
- Browser-only tracking for subscriptions, which misses every renewal.
- Changing the revenue definition halfway through the year without telling anyone.
Final thoughts
Revenue in Mixpanel is only as trustworthy as the events behind it. Fire on confirmation, send numbers in one reporting currency, deduplicate with order IDs, track refunds separately, and send money events from the server. Then you can stop arguing about the number and start using it.
Sources
- Mixpanel: Events and Properties
- Mixpanel: Funnels Advanced (property sum)
- Mixpanel: Event Deduplication
- Mixpanel: iOS SDK (legacy trackCharge reference)
