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

# Mixpanel

> Estimated setup time: 15 minutes

## Requirements

* Your Mixpanel's Project ID and Data Residency
* Service account credentials (Username & Secret)

Aampe will periodically pull from Mixpanel's [RAW data export API](https://developer.mixpanel.com/reference/raw-data-export-api).

## Getting the Project ID and Data Residency

1. Login to your Mixpanel account
2. Click on the **Settings** gearwheel placed at the top-right corner of your screen.
3. Select your organization under **ORGANIZATION SETTINGS**.

   <img src="https://mintcdn.com/aameo/lJyhnGhfWZ3pAf15/images/data-ingest/mixpanel/1-organization-setting.png?fit=max&auto=format&n=lJyhnGhfWZ3pAf15&q=85&s=5dee905743121c659af109f1f5a80037" alt="1 Organization Setting Pn" width="1227" height="287" data-path="images/data-ingest/mixpanel/1-organization-setting.png" />
4. Navigate to **Projects**

   <img src="https://mintcdn.com/aameo/lJyhnGhfWZ3pAf15/images/data-ingest/mixpanel/2-project-setting.png?fit=max&auto=format&n=lJyhnGhfWZ3pAf15&q=85&s=5f9ae18fc965ac2092c744a6bd204107" alt="2 Project Setting Pn" width="1230" height="365" data-path="images/data-ingest/mixpanel/2-project-setting.png" />
5. Choose the project with the data you wish Aampe to ingest.
6. You will find your **Project ID** and **Data Residency** in the table.

   <img src="https://mintcdn.com/aameo/lJyhnGhfWZ3pAf15/images/data-ingest/mixpanel/3-project-id.png?fit=max&auto=format&n=lJyhnGhfWZ3pAf15&q=85&s=5cbd7caba39e6b91265a647ca3322042" alt="3 Project Id Pn" width="1225" height="580" data-path="images/data-ingest/mixpanel/3-project-id.png" />

## Creating a Service Account

1. Log into your Mixpanel account
2. Click on the **Settings** gearwheel placed at the top-right corner of your screen.
3. Select your organization under **ORGANIZATION SETTINGS**

   <img src="https://mintcdn.com/aameo/lJyhnGhfWZ3pAf15/images/data-ingest/mixpanel/4-service-account.png?fit=max&auto=format&n=lJyhnGhfWZ3pAf15&q=85&s=edb966dc63cdec6d3536a0a077694d04" alt="4 Service Account Pn" width="1227" height="287" data-path="images/data-ingest/mixpanel/4-service-account.png" />
4. Navigate to **Service Accounts**
5. Click on **+ Add Service Account** at the top-right corner.

   <img src="https://mintcdn.com/aameo/lJyhnGhfWZ3pAf15/images/data-ingest/mixpanel/4b-service-account-new.png?fit=max&auto=format&n=lJyhnGhfWZ3pAf15&q=85&s=31b77e653ed8c7f53ca5391308e41e43" alt="4b Service Account New Pn" width="1232" height="475" data-path="images/data-ingest/mixpanel/4b-service-account-new.png" />
6. Choose a **NAME** for your service account. For example: `aampe-data-export`
7. Select the **PROJECT(S)** with the data you wish Aampe to ingest.
8. Keep the **ORGANIZATION ROLE** as Member and **PROJECT ROLE** as Consumer.

   <img src="https://mintcdn.com/aameo/9ClijY5ttg-z7CHA/images/data-ingest/mixpanel/5-sa-role.png?fit=max&auto=format&n=9ClijY5ttg-z7CHA&q=85&s=12c81ebd4b0e9b27ea3b8aba930baa9a" alt="5 Sa Role Pn" width="1247" height="332" data-path="images/data-ingest/mixpanel/5-sa-role.png" />
9. Click on **Create**
10. The service account Username and Secret will appear.

    <img src="https://mintcdn.com/aameo/hPVYwNQxr_l2Mb-r/images/data-ingest/mixpanel/6-secrets-sa.png?fit=max&auto=format&n=hPVYwNQxr_l2Mb-r&q=85&s=d133b0d77aa47fb066c5c92b6a0562fd" alt="6 Secrets Sa Pn" width="1290" height="435" data-path="images/data-ingest/mixpanel/6-secrets-sa.png" />
11. Store the username and secret and then we will use these to query the Mixpanel API.
12. Navigate to **System Settings > Integrations > Data Import**

    <img src="https://mintcdn.com/aameo/hPVYwNQxr_l2Mb-r/images/data-ingest/mixpanel/7-aampe-mixpanel.png?fit=max&auto=format&n=hPVYwNQxr_l2Mb-r&q=85&s=f284b410445affef6264a0a2add8016b" alt="7 Aampe Mixpanel Pn" width="2938" height="1224" data-path="images/data-ingest/mixpanel/7-aampe-mixpanel.png" />
13. Select **Mixpanel** and add your credentials.

    <img src="https://mintcdn.com/aameo/hPVYwNQxr_l2Mb-r/images/data-ingest/mixpanel/8-aampe-menu.png?fit=max&auto=format&n=hPVYwNQxr_l2Mb-r&q=85&s=2cc88e373419dd3fdf9496c5f93f99f3" alt="8 Aampe Menu Pn" width="1972" height="1582" data-path="images/data-ingest/mixpanel/8-aampe-menu.png" />

***
