> ## Documentation Index
> Fetch the complete documentation index at: https://documentation.onesignal.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Mixpanel

> Integrate OneSignal with Mixpanel to sync behavioral cohorts, track message events, and target Users across push, email, SMS, and in-app channels.

Integrate OneSignal with [Mixpanel](https://mixpanel.com) to enable real-time, behavior-based targeting across push, in-app, email, and SMS. This app-level integration supports two data flows:

* **Message events → Mixpanel**: Track delivery, clicks, failures, and more for all channels.
* **Cohorts → OneSignal**: Sync behavior-based Mixpanel cohorts as targeting filters in OneSignal.

The Mixpanel integration does not send Mixpanel events to OneSignal as [custom events](./custom-events). See [Can I send custom events from Mixpanel to OneSignal?](#can-i-send-custom-events-from-mixpanel-to-onesignal) for the recommended workaround.

***

## Requirements

* [Mixpanel Account](https://mixpanel.com/)
* [OneSignal Paid Plan](https://onesignal.com/pricing)
* OneSignal app with [Users](./users) and External ID set.

<Info>
  This integration does not create Users. It maps Users in Mixpanel to existing Users in OneSignal by matching identifiers.
</Info>

***

## Setup

### Add Mixpanel to OneSignal (Outbound)

Sends OneSignal message events into your Mixpanel project.

<Steps>
  <Step title="Open the integration in OneSignal">
    In OneSignal, navigate to **Data > Integrations > Mixpanel** and click **Activate**.

    <Frame caption="Enable Mixpanel integration in OneSignal">
      <img src="https://mintcdn.com/onesignal/Xl2NHJvxakrK4JbL/images/docs/f5dfbab5a6c41ae816e34401b7fa5a8624e15d43f90ad723c4c7b2166dbd66de-Screenshot_2025-03-18_at_8.15.13_AM.png?fit=max&auto=format&n=Xl2NHJvxakrK4JbL&q=85&s=4c5a9ba2e4e2a2c8b2e2b2b2376253f1" alt="OneSignal Integrations page with Mixpanel selected" width="1150" height="458" data-path="images/docs/f5dfbab5a6c41ae816e34401b7fa5a8624e15d43f90ad723c4c7b2166dbd66de-Screenshot_2025-03-18_at_8.15.13_AM.png" />
    </Frame>
  </Step>

  <Step title="Add your Mixpanel project token">
    In Mixpanel, find your [Project Token](https://docs.mixpanel.com/docs/orgs-and-projects/managing-projects#find-your-project-tokens) and paste it into OneSignal.
  </Step>

  <Step title="Set your data residency">
    Check your [Data Residency](https://docs.mixpanel.com/docs/orgs-and-projects/managing-projects#project-details). If you use Mixpanel's EU servers, check the **Send events exclusively to Mixpanel's EU Residency Server** box.
  </Step>

  <Step title="Select message events and activate">
    Select which OneSignal message events to send to Mixpanel, then click **Activate**.

    <Frame caption="Mixpanel settings in OneSignal">
      <img src="https://mintcdn.com/onesignal/9_Q1FZLh6C0BFLq-/images/docs/bc980ae-Screenshot_2024-06-04_at_10.18.59_AM.png?fit=max&auto=format&n=9_Q1FZLh6C0BFLq-&q=85&s=b98514269a60a2144c1dc0334969e7d3" alt="OneSignal Mixpanel integration settings showing event selection" width="2216" height="1412" data-path="images/docs/bc980ae-Screenshot_2024-06-04_at_10.18.59_AM.png" />
    </Frame>
  </Step>
</Steps>

### Add OneSignal to Mixpanel (Inbound)

Sends Mixpanel cohorts into OneSignal as Segment filters.

<Steps>
  <Step title="Add OneSignal in Mixpanel">
    In your Mixpanel **Integrations**, add OneSignal.

    <Frame caption="Add OneSignal integration in Mixpanel">
      <img src="https://mintcdn.com/onesignal/KSCNwSpBCNSQ8xdF/images/docs/mixpanel-integration.png?fit=max&auto=format&n=KSCNwSpBCNSQ8xdF&q=85&s=b4e6bc1f405b2087b455b2942ce5aecd" alt="Mixpanel integrations catalog with OneSignal selected" width="2986" height="1300" data-path="images/docs/mixpanel-integration.png" />
    </Frame>
  </Step>

  <Step title="Name the connector">
    Set the **Connector Name** to something identifiable like `OneSignal - APP_NAME`, where `APP_NAME` is your OneSignal app name.
  </Step>

  <Step title="Add your OneSignal credentials">
    Enter the **App ID** and **API Key** from your OneSignal app's **Settings > [Keys & IDs](./keys-and-ids)** page.
  </Step>
</Steps>

### User ID mapping

The OneSignal **[External ID](./users)** must match the Mixpanel **User ID Property** you select (for example, `user_id`). Cohort syncing and message event tracking only work when this mapping is exact.

<Steps>
  <Step title="Select the User ID Property in Mixpanel">
    In the Mixpanel OneSignal connector, choose the **User ID Property** that holds the same value as the OneSignal External ID.

    <Frame caption="Mixpanel dashboard for setting the OneSignal properties">
      <img src="https://mintcdn.com/onesignal/56ctKxZSV4m5VEkn/images/docs/b5e818708efcc73ea8eb0cccb6542c205069b395978b8fa796af28d816b33356-Screenshot_2025-03-18_at_11.22.54_AM.png?fit=max&auto=format&n=56ctKxZSV4m5VEkn&q=85&s=c161191d039f187a20df7201d9ca71db" alt="Mixpanel OneSignal connector settings showing User ID property selection" width="864" height="900" data-path="images/docs/b5e818708efcc73ea8eb0cccb6542c205069b395978b8fa796af28d816b33356-Screenshot_2025-03-18_at_11.22.54_AM.png" />
    </Frame>
  </Step>

  <Step title="Confirm the property exists on Mixpanel user profiles">
    Open **Mixpanel > Users** and verify the **User ID Property** you selected appears in user profile properties.

    <Frame caption="Mixpanel > Users > User Profile Properties">
      <img src="https://mintcdn.com/onesignal/YOTSrtBSoqdrJ37A/images/docs/4416681-small-Screenshot_2023-05-15_at_9.54.14_AM.png?fit=max&auto=format&n=YOTSrtBSoqdrJ37A&q=85&s=e89ad019a61077ae376fc92e1a1eb87a" alt="Mixpanel user profile properties list" width="521" height="1024" data-path="images/docs/4416681-small-Screenshot_2023-05-15_at_9.54.14_AM.png" />
    </Frame>
  </Step>

  <Step title="Confirm values match the OneSignal External ID">
    Open the User in **OneSignal > Audience > Users** and confirm the External ID matches the Mixpanel **User ID Property** value exactly.

    <Frame caption="OneSignal > Audience > Users > External ID">
      <img src="https://mintcdn.com/onesignal/Z6xkXGfmy814If53/images/docs/e6853b59781b29ccbd264f97925830986605ec5514d02b5435c27ec896804a89-Screenshot_2025-03-18_at_10.22.25_AM.png?fit=max&auto=format&n=Z6xkXGfmy814If53&q=85&s=9a0b4237233c0492901853d72a6b1b63" alt="OneSignal user profile showing External ID" width="2764" height="686" data-path="images/docs/e6853b59781b29ccbd264f97925830986605ec5514d02b5435c27ec896804a89-Screenshot_2025-03-18_at_10.22.25_AM.png" />
    </Frame>
  </Step>
</Steps>

<Warning>
  If you map the Mixpanel `$distinct_id` to the OneSignal External ID, only the top value in the Distinct ID list matches.

  In the example below, only `890ea9b1-9024-4fb9-a92f-152ba67dd21a` will match. The integration cannot match `109768518080488203109` or `$device:1880c06821f1b3-052354675cde95-1d525634-1fa400-1880c06821f1b3`.

  <Frame caption="Use caution when setting Distinct ID if used for the User ID Property mapping">
    <img src="https://mintcdn.com/onesignal/Xl2NHJvxakrK4JbL/images/docs/e7b80eb-small-Screenshot_2023-05-15_at_10.07.10_AM.png?fit=max&auto=format&n=Xl2NHJvxakrK4JbL&q=85&s=ef1999c6f01a48063d98e7e2ea330052" alt="Mixpanel Distinct ID example showing multiple values" width="464" height="314" data-path="images/docs/e7b80eb-small-Screenshot_2023-05-15_at_10.07.10_AM.png" />
  </Frame>
</Warning>

<Check>
  Click **Continue** when finished. You can now export cohorts from Mixpanel to OneSignal and collect message events from OneSignal in Mixpanel.
</Check>

***

## Export Mixpanel cohorts to OneSignal

Sync Mixpanel cohorts to OneSignal using the matching External ID configured above. Exporting **does not create Users** — each User must already exist in OneSignal.

<Steps>
  <Step title="Create a cohort in Mixpanel">
    In Mixpanel, create a cohort containing the Users you want to target.
  </Step>

  <Step title="Export to OneSignal">
    Click **Options > Export to... > *The OneSignal Connection name***.

    <Frame caption="How to export a Mixpanel cohort to OneSignal">
      <img src="https://mintcdn.com/onesignal/tNi1OgLc_p9hiq7_/images/docs/187698db55979af5f5c94d672ada1e0c8d7329d600a650e3115b77077ef99237-Screenshot_2025-03-18_at_12.04.16_PM.png?fit=max&auto=format&n=tNi1OgLc_p9hiq7_&q=85&s=fce16e4cde30d69f3b24a947cf71c937" alt="Mixpanel cohort export menu with OneSignal destination" width="2432" height="1008" data-path="images/docs/187698db55979af5f5c94d672ada1e0c8d7329d600a650e3115b77077ef99237-Screenshot_2025-03-18_at_12.04.16_PM.png" />
    </Frame>
  </Step>

  <Step title="Choose a sync frequency">
    Select how often Mixpanel should sync the cohort, then click **Begin Sync**.

    <Frame caption="Mixpanel frequency options">
      <img src="https://mintcdn.com/onesignal/9_Q1FZLh6C0BFLq-/images/docs/c6b36cedac01d722acaa4240225ea6d10519458682f4c2844d681b8ee34b236e-Screenshot_2025-03-18_at_12.12.06_PM.png?fit=max&auto=format&n=9_Q1FZLh6C0BFLq-&q=85&s=5bb3a035bfb3bea7d78553e86ccb943b" alt="Mixpanel cohort sync frequency selection dialog" width="860" height="896" data-path="images/docs/c6b36cedac01d722acaa4240225ea6d10519458682f4c2844d681b8ee34b236e-Screenshot_2025-03-18_at_12.12.06_PM.png" />
    </Frame>
  </Step>
</Steps>

### OneSignal Segment creation

The synced cohort appears as a **Mixpanel Segment filter**. OneSignal automatically creates a Segment for the cohort if:

* The Users in the Mixpanel cohort also exist in OneSignal with a matching External ID.
* You have not exceeded your [Segment limit](./segmentation#segment-limit) in OneSignal.

<Note>
  OneSignal requires at least one matching User to create the Segment. After creation, the Segment remains in OneSignal even if the cohort later has no Users — it shows as empty until matching Users are added again.
</Note>

<Frame caption="Creating a Segment from a Mixpanel cohort">
  <img src="https://mintcdn.com/onesignal/jBdBk5XvQR5eKOks/images/docs/7b01785ad5a5f85377bdb20e664e5d5c38280cff56373d70726621569668907d-Screenshot_2025-03-18_at_12.38.47_PM.png?fit=max&auto=format&n=jBdBk5XvQR5eKOks&q=85&s=3ba94cf6588a4158a86e77c4a23c3e34" alt="OneSignal Segment builder using Mixpanel Cohort filter" width="1444" height="818" data-path="images/docs/7b01785ad5a5f85377bdb20e664e5d5c38280cff56373d70726621569668907d-Screenshot_2025-03-18_at_12.38.47_PM.png" />
</Frame>

***

## Track message events in Mixpanel

OneSignal sends the following message events to Mixpanel in real time. Select which events to send in **Data > Integrations > Mixpanel**.

To test, send yourself a message from OneSignal, then navigate to your user profile page in Mixpanel. Within the Activity Feed, you should see the events populate.

<Frame caption="Mixpanel activity feed with OneSignal message events">
  <img src="https://mintcdn.com/onesignal/9_Q1FZLh6C0BFLq-/images/docs/c344970fd85bda82f9b6bedf1700a9cbb91afd63afc9fe1e866c42e1b380770e-Screenshot_2025-03-18_at_1.59.23_PM.png?fit=max&auto=format&n=9_Q1FZLh6C0BFLq-&q=85&s=9ca542f553f6c08a15ca99d52d68be2b" alt="Mixpanel user activity feed showing OneSignal message events" width="2420" height="1654" data-path="images/docs/c344970fd85bda82f9b6bedf1700a9cbb91afd63afc9fe1e866c42e1b380770e-Screenshot_2025-03-18_at_1.59.23_PM.png" />
</Frame>

### Message events

#### Push

| Message Event Kind (OneSignal) | Message Event Name (Mixpanel) | Event Description                                                          |
| ------------------------------ | ----------------------------- | -------------------------------------------------------------------------- |
| Push Delivered                 | Message Sent                  | Push notification successfully delivered to the push services (FCM, APNs). |
| Push Received                  | Message Received              | Push notification successfully received.                                   |
| Push Clicked                   | App Opened from Push          | Push notification tapped on device.                                        |
| Push Failed                    | Push Failed                   | Push failed to send. Check the failed message report in OneSignal.         |
| Push Unsubscribed              | Push Unsubscribed             | The [Subscription](./subscriptions) unsubscribed from push.                |

#### In-app

| Message Event Kind (OneSignal) | Message Event Name (Mixpanel) | Event Description                                |
| ------------------------------ | ----------------------------- | ------------------------------------------------ |
| In-App Impression              | Message Sent                  | In-app message successfully displayed on device. |
| In-App Clicked                 | Message Opened                | In-app message clicked on device.                |
| In-App Page Displayed          | In-App Page Displayed         | In-app message page displayed.                   |

#### Email

| Message Event Kind (OneSignal) | Message Event Name (Mixpanel) | Event Description                                                                               |
| ------------------------------ | ----------------------------- | ----------------------------------------------------------------------------------------------- |
| Email Sent                     | Message Sent                  | Email successfully sent.                                                                        |
| Email Received                 | Message Received              | Email received by recipient.                                                                    |
| Email Opened                   | Message Opened                | Email opened by recipient.                                                                      |
| Email Link Clicked             | App Opened from Push          | Email link clicked.                                                                             |
| Email Unsubscribed             | Email Unsubscribed            | Email unsubscribed by recipient.                                                                |
| Email Reported As Spam         | Email Reported as Spam        | Email reported as spam by recipient.                                                            |
| Email Bounced                  | Email Bounced                 | Email returned to sender due to a permanent error.                                              |
| Email Failed                   | Email Failed                  | Could not deliver the email to the recipient's inbox.                                           |
| Email Suppressed               | Email Suppressed              | The email address is on your suppression list. Either it bounced or marked your emails as spam. |

#### SMS

| Message Event Kind (OneSignal) | Message Event Name (Mixpanel) | Event Description           |
| ------------------------------ | ----------------------------- | --------------------------- |
| SMS Sent                       | Message Sent                  | SMS sent to recipient.      |
| SMS Failed                     | SMS Failed                    | SMS failed to send.         |
| SMS Delivered                  | Message Received              | SMS successfully delivered. |
| SMS Undelivered                | SMS Undelivered               | The SMS could not be sent.  |

### Event properties

Every event sent from OneSignal to Mixpanel includes these properties:

| PROPERTY NAME        | DESCRIPTION                                             |
| -------------------- | ------------------------------------------------------- |
| **Distinct ID**      | The external\_id associated with the message            |
| **Message ID**       | The identifier of the discrete message                  |
| **Message Name**     | The message name                                        |
| **Message Title**    | The message title                                       |
| **Message Contents** | The message contents                                    |
| **message\_type**    | The type of message sent, push, in-app, email, SMS      |
| **template\_id**     | The message template used (API and Journey Messages)    |
| **subscription\_id** | The OneSignal-assigned device, email, or SMS identifier |
| **device\_type**     | The device type that received the message               |
| **language**         | The two-character language code of the device           |
| **source**           | `onesignal` (is indicated as the source for all events) |

<Warning>
  Delivery counts may differ between Mixpanel and OneSignal. See [Why doesn't delivery data match?](#why-doesnt-delivery-data-match) for details.
</Warning>

***

## FAQ

### Why don't my cohort and segment counts match?

1. **Missing or mismatched External IDs**
   Only Users with a matching OneSignal External ID and Mixpanel User ID are included. This integration does not create Users or Subscriptions.

2. **Unsubscribed Users**
   OneSignal Segments only display the count for subscribed [Subscriptions](./subscriptions). Unsubscribed Subscriptions are available for Journeys or In-App Messages.

For example, if a Mixpanel cohort has 10 Users but the OneSignal Segment shows 8 Subscriptions, the 2 missing Users may:

* Not exist in OneSignal or have an incorrect External ID.
* Have unsubscribed Subscriptions.

To verify, check the **Audience > Users** tab in OneSignal to see if the Users exist and have active Subscriptions.

### Do unsubscribed Users sync from Mixpanel?

Yes, but they are excluded from the OneSignal Segment counts at this time. You can still message them via Journeys or In-App Messages if they have other [Subscriptions](./subscriptions) or their Subscription type supports it.

### Why doesn't delivery data match?

A single User may have multiple [Subscriptions](./subscriptions) (push devices, email addresses, phone numbers). Each Subscription generates its own delivery event. For example:

* 1 user = 2 Android + 1 iOS + 2 Web = 5 push Subscriptions
* 1 push message = up to 5 sent/received/clicked events

Use the `subscription_id` in event properties to trace the exact source.

To troubleshoot missing events:

* Ensure `OneSignal.login` is called whenever a user is identified to set the External ID.
* Verify that `OneSignal.logout` isn't removing the External ID.
* Check API requests or CSV uploads that may alter the External ID.

### Can I send custom events from Mixpanel to OneSignal?

Not natively. The Mixpanel integration supports message events (OneSignal → Mixpanel) and cohort syncing (Mixpanel → OneSignal), but does not include a built-in custom event destination. Unlike [Amplitude](./amplitude), Mixpanel has no native OneSignal events destination.

To route Mixpanel behavioral events into OneSignal as [custom events](./custom-events) that trigger Journeys or Segments, use a third-party connector like [Vendo](https://www.vendodata.com/use-cases/integrate-mixpanel-with-onesignal).

### How can I send user/subscription events?

User and subscription-level events (e.g., permission granted, user login/logout) are not automatically sent.

The OneSignal SDK has event listeners that can be used to track these events for you to send to Mixpanel:

* User State Observer: [Mobile SDK](./mobile-sdk-reference#addobserver-user-state), [Web SDK](./web-sdk-reference#addeventlistener-user-state)
* Permission Observer: [Mobile SDK](./mobile-sdk-reference#addpermissionobserver-push), [Web SDK](./web-sdk-reference#permissionchange)

***

## Related pages

<Columns cols={2}>
  <Card title="Analytics overview" icon="chart-line" href="./analytics-overview">
    Overview of OneSignal analytics, delivery metrics, and event tracking.
  </Card>

  <Card title="Custom events" icon="bolt" href="./custom-events">
    Track User actions to trigger Journeys or power analytics.
  </Card>
</Columns>

***

<Info>
  Need help?

  Chat with our Support team or email `support@onesignal.com`

  Please include:

  * Details of the issue you're experiencing and steps to reproduce if available
  * Your OneSignal App ID
  * The External ID or Subscription ID if applicable
  * The URL to the message you tested in the OneSignal Dashboard if applicable
  * Any relevant [logs or error messages](/docs/en/capturing-a-debug-log)

  We're happy to help!
</Info>
