Send Revenue Data To Mixpanel - Articles From the Archive

  • 17 July 2019
  • 5 replies

Userlevel 4
Badge +4

Each week, Mixpanel will release articles from our archives to help you get the most out of Mixpanel. Follow the Topic Tag #fromthearchive to subscribe to these posts and get alerted when they drop.

There are two ways you can send revenue data to Mixpanel:

  1. Track a purchase Event with revenue included as a Property. This will allow you to analyze your revenue data in Insights.
  2. Send revenue data using people.track_charge and using an incremental People Property.* This will allow you to use the Revenue section of Mixpanel for more advanced analytics on lifetime value and average revenue per paying user. The incremental People Property will allow you to understand which users spend the most or filter for low-spending users.

Both approaches allow you to send revenue data via one of Mixpanel’s native libraries; Mixpanel doesn’t have direct integration with any payment services.

*Limited by plan type

The Revenue report is available on legacy Startup, Enterprise plans and MTU plans - visit the pricing page for more information or to upgrade.

Track Purchases with Events

If you track a purchase event along with a numeric revenue property (i.e., the price or subtotal), you can use this data to get more detail about purchases in Insights. For example, your track call might look like this:

mixpanel.track("Purchase item", {Price: 27.00, "Item Category": "Books"});

From there, you can segment the Purchase item Event in Insights to look at, for example, what prices people are buying at most often or what operating systems people are using to purchase at different prices.

Track Purchases with Revenue and People Profiles

Using a people.track_charge call will send data to the Revenue report and show you lifetime value and average revenue per paying user as well as segment by all other People Properties you’re tracking. For example, using the JavaScript library, your track call would look something like this for a $50 charge, which would then be attributed to the particular user who made the purchase:


Mixpanel’s Revenue report will let you analyze how different groups of customers are performing over time.

Along with sending people.track_charge calls, it’s also best practice in tandem to store an incremental People Property for each user’s lifetime spend. This will allow you to trigger notifications off of your user’s purchases:

mixpanel.people.increment('Lifetime Revenue', 50);

Revenue tips and best practices

  • To ensure accuracy of revenue data, many Mixpanel users choose to send this data using one of the server-side libraries rather than sending the data client-side.

  • If you already have revenue data that isn’t in Mixpanel, you can import past revenue data for a more complete picture.

5 replies

Hi Stepahnie-

Thanks for sharing this great resource. Appreciate it.

Quick question: Referring back to your “Track purchase with events”- where should I call this 

mixpanel.track("Purchase item", {Price: 27.00, "Item Category": "Books"});

I am trying to implement mixpanel in my ecommerce (built with Wordpress/Woocommerce) site but having a challenge in finding revenue type events for analysis. 

Badge +1

@stephanie If I add more property in “mixpanel.people.track_charge()” as below, where do I those data?   

mixpanel.people.track_charge(SOME_AMOUNT, {‘other property': ‘SOME_PROPERTY’});

Userlevel 5
Badge +3

@BusinessHack - 

The Mixpanel team typically recommends sending purchase activity as an event (with a typical track call) so that you can use this data alongside your analysis in other reports. If you use the track charge method the data only shows up in the revenue report. You can track this event wherever the data is captured on your ecommerce site, likely when your customer is checking out. Sending the price as a numeric value will enable you to do calculations on the property with formulas in insights. 

I also found this help page if it is helpful to you!

@noom -

The track charge method is specifically for the Mixpanel revenue report. If you are using this method we typically recommend that you send a normal track event at the same time. This way you can utilize the Revenue report, but have your data available in the Insights report as well.  Additionally, you would be able to send additional properties since  

mixpanel.people.increment('Lifetime Revenue', 50); 

only support the numeric values for that specific property. 

How do I send this data using one of the server-side libraries . Is it Possible to send revenue data without the user triggering the event.

Userlevel 3
Badge +2

@nicktheuser  yes it is possible to send event without user triggering it. User triggers the event or it triggers itself for Mixpanel it is same, record the data. So basically you can send the events according to your business settings.


You can send events using any of the server-side framework, for example here is how to send event using PHP