# Mixpanel Data Out

## About this integration

Mixpanel is an analytics platform that helps you track user interactions in your websites and apps, so you can convert, engage, and retain more users.

[Mode How we forward source data to the destination: through Customer.io's servers or directly from our JavaScript client.](/cdp/destinations/getting-started/#connection-mode)

[Web sources Indicates whether or not this integration supports our the JavaScript client.](/cdp/sources/getting-started/#types-of-sources)

[API sources Indicates whether or not this integration supports our server libraries (Go, NodeJS, Python), API, Mobile SDK, and other data sources.](/cdp/sources/getting-started/#types-of-sources)

[Supported calls The API methods this integration supports.](/cdp/sources/source-spec/source-events/)

[Integration name The name of this integration if you want to enable or disable it in the `integrations` object.](/cdp/sources/source-spec/common-fields/#the-integrations-object)

Standard

[page](/api/cdp/#operation/page), [alias](/api/cdp/#operation/alias), [group](/api/cdp/#operation/group), [identify](/api/cdp/#operation/identify), and [track](/api/cdp/#operation/track)

Mixpanel (Actions)

## Getting started[](#getting-started)

1.  Go to **[Data & Integrations > Integrations](https://fly.customer.io/workspaces/last/journeys/integrations/all/directory)** and select the **Mixpanel** entry in the *Directory* tab.
    
2.  (Optional) Select the data sources that you want to connect to your outbound integration. You can always connect data sources later. We’ll only show you data sources that work with your integration.
    
3.  Configure your integration.
    
    1.  **Project Token**: Mixpanel project token.
        
    2.  **Api Secret**: Mixpanel project secret.
        
    3.  **Api Region**: Learn about [EU data residency](https://help.mixpanel.com/hc/en-us/articles/360039135652-Data-Residency-in-EU)
        
    4.  **Source Name**: This value, if it's not blank, will be sent as source\_name to Mixpanel for every event/page/screen call.
        
    5.  **Strict Mode**: This value, if it's 1 (recommended), Mixpanel will validate the events you are trying to send and return errors per event that failed. Learn more about the Mixpanel [Import Events API](https://developer.mixpanel.com/reference/import-events)
        
4.  Click **Enable Destination**.
    

## Actions[](#actions)

Before you get started with Mixpanel, you should implement [the `alias` method](#alias-method) in your sources. This ensures that you attribute activity to the right users.

When you’re done setting things up, you can go to the *Actions* tab to see how we map incoming data to your integration.

You may need to add actions for this integration

While we often have default triggers for actions, we don't always add those actions as defaults. You may need to add actions to make sure that you're sending all the data that you want to send to your integration. See our [actions](/integrations/data-out/actions/) page for help setting up actions.

### Track Event[](#track-event-cloud)

Default Trigger: `type = “track”`

Send an event to Mixpanel. [Learn more about Events in Mixpanel](https://help.mixpanel.com/hc/en-us/articles/360041995352-Mixpanel-Concepts-Events)

### Identify User[](#identify-user-cloud)

Default Trigger: `type = “identify”`

Set the user ID for a particular device ID or update user properties. Learn more about [User Profiles](https://help.mixpanel.com/hc/en-us/articles/115004501966) and [Identity Management](https://help.mixpanel.com/hc/en-us/articles/360041039771-Getting-Started-with-Identity-Management).

### Group Identify User[](#group-identify-user-cloud)

Default Trigger: `type = “group”`

Updates or adds properties to a group profile. The profile is created if it does not exist. [Learn more about Group Analytics.](https://help.mixpanel.com/hc/en-us/articles/360025333632-Group-Analytics)

### Alias[](#alias-cloud)

Create an alias to a distinct id. This action is primarily supported for the sake of customers using the legacy identity management in their Mixpanel project. For new customers or those who have migrated to the [new identity management](https://help.mixpanel.com/hc/en-us/articles/360041039771-Getting-Started-with-Identity-Management) in Mixpanel should use `identify`.

### Track Purchase[](#track-purchase-cloud)

Default Trigger: `type = “track”`

Send an ‘Order Completed’ Event to Mixpanel.

## Use simplified identity merging in Mixpanel[](#simplified-id-merge)

Before March 2023, Mixpanel required you to use the `alias` method to merge identities. Now Mixpanel has a *Simplified API* for identity merging. This API supports identity merging the way most platforms do—without needing to send `alias` calls. [Learn more about Mixpanel’s simplified ID merge feature](https://docs.mixpanel.com/docs/tracking-methods/id-management/identifying-users#simplified-vs-original-id-merge).

**If you created your account before April 2024**, you need to enable Mixpanel’s Simplified API to support easy identity merges. Otherwise, you’ll have to [use the `alias` method to merge identities](#alias-method).

[![mixpanel's interface has an identity merge setting that supports a simple API](https://docs.customer.io/images/cdp-mixpanel-simplified-api.webp)](#10fea9a0f5ef44a5c88caad688df33c8-lightbox)

### Using the `alias` method (original API)[](#alias-method)

Mixpanel’s original API doesn’t gracefully handle identity changes. For example, when you identify a person who was previously anonymous, Mixpanel’s original API doesn’t automatically associate anonymous activity with the `userId` in your identify call. Instead, Mixpanel’s original API treats the `anonymousId` and `userId` as two separate people.

If you don’t want to [enable the Simplified API](#simplified-id-merge), you need to send an `alias` call to associate anonymous activity with an identified person (a `userId`).

You should send the `alias` method *before* you send an `identify` call for a person. For example, using our JavaScript snippet, your flow might look something like this:

```javascript
// the anonymous user does actions under an anonymous ID
cioanalytics.track('92734232-2342423423-973945', 'Anonymous Event')
// the anonymous user signs up and is aliased to their new user ID
cioanalytics.alias('92734232-2342423423-973945', '1234')
// the user is identified
cioanalytics.identify('1234', { 'plan': 'Free' })
// the identified user does actions
cioanalytics.track('1234', 'Identified Action')
```

### Attributing `track` events to groups[](#attributing-track-events-to-groups)

You can attribute events to groups in Mixpanel. To do this, make sure that your `track` calls either include a `groupId` and that it’s mapped to a valid value in your action. By default, we map this field to your source data’s `context.groupId` field.