What is distinct_id?

Mixpanel's unique identifier is called distinct_id.

Mixpanel can keep track of actions in your application right down to the individual customer level. This is done using a property called distinct_id. The property can (and in most cases should) be included with every event you send to Mixpanel to tie it to a user. Distinct_id plays a vital role across most Mixpanel reporting. Here's how:

Segmentation / Trends / Formulas

In the Segmentation, Trends, and Formulas reports, distinct_id is used to determine uniqueness. So when you filter a report down to look at only uniques, Mixpanel is showing you the count of unique distinct_id values that sent that event. When you view averages, it is showing you the average number of events sent per distinct_id per hour/day/week/month.

Funnels

In the Funnels report, distinct_id is used to follow a given customer through a funnel. When the report is calculated, we take the count of unique distinct_id values that sent the first event. We then follow that pool of ids through the subsequent events, calculating the drop off as we go.

Retention

In the Retention report, distinct_id is used to follow a cohort of users through time. When you select a value under "show me users who did X," we collect the entire pool of unique distint_id values that send that event on the given day/week/month. We then follow that group of distinct_ids forward in time to see if there are any the events you specified in the following day/week/month long buckets that were sent with that id. If so, we include that id when calculating the percentage that we display for that cell in the chart.

People Analytics

Distinct_id plays a dual role in People analytics. Firstly, it is the unique identifier for that part of the tool. Data sent to the people section of Mixpanel is dispatched to a distinct_id. If the id already has a People record tied to it, then the call modifies or updates the existing entry. If the id does not already exist, a new entry is created for that id. The distinct_id associated with a People analytics entry can be seen by inspecting the URL when in the profile view (click a user in the explore report).

In addition, the distinct_id in the People section is also what is used to populate the activity feed. The activity feed will include all events sent with that distinct_id. For Mixpanel customers who use version 2.1 of the JavaScript library there is also a hidden property called "$events_distinct_id" this id will also be queried for activity feed. In addition to those two ids any aliased ids will be queried as well.