> For the complete documentation index, see [llms.txt](https://docs.customerglu.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.customerglu.com/third-party-integrations/cohort/mixpanel.md).

# Mixpanel

This guide shows how to integrate Mixpanel cohorts with a custom webhook, allowing real-time export of segmented user data to your system.

## Prerequisites

Before setting up the integration, ensure the following:

* A paid Mixpanel plan.
* Access of CutomerGlu Dashboard.

## Steps To Integrate With Mixpanel

1. Log in to **CustomerGlu**, click on the **Dev Console**.

<figure><img src="https://1004846827-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-M0ahLW2WavtwcwNbSR9%2Fuploads%2FVCsSKSULqWftVtux2M3z%2Fimage.png?alt=media&amp;token=6677f4ff-1332-4a4d-820f-4b15c936318e" alt="" width="563"><figcaption></figcaption></figure>

2. Click on **Mixpanel** Integration.

<figure><img src="https://1004846827-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-M0ahLW2WavtwcwNbSR9%2Fuploads%2FwzdhklI93bTz6l4DSpTi%2FScreenshot%202024-08-23%20at%2011.58.34%E2%80%AFAM.png?alt=media&amp;token=c90aebb4-3f13-4a69-aff7-cb2a228c702b" alt="" width="563"><figcaption></figcaption></figure>

3. &#x20;Copy your **Webhook URL**, **Username** and **Password** from her&#x65;**.**&#x20;

<figure><img src="https://1004846827-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-M0ahLW2WavtwcwNbSR9%2Fuploads%2FkYr5vocT7URE7O2AmTaQ%2FScreenshot%202024-08-23%20at%2012.03.09%E2%80%AFPM.png?alt=media&amp;token=2ca8c1f6-83ae-49c2-a635-7777c88541c2" alt="" width="563"><figcaption></figcaption></figure>

4. Login to **Mixpanel** Dashboard > **Data Management** > **Integrations**.

<figure><img src="https://1004846827-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-M0ahLW2WavtwcwNbSR9%2Fuploads%2FceDAwHED1E72plPmCEal%2FScreenshot%202024-08-23%20at%2012.12.02%E2%80%AFPM.png?alt=media&amp;token=29945b2b-4c0e-42dc-81f5-af0b9b8169e7" alt="" width="563"><figcaption></figcaption></figure>

5. Go **Custom Webhook** > **Add Connection**.

<figure><img src="https://1004846827-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-M0ahLW2WavtwcwNbSR9%2Fuploads%2F3BoyZQ0LHUguG7Ij0DNa%2FScreenshot%202024-08-23%20at%2012.16.19%E2%80%AFPM.png?alt=media&amp;token=108a8a66-868e-48be-807f-589d5d9c8297" alt="" width="563"><figcaption></figcaption></figure>

6. Fill the details copied from the **CustomerGlu** dashboard.

<figure><img src="https://1004846827-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-M0ahLW2WavtwcwNbSR9%2Fuploads%2F4mm6iSdLPt7cchzI33iF%2FScreenshot%202024-08-23%20at%2012.51.13%E2%80%AFPM.png?alt=media&amp;token=f6f63f0f-5888-4e82-9848-3bc5e2db6eb7" alt="" width="563"><figcaption></figcaption></figure>

7. Click on **Data Management** > **Cohorts**.

<figure><img src="https://1004846827-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-M0ahLW2WavtwcwNbSR9%2Fuploads%2F52m8ePphGbCtFmxjcbM6%2FScreenshot%202024-08-23%20at%2012.29.10%E2%80%AFPM.png?alt=media&amp;token=10967236-3a3d-4ec6-9409-995f4dd3f15c" alt="" width="563"><figcaption></figcaption></figure>

8. Select You **User Segment**  > **Exports** >  Select **CustomerGlu Webhook**.

<figure><img src="https://1004846827-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-M0ahLW2WavtwcwNbSR9%2Fuploads%2FXgUvRnmzPbWcfsgZYJQa%2FScreenshot%202024-08-23%20at%2012.31.52%E2%80%AFPM.png?alt=media&amp;token=af0cecd9-e5b8-4445-b2e2-cd1a77fb3f80" alt="" width="563"><figcaption></figcaption></figure>

9. Select one of the following sync types and then click Begin **Sync**:

<figure><img src="https://1004846827-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-M0ahLW2WavtwcwNbSR9%2Fuploads%2FD80Sum9dRTr81ie8Cpd4%2FScreenshot%202024-08-23%20at%2012.37.08%E2%80%AFPM.png?alt=media&amp;token=e2b0e757-3b7e-46b3-b124-63e618771408" alt="" width="563"><figcaption></figcaption></figure>

* **One-time Sync**

  In the case of one-time sync, Mixpanel sends a one-time list of users who are currently part of the cohort to CustomerGlu. The cohort name defined in the Mixpanel dashboard appears as the segment under the *Segments* list page of the CustomerGlu dashboard.<br>
* **Recurring Sync**

  In the case of dynamic sync, Mixpanel initiates sync between a cohort and CustomerGlu every **30** **minutes**. The imported segment is updated every **30 minutes** to reflect the most recent list of users in the segment. The cohort name defined in the Mixpanel dashboard appears as the segment under the *Segments* list page of the CustomerGlu dashboard.

{% hint style="info" %}
**Delay in Sync Initialization**

The sync initialization from Mixpanel may take **up to 30 minutes** to start exporting users after it is enabled from the Mixpanel dashboard.
{% endhint %}

{% hint style="info" %}
**Mixpanel Cohort Sync**

Every dynamic cohort sync from Mixpanel includes only the users added or removed from the cohort after the last sync.
{% endhint %}
