> For the complete documentation index, see [llms.txt](https://docs.abtasty.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.abtasty.com/feature-experimentation-and-rollout/feature-experimentations-integrations/mixpanel-feature-experimentation-integration/import-mixpanel-audience-to-feature-experimentation.md).

# Import Mixpanel Audience to Feature Experimentation

{% hint style="warning" %}
**flagship\_user\_id**

For the user matching to be achieved and let FE\&R target your Mixpanel cohorts, the flagship\_user\_id must be pushed back to Mixpanel (it is used as a joint key).

To do that, you need to ensure a $flagship\_user\_id user property is declared on Mixpanel user profiles:

* The flagship\_user\_id is the Visitor ID already sent to FE\&R (more info [here](https://docs.developers.flagship.io/docs/universal-collect-documentation#visitor-id))
* You can declare the flagship\_user\_id as a user property in you Mixpanel tracking code:
* ```
  mixpanel.people.set({
  $flagship_user_id: vid
  });
  ```

  Or you can declare the flagship\_user\_id as a user property with the Mixpanel SDK

  ```
   mixpanel.people.set(properties: ["$flagship_user_id":vid])
  ```

{% endhint %}

The Mixpanel integration allows you to target the cohorts created in Mixpanel with AB Tasty.

{% hint style="info" %}
**Mixpanel Cohorts**

Cohorts are groups of users defined by a chosen set of criteria, like a shared property or sequence of events. For more information on how to use cohorts please refer to the [Mixpanel documentation](https://help.mixpanel.com/hc/en-us/articles/115005708186-Cohorts-Overview-)
{% endhint %}

Once the integration is active on FE\&R you need to activate the integration on Mixpanel.

This article will walk you through the different steps to setup the integration on Mixpanel side and to export your cohorts.

### Enable the integration on Mixpanel

<figure><img src="/files/myvTWnWC6YzmaIqBRjKO" alt=""><figcaption></figcaption></figure>

You must be a Mixpanel project Admin to enable the FE\&R integration:

* Go to Integrations under the Data Management tab in the top navigation bar
* In the Integrations list, select FE\&R, and click Connect
* To set up the FE\&R integration you need to enter your account’s API Key. Copy paste the API Key of your FE\&R account. Click “Continue”. ([documentation on API keys](/feature-experimentation-and-rollout/sdk-and-environments/managing-environments.md))

The AB Tasty integration will show a "Connected" tag once the connection is established.

### Export the cohorts from Mixpanel to FE\&R

![Capture\_d\_e\_cran\_2022-05-31\_a\_\_17.57.47.png](/files/4Tc64JpVbNdIPHM6SaLP)

Now that the connection between the tools is established, we have to export the desired cohorts to FE\&R to target them.

* Click 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 Flagship. Select either one-time sync or dynamic sync. Click Start Sync.

Mixpanel Documentation on cohort exports is available [here](https://help.mixpanel.com/hc/en-us/articles/115005708186-Cohorts-Overview-).

Congratulations, the integration is now set up and you can target your Mixpanel cohorts with FE\&R!

{% hint style="warning" %}
**Technical specifications**

* Mixpanel sends the cohorts every 15 minutes in case of a recurring exports
* For the user matching to be achieved the flagship\_user\_id must be pushed.
  {% endhint %}

For global information on how to retrieve audiences or use your cohort, please refer to [this page](https://docs.abtasty.com/flagship-deprecated/integrations/retrieving-your-third-party-tools-audiences-in-ab-tasty-feature-experimentation-rollouts).


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.abtasty.com/feature-experimentation-and-rollout/feature-experimentations-integrations/mixpanel-feature-experimentation-integration/import-mixpanel-audience-to-feature-experimentation.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
