New feature: retention data - Mixpanel
Blog Post

New feature: retention data

Last edited: Sep 13, 2022

We’ve been thinking about how to improve retention tracking a lot recently. This feature is the first public result coming out of that.

You can now segment your retention data by where a user came from. Specifically, you can set a special property, mp_source, on any event just like any other property. On our side, we treat mp_source specially. You won’t see it along side your other properties in the normal Mixpanel views, but you will be able to select its values when viewing a retention table. See the screenshot below:

In this case, we’re looking at retention data for visitors that had mp_source set to code.

How to get it working

The only thing you need to do is to start setting the mp_source property on your events. For example:

js mpmetrics.track('some event', {mp_source: 'twitter'});

It’s important to note that mp_source must be set every time a user triggers the event for retention tracking to work correctly. If you’re using our Javascript API, this is as easy as setting a super property once like this:

js mpmetrics.register_once({mp_source: 'twitter'});

Once you’ve made the code changes, you should start seeing source-based retention data within a day.

Get the latest from Mixpanel
This field is required.