Mixpanel Integration

Sending events to Mixpanel

To send events to Mixpanel, go to Integrations (plug icon) on the left side of your administration page and select Mixpanel to activate the integration.

The integration detects Mixpanel SDK in your application and it uses the window.mixpanel.track() method.

Please note, if you bundled the Mixpanel SDK via their NPM package, you must make the Mixpanel object visible in the window object. We cannot see the Mixpanel SDK in your application otherwise.

Receiving cohort information from Mixpanel

This integration is a part of the Boost plan. 

You can get cohort information to Product Fruits via the Mixpanel webhooks integration. This integration will create the mixpanel_cohorts custom user property. This property is an array of Mixpanel cohort IDs. 

Before you use this integration, consider the following:

  • Mixpanel sends webhook updates only once per 30 minutes (this is one of Mixpanel's limitations). That means you cannot use this integration for real-time content triggering.
  • Emails must be passed into Mixpanel and Product Fruits - we match users based on the Mixpanel $email field (the $ is important as it's a built-in Mixpanel user property). Without emails, we cannot assign cohort data to PF users. 

Setup

To activate the integration, go to Integrations -> Mixpanel and click on Activate.

Then decide whether you want to allow importing users who haven't been tracked in Product Fruits before. If you enable this option, we will create new users using the Mixpanel $email field as the Product Fruits username field.

Now copy the Webhook URL, Username, and Password. Then go to the Mixpanel Custom webhook integration section and create a new webhook connection.

The last thing you need to do is to mark individual cohorts to export. Go to Cohorts in Mixpanel, select the cohorts you want to export, and enable the recurring export.

This will start the sync. The sync is done by Mixpanel in 30-minute intervals (despite the label in the dialog saying 15 minutes). This means you won't see the data immediately.