Skip to main content

Import from Mixpanel

Sync Mixpanel cohorts to Digia Engage through a webhook destination, with optional profile properties.

This guide syncs your Mixpanel cohorts to Digia Engage. Digia gives you a webhook URL, and you add it to Mixpanel as a destination. Mixpanel then sends each cohort's members every 30 minutes, and Digia keeps the matching audience up to date.

By the end, you should have:

  • Mixpanel connected under Data → Connectors, with its webhook URL
  • a Mixpanel webhook destination with a recurring cohort sync
  • one Digia audience per cohort, created automatically on the first batch

Before you start​

Make sure you have:

  • Audiences enabled for your Digia Engage project (see Before you start).
  • A Mixpanel project with permission to add destinations, and at least one cohort.
  • The user ID your app passes to Digia's setUserId. Usually this is the ID your app passes to Mixpanel's identify. See Match your users.
  • To import properties: user verification turned on.

Step 1: Generate the webhook in Digia​

  1. Open Data → Connectors.
  2. On the Mixpanel card, click + Connect.
  3. Click Generate Inbound Webhook.
Mixpanel Inbound Webhook Required dialog
Generate a webhook URL dedicated to this project.

Step 2: Copy the URL and choose the match field​

Click Copy URL next to the Inbound Webhook URL.

warning

Treat this URL like a password. Anyone who has it can send audience data to your project.

Under Match users by, the default tries $user_id, then mixpanel_distinct_id, then distinct_id, and uses the first one a member has. This fits most apps that call Mixpanel's identify with their user ID. If yours uses another property, pick or type it and click Save.

Connect Mixpanel screen with Inbound Webhook URL, Match users by and setup instructions
Copy the webhook URL and confirm which field matches your app's user ID.

Step 3: Add the destination in Mixpanel​

  1. In Mixpanel, go to Data → Destinations.
  2. Click Add Destination, select Webhook and click Connect.
  3. Paste the URL you copied. Leave authentication off.
  4. To use properties in campaign text, pick them under Properties to Export.
Screenshot coming soon

Mixpanel: the webhook destination with the URL and Properties to Export. Until then, see Mixpanel's Webhooks integration docs.

Step 4: Sync a cohort​

  1. On the destination's Syncs tab, click Add Cohort Sync.
  2. Choose your cohort and pick Recurring Sync.
Screenshot coming soon

Mixpanel: adding a recurring cohort sync on the Syncs tab. Until then, see Mixpanel's cohort sync docs.

Mixpanel sends the full cohort first, then changes every 30 minutes. Digia creates the audience on the first batch, named after the cohort. Repeat for each cohort you want.

Back in Digia, click Done.

Step 5: Check the audience​

Open Data → Audiences. Until Mixpanel sends its first batch, the source shows Waiting for first batch from Mixpanel. Then the audience appears with its size and match rate.

Mixpanel audience expanded on the Audiences tab, showing its source, delivery and webhook URL
The audience appears after Mixpanel\'s first batch. Delivery shows when the last batch arrived.

Webhook audiences have no Sync now button; they update on Mixpanel's schedule.

If membership drifts

If a batch from Mixpanel is missed, Digia can't recover it on its own. If an audience looks out of step with Mixpanel, re-run the cohort sync in Mixpanel.

Now use the audience in a campaign.

Import properties​

Once data has arrived, open Data → Connectors and click Settings on the Mixpanel row. Pick the properties to import and name each one, then click Save variables. Only properties you chose under Properties to Export in Mixpanel are available.

Mixpanel sends a person when they join or leave, not when a property changes. Values are as of when they joined, so prefer properties that rarely change, such as city or plan.

Troubleshooting​

SymptomWhat to do
Waiting for first batch from Mixpanel for a long timeCheck the cohort sync is added and recurring, and the URL is exactly the one Digia showed. The first batch can take up to 30 minutes.
A property you expected isn't listedAdd it under Properties to Export in Mixpanel, then wait for the next sync.
Mixpanel turned the sync offMixpanel stops a sync after errors. Check the URL, then turn the sync back on.
Only {n}% match an app userCheck Match users by against what your app passes to setUserId.