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.
This integration is currently in open beta.
OneSignal also supports an integration to send messaging interactions to Mixpanel - for more details, see OneSignal's Mixpanel integration.
You must be a Mixpanel project admin to enable the OneSignal integration. Read more about project roles and permissions here.
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
In order to match an exported Mixpanel user to OneSignal, the user's Mixpanel profile must contain a user property, "$onesignal_user_id", whose value is a string representing that person's Player ID in OneSignal. In your implementation, reference the Player ID from OneSignal's SDK 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 two hours. The exported cohort will be updated every two hours 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
OneSignal offers the ability to forward campaign interaction events to Mixpanel. For more detail, please refer to OneSignal's integration guide.