OneSignal + Mixpanel integration overview

Integrate OneSignal with Mixpanel to send detailed message engagement events and import behavioral user cohorts. This enables real-time targeting based on user behavior to improve onboarding, re-engagement, and conversion.

Key benefits

  • Send message events to Mixpanel: Track delivery, clicks, failures, and more across push, in-app, email, and SMS.
    • Real-time insights – Unify Mixpanel product analytics with OneSignal engagement metrics.
    • Data-driven campaigns – Run smarter re-engagement using Mixpanel’s behavioral segmentation.
  • Import cohorts from Mixpanel: Automatically sync behavior-based cohorts into OneSignal as filters for targeting.
    • Personalized messaging – Trigger contextual OneSignal messages when users enter or exit Mixpanel cohorts.

Requirements

This integration does not create users. It maps the users in Mixpanel to those in OneSignal.


Setup

Add Mixpanel to OneSignal

In OneSignal, navigate to Data > Integrations > Mixpanel and click Activate.

Enable Mixpanel integration in OneSignal

In Mixpanel:

  1. Find your Project Token then copy-paste it into OneSignal.
  2. Check your Data Residency. If using Mixpanel’s EU servers, check the Send events exclusively to Mixpanel’s EU Residency Server box.

Select message events

Select which OneSignal message events you want to send to Mixpanel. When finished, click Activate.

Mixpanel settings in OneSignal

Add OneSignal to Mixpanel

In your Mixpanel Integrations, add OneSignal.

Add OneSignal Integration in Mixpanel

Set the Connector Name as something identifiable like OneSignal - APP_NAME where APP_NAME is the name of the app in OneSignal.

You will need the following data available in OneSignal Settings > Keys & IDs :

  1. App ID
  2. API Key

USER ID mapping

This step is essential for cohort syncing and event tracking to work properly.

To match users across both systems:

  • Use a shared identifier: The External ID in OneSignal must match an Mixpanel User ID Property selected (like user_id).
  • Verify that the selected user property exists across your Mixpanel and OneSignal User Profiles.

Mixpanel's dashboard for setting the OneSignal properties.

Verify the User ID Property you selected is available in your Mixpanel user profile properties.

Mixpanel > Users > User Profile Properties

The same value in Mixpanel for the user profile property must match the External ID in OneSignal.

OneSignal > Audience > Users > External ID

If you match users to OneSignal based on the Mixpanel $distinct_id then it will only match with the top value.

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

Use caution when setting Distinct ID if used for the User ID Property mapping.

Click Continue when finished.

You should now be able to export cohorts from Mixpanel to OneSignal and collect message events from OneSignal to Mixpanel.


Export Mixpanel cohorts to OneSignal

You can sync the users within your Mixpanel cohorts to the users within OneSignal as long as they have the matching User ID/External ID property discussed in the previous step.

Exporting user data from Mixpanel does not create the user in OneSignal, the user must already exist and have the matching External ID.

To export users from Mixpanel to OneSignal:

  1. In Mixpanel, create a cohort.
  2. Click Options > Export to… > The OneSignal Connection name.

How to export a Mixpanel cohort to OneSignal.

  1. Choose sync frequency and press Begin Sync.

Mixpanel frequency options.

OneSignal Segment creation

  • The synced cohort appears in OneSignal as an Mixpanel Segment filter.
  • A Segment for the cohort will automatically be created if the following conditions are met:
    • The users in the Mixpanel Cohort also exist in OneSignal with matching External ID.
    • You must not exceed your Segment limit in OneSignal.

If both conditions are met, OneSignal will automatically generate a Segment using the Mixpanel Cohort filter and name of the Cohort.

How to create a Segment from a Mixpanel Cohort


Track message events in Mixpanel

Once connected, OneSignal will send message events to Mixpanel in real time.

To test this, 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:

Example of Mixpanel activity feed with OneSignal message events.

Message events

These are the message event kinds that OneSignal sends to Mixpanel. You can select which of these events you want to send to your Mixpanel project within the OneSignal Integrations Settings.

Message Event Kind (OneSignal)Message Event Name (Mixpanel)Event Description
Push SentMessage SentPush notification successfully sent.
Push ReceivedMessage ReceivedPush notification successfully received.
Push ClickedApp Opened from PushPush notification touched on device.
Push FailedPush FailedPush failed to be sent. Check the failed message report in OneSignal.
Push UnsubscribedPush UnsubscribedThe Subscription unsubscribed from push.
In-App ImpressionMessage SentIn-App Message successfully displayed on device.
In-App ClickedMessage OpenedIn-App Message clicked on device.
In-App Page DisplayedIn-App Page DisplayedIn-App Message page is displayed.
Email SentMessage SentEmail successfully sent.
Email ReceivedMessage ReceivedEmail received by recipient.
Email OpenedMessage OpenedEmail opened by recipient.
Email Link ClickedApp Opened from PushEmail link clicked on.
Email UnsubscribedEmail UnsubscribedEmail unsubscribed by recipient.
Email Reported As SpamEmail Reported As SpamEmail reported as spam by recipient.
Email BouncedEmail BouncedEmail returned to sender due to permanent error.
Email FailedEmail FailedCould not deliver the email to the recipient’s inbox.
Email SuppressedEmail SuppressedThe email address is on your suppression list. Either it bounced or marked your emails as spam.
SMS SentApp Opened from PushSMS sent to recipient.
SMS FailedSMS FailedSMS failed to send.
SMS DeliveredSMS ReceivedSMS successfully delivered.
SMS UndeliveredSMS UndeliveredThe SMS could not be sent.

Event properties

These are the properties that are present on any events sent from OneSignal to Mixpanel

PROPERTY NAMEDESCRIPTION
Distinct IDThe external_id associated with the message.
Message IDThe identifier of the discrete message.
Message NameThe message name.
Message TitleThe message title.
Message ContentsThe message contents.
message_typeThe type of message sent, push, in-app, email, SMS.
template_idThe message template used (API and Journey Messages).
subscription_idThe OneSignal set device/email/sms identifier.
device_typeThe device type that received the message.
languageThe two character language code of the device.
sourceonesignal (is indicated as the source for all events)

FAQ

Why don’t my cohort & 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 doesn’t create users or subscriptions.

  2. Unsubscribed users OneSignal segments only display the count for subscribed Subscriptions. Unsubscribed Subscriptions are available for Journeys or In-App Messages.

For example, if an 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 messsages if they have other Subscriptions or their Subscription type supports it.

Why doesn’t delivery data match?

A single user may have multiple 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.

How can we 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: