# Integrating Mixpanel

{% hint style="info" %}
Note: To integrate with Mixpanel, the **Mixpanel project you are using must be on a paid plan**.
{% endhint %}

You can perform various tasks in FlareLane that target Mixpanel cohorts.

Once the integration is complete, devices that match the User IDs in the Mixpanel cohort will be grouped into separate segments.

## How to Start

Step 1. In the Mixpanel console, click **Integrations**.

<figure><img src="https://4151189289-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FSJ35x4PFzaneH3SrvcBt%2Fuploads%2FmemQefzzHZh9jkS78GiG%2F1.mixpanel_integrations_step1.png?alt=media&#x26;token=a86e8f2c-be28-4253-9b28-7b9cb434fdc2" alt=""><figcaption><p><em>Image by FlareLane</em></p></figcaption></figure>

Step 2. From the list of Integrations, select **Custom Webhook**.

<figure><img src="https://4151189289-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FSJ35x4PFzaneH3SrvcBt%2Fuploads%2FHpN48RFhPlRHEYxfHVDi%2F2.mixpanel_integrations_step2.png?alt=media&#x26;token=1bd4bf1d-ceb7-4adf-bc62-7dede882d9e4" alt=""><figcaption><p><em>Image by FlareLane</em></p></figcaption></figure>

Step 3. If this is your first time setting up a Webhook, click the **Connect** button.

<figure><img src="https://4151189289-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FSJ35x4PFzaneH3SrvcBt%2Fuploads%2FiEUwoGSEqPjpBnWrZsrC%2F3.mixpanel_integrations_step3.png?alt=media&#x26;token=70adf433-a030-4e95-abfe-6bcebbb2c738" alt=""><figcaption><p><em>Image by FlareLane</em></p></figcaption></figure>

{% hint style="info" %}
If a Webhook is already connected, click **+Add Connection.**\
\
![](https://4151189289-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FSJ35x4PFzaneH3SrvcBt%2Fuploads%2F97jlm5DQxq6ZBpjcjzqb%2F4.mixpanel_integrations_step3-1.png?alt=media\&token=b10924bf-181a-4e01-9b58-3f07cef7701b)
{% endhint %}

Step 4. Complete the **Custom Webhook** setup by entering the following details:

<figure><img src="https://4151189289-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FSJ35x4PFzaneH3SrvcBt%2Fuploads%2FIrGlZphDw6ucMyJlHi1v%2F5.mixpanel_integrations_step4.png?alt=media&#x26;token=a62f2c4d-752d-4653-b65e-ac7b1eb1de76" alt=""><figcaption><p>Image by FlareLane</p></figcaption></figure>

<table><thead><tr><th width="231">Category</th><th>Input</th></tr></thead><tbody><tr><td>Connector Name</td><td>Enter the name you wish to use (e.g. FlareLane webhook)</td></tr><tr><td>URL</td><td>http://api.flarelane.com/v1/cohort-sync/mixpanel</td></tr><tr><td>Properties to Export</td><td>Enter the USER ID currently in use</td></tr><tr><td>Username</td><td>Enter the ID of the Flarelane project you wish to integrate</td></tr><tr><td>Password</td><td>Enter the API Key of the Flarelane project you want to integrate</td></tr></tbody></table>

***

## Integrating Cohorts

Step 1. Click **Cohorts** in the Mixpanel console as follows:

<figure><img src="https://4151189289-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FSJ35x4PFzaneH3SrvcBt%2Fuploads%2FvyHW2GDQpAApXBCc5HJI%2F7.mixpanel_sync_cohort_step1.png?alt=media&#x26;token=f8b5bdc1-741a-4342-a076-f3f6e6b58fb1" alt=""><figcaption><p><em>Image by FlareLane</em></p></figcaption></figure>

Step 2. Select the cohort you wish to integrate, then click **Export to > Custom Webhook** as follow&#x73;**:**

<figure><img src="https://4151189289-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FSJ35x4PFzaneH3SrvcBt%2Fuploads%2FAKpZCOTClrZyRaK2504o%2F8.mixpanel_sync_cohort_step2.png?alt=media&#x26;token=78d2f1e8-c008-4d14-a13c-1150a8872ee0" alt=""><figcaption><p><em>Image by FlareLane</em></p></figcaption></figure>

Step 3. Select the sync frequency for the cohort as follows:

<figure><img src="https://4151189289-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FSJ35x4PFzaneH3SrvcBt%2Fuploads%2F7g9yDQ1a7lB6dECVadmd%2F9.mixpanel_sync_cohort_step3.png?alt=media&#x26;token=df1a804b-0847-4494-b682-23806b34ebb4" alt=""><figcaption><p><em>Image by FlareLane</em></p></figcaption></figure>

Step 4. Once the sync begins, a separate segment with a Mixpanel badge will be automatically created in **FlareLane segments** as follow&#x73;**:**

<figure><img src="https://4151189289-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FSJ35x4PFzaneH3SrvcBt%2Fuploads%2FwbiH94jO4ffQ5Gy8xE3P%2F10.mixpanel_sync_cohort_step4.png?alt=media&#x26;token=384fa58d-50dd-449f-be90-b5722972fa12" alt=""><figcaption><p>Image by FlareLane</p></figcaption></figure>
