Export Mixpanel cohorts to OneSignal to create custom segments that you can apply in your OneSignal campaigns. Manage the OneSignal integration from the Mixpanel integrations page.
OneSignal also supports an integration to send messaging interactions to Mixpanel - for more details, see OneSignal's Mixpanel integration.
Permissions and Account Requirements
You must be a Mixpanel project admin to enable the OneSignal integration. Read more about project roles and permissions here.
Additionally, you must have a paid OneSignal plan to use the integration. If you attempt to sync cohorts while on a free OneSignal plan, you will receive the following error: "App may not submit cohort updates from Mixpanel".
Enable the Integration
To enable the integration, select Integrations under the Data Management tab in the top navigation bar:
From the Integrations page, select the OneSignal dropdown, and select Connect
You will need to provide two credentials to authorize the connection: API Key and App ID. You can find these values in your OneSignal settings page.
The OneSignal integration will show a "Connected" tag in the UI once the connection succeeds.
Matching Users between OneSignal and Mixpanel
Mixpanel only exports identified user profiles to match to OneSignal - users without user profiles (i.e. anonymous users) will not export.
In order to match an exported Mixpanel user to OneSignal, the user's Mixpanel profile must contain a user property, "$onesignal_user_id". The value of this property is a string representing either that person's Player ID or External User ID in OneSignal. OneSignal recommends using External User ID, as it's a cross-platform user identifier and allows for OneSignal's email capabilities. In your implementation, reference the Player ID from OneSignal's SDK or reference your External User ID and set the user property "$onesignal_user_id" on the user's Mixpanel profile.
User profiles without this user property will not export to OneSignal - it is a requirement for user matching.
In addition, when its ingestion service detects calls setting this user property, Mixpanel will also alias the value of "$onesignal_user_id" to the user's distinct_id when setting the "$onesignal_user_id" user property. This ensures that messaging events passed from OneSignal campaigns to Mixpanel still attribute to the correct user.
Export a Cohort
You can export a cohort to OneSignal from the Cohorts report. Navigate to Cohorts by clicking Cohorts under Users in the navigation bar.
Select the cohort that you want to export. Click on the three-dot icon on the right side of the cohort.
Click Export to > OneSignal. Select either one-time sync or dynamic sync. Click Start Sync.
This integration supports two types of exports: one-time export and dynamic sync.
In a one-time export, Mixpanel sends OneSignal a static export of users who currently qualify for the cohort. The cohort data will not be updated in OneSignal after a one-time export.
In dynamic sync, Mixpanel initiates sync between a cohort and OneSignal every fifteen minutes. The exported cohort will be updated every fifteen minutes to reflect the most recent list of users in a cohort.
When you generate a one-time export or dynamic sync, it overwrites the previous export with an updated export that reflects users who qualify for the cohort at the time of export.
Select the Segment in OneSignal
Once the export completes, you will see a Segment reflecting the set of users from your Mixpanel cohort:
OneSignal events into Mixpanel & MTU exemptions
OneSignal offers the ability to forward campaign interaction events to Mixpanel. For more detail, please refer to OneSignal's integration guide.
Because OneSignal's event structure follows Mixpanel's naming convention for messaging events, it will have the same exemptions outlined in the MTU calculation guide for which events do not count towards MTU tallies. Message delivery events will not count towards a user being in MTU counts, while message engagement events will.