Skip to main content

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.

Integrate OneSignal with Mixpanel 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. See Can I send custom events from Mixpanel to OneSignal? for the recommended workaround.

Requirements

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

Setup

Add Mixpanel to OneSignal (Outbound)

Sends OneSignal message events into your Mixpanel project.
1

Open the integration in OneSignal

In OneSignal, navigate to Data > Integrations > Mixpanel and click Activate.
OneSignal Integrations page with Mixpanel selected
2

Add your Mixpanel project token

In Mixpanel, find your Project Token and paste it into OneSignal.
3

Set your data residency

Check your Data Residency. If you use Mixpanel’s EU servers, check the Send events exclusively to Mixpanel’s EU Residency Server box.
4

Select message events and activate

Select which OneSignal message events to send to Mixpanel, then click Activate.
OneSignal Mixpanel integration settings showing event selection

Add OneSignal to Mixpanel (Inbound)

Sends Mixpanel cohorts into OneSignal as Segment filters.
1

Add OneSignal in Mixpanel

In your Mixpanel Integrations, add OneSignal.
Mixpanel integrations catalog with OneSignal selected
2

Name the connector

Set the Connector Name to something identifiable like OneSignal - APP_NAME, where APP_NAME is your OneSignal app name.
3

Add your OneSignal credentials

Enter the App ID and API Key from your OneSignal app’s Settings > Keys & IDs page.

User ID mapping

The OneSignal External ID 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.
1

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.
Mixpanel OneSignal connector settings showing User ID property selection
2

Confirm the property exists on Mixpanel user profiles

Open Mixpanel > Users and verify the User ID Property you selected appears in user profile properties.
Mixpanel user profile properties list
3

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.
OneSignal user profile showing External ID
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.
Mixpanel Distinct ID example showing multiple values
Click Continue when finished. You can now export cohorts from Mixpanel to OneSignal and collect message events from OneSignal in Mixpanel.

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.
1

Create a cohort in Mixpanel

In Mixpanel, create a cohort containing the Users you want to target.
2

Export to OneSignal

Click Options > Export to… > The OneSignal Connection name.
Mixpanel cohort export menu with OneSignal destination
3

Choose a sync frequency

Select how often Mixpanel should sync the cohort, then click Begin Sync.
Mixpanel cohort sync frequency selection dialog

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 in OneSignal.
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.
OneSignal Segment builder using Mixpanel Cohort filter

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.
Mixpanel user activity feed showing OneSignal message events

Message events

Push

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 tapped on device.
Push FailedPush FailedPush failed to send. Check the failed message report in OneSignal.
Push UnsubscribedPush UnsubscribedThe Subscription unsubscribed from push.

In-app

Message Event Kind (OneSignal)Message Event Name (Mixpanel)Event Description
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 displayed.

Email

Message Event Kind (OneSignal)Message Event Name (Mixpanel)Event Description
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.
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 a 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

Message Event Kind (OneSignal)Message Event Name (Mixpanel)Event Description
SMS SentMessage SentSMS sent to recipient.
SMS FailedSMS FailedSMS failed to send.
SMS DeliveredMessage ReceivedSMS successfully delivered.
SMS UndeliveredSMS UndeliveredThe SMS could not be sent.

Event properties

Every event sent from OneSignal to Mixpanel includes these properties:
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-assigned device, email, or 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)
Delivery counts may differ between Mixpanel and OneSignal. See Why doesn’t delivery data match? for details.

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. 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 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.

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, Mixpanel has no native OneSignal events destination. To route Mixpanel behavioral events into OneSignal as custom events that trigger Journeys or Segments, use a third-party connector like Vendo.

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:

Analytics overview

Overview of OneSignal analytics, delivery metrics, and event tracking.

Custom events

Track User actions to trigger Journeys or power analytics.

Need help?Chat with our Support team or email support@onesignal.comPlease 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
We’re happy to help!