> ## Documentation Index
> Fetch the complete documentation index at: https://v1-docs.adapt.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Mixpanel

> Connect Mixpanel to Adapt to analyze events, funnels, retention, and segmentation

Connect Mixpanel to Adapt so it can read your product analytics. Reading data through Mixpanel's Query API requires a service account and your project ID.

## Set up credentials

**1. Find your project token**

In Mixpanel, open the settings gear and go to **Project Settings > Access
Keys**. Copy the **Project Token**. Note that the token is used for data
ingestion, not for reading data.

**2. Find your project ID**

Go to **Organization Settings > Projects**, open your project, and copy the
**Project ID**.

**3. Create a service account**

With Owner or Admin permissions, go to **Organization Settings > Service
Accounts** and create a new service account. Assign it a role with access to
your project.

**4. Copy the username and secret**

Copy the service account **username** and **secret** now. Mixpanel shows the
secret only once, so store it securely.

> [!NOTE]
>
> To read analytics data (events, funnels, retention, segmentation), Adapt uses
> Mixpanel's Query API, which requires the **service account username and
> secret** plus the **project ID**. The project token on its own is for
> ingestion and cannot query data, so provide the service account and project ID
> even though they are listed as optional below.

## Connect to Adapt

**1. Open Integrations**

In Adapt, go to **Settings > Integrations**.

**2. Find Mixpanel**

Search for **Mixpanel** and select it from the catalog.

**3. Start the connection**

Click **Connect** to open the connection form.

**4. Add your credentials**

Enter the values you gathered above, then click **Add connection**:

| Secret Name | Value |
| - | - |
| `MIXPANEL_TOKEN` | Your project token |
| `MIXPANEL_PROJECT_ID` | Your project ID (optional) |
| `MIXPANEL_SERVICE_ACCOUNT_USERNAME` | Service account username (optional) |
| `MIXPANEL_SERVICE_ACCOUNT_SECRET` | Service account secret (optional) |

You can rename the connection and choose whether it is shared with your
organization or kept personal to you.

**5. Test the connection**

Ask Adapt about your top events over the last 7 days.

### Security

* Credentials are encrypted at rest with AES-256
* Give the service account only the project access and role it needs
* Optionally set an expiration on the service account to support credential rotation
* The service account secret is shown only once; store it securely and delete the account to revoke access
* Never share your credentials or commit them to source control

## Capabilities

Adapt can read and analyze your Mixpanel product analytics through the Query API.
Ask questions about events, funnels, retention, and segmentation in natural
language.

### Examples

```
What were my top events last week?
```

```
Build a funnel from signup to purchase
```

```
Show 30-day retention for new users
```

```
Segment active users by country this month
```


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.