|
1 | 1 | ---
|
2 | 2 | title: 'Mixpanel Cohorts Source'
|
3 |
| -hidden: true |
4 |
| ---- |
| 3 | +--- |
| 4 | + |
| 5 | + |
| 6 | +[Mixpanel Cohorts](https://help.mixpanel.com/hc/en-us/articles/115005708186-Cohorts-Overview-){:target="_blank} are groups of users defined by a set of criteria. The Mixpanel Cohorts Source allows you to export Cohorts of users from Mixpanel to Segment so that you can better target users across many downstream connections. You can sync Cohorts of users to your Segment-connected raw data warehouses and downstream destinations that accept Segment identify events. |
| 7 | + |
| 8 | +This source is maintained by Mixpanel. For any issues with the source, contact the [Mixpanel Support team](https://help.mixpanel.com/hc/en-us/requests/new){:target="_blank"}. |
| 9 | + |
| 10 | +## Getting Started |
| 11 | + |
| 12 | +1. From your workspace's [Sources catalog page](https://app.segment.com/goto-my-workspace/sources/catalog) click **Add Source**. |
| 13 | +2. Search for **Mixpanel Cohorts** in the Sources Catalog and click **Add Source**. |
| 14 | +3. On the next screen, give the Source a nickname and configure any other settings. |
| 15 | +4. From the new Source’s Overview page, copy the Segment WriteKey |
| 16 | +5. To export users from Mixpanel to Segment, in Mixpanel first Connect Your segment workspace in integrations page add add the copied WriteKey in the **API KEY** field and give the connection a desired name in **CONNECTOR NAME** field.  |
| 17 | +6. Once connected you can go to mixpanel cohorts page and export any cohort to the connection. |
| 18 | +7. Once configured, Cohorts sync to Segment based on the sync schedule in Mixpanel. For more information go to [Mixpanel Segment Integration documentation.](https://help.mixpanel.com/hc/en-us/articles/4408988683156-Segment-Integration){:target="_blank"} |
| 19 | + |
| 20 | + |
| 21 | + |
| 22 | +## The Cohort sync process |
| 23 | + |
| 24 | +Mixpanel sets a property on the user's profile in Segment indicating whether they are currently part of the cohort. |
| 25 | + |
| 26 | +The following identify call to Segment when a user enters the cohort: |
| 27 | +```json |
| 28 | +{ |
| 29 | + "type": "identify", |
| 30 | + "traits": { |
| 31 | + "Mixpanel - <Cohort Name in Mixpanel>": true, |
| 32 | + }, |
| 33 | + "userId": "[email protected]" // mixpanel uses the distinct_id property here |
| 34 | +} |
| 35 | +``` |
| 36 | + |
| 37 | + |
| 38 | +Mixpanel sends the following identify call when a user exits the cohort: |
| 39 | +```json |
| 40 | +{ |
| 41 | + "type": "identify", |
| 42 | + "traits": { |
| 43 | + "Mixpanel - <Cohort Name in Mixpanel>": false, |
| 44 | + }, |
| 45 | + "userId": "[email protected]" // mixpanel uses the distinct_id property here |
| 46 | +} |
| 47 | +``` |
0 commit comments