> ## Documentation Index
> Fetch the complete documentation index at: https://dhiwisepvtltd-5e04e6a4.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Mixpanel

> Add Mixpanel to your Rocket.new app to track feature adoption, analyze conversion funnels, and segment users by behavior for product analytics.

Describe the analytics you want in chat and Rocket generates the complete tracking logic: event calls, funnel visualizations, retention charts, and user segmentation.

## What you can do

> **Feature adoption tracking**
>
> Measure which features users engage with and how often, so you can prioritize what to build next.

> **Conversion funnel analysis**
>
> Visualize how users move through multi-step flows like signups, onboarding, or checkout.

> **A/B testing dashboards**
>
> Compare metrics across experiment variants to see which version performs better.

> **User segmentation**
>
> Group users by behavior, plan type, or demographics to understand how different audiences use your app.

> **Retention tracking**
>
> Measure how many users return to your app over time and which actions drive long-term engagement.

## Before you connect

You need three values from [Mixpanel Settings](https://mixpanel.com/settings/org):

* **Account username:** your Mixpanel service account username
* **Account secret:** your Mixpanel service account secret
* **Region:** `US` or `EU`, depending on where your Mixpanel project data is hosted

> **Create a Mixpanel service account** from the Mixpanel documentation.
>
> [Open](https://developer.mixpanel.com/reference/service-accounts)

**How to create a service account:**

**1. Open Service Accounts settings**

Open [Mixpanel Settings](https://mixpanel.com/settings/org) and go to **Organization Settings > Service Accounts**.

**2. Add a service account**

Click **Add Service Account** to open the Create Service Account dialog.

**3. Configure account details**

Enter a **Name**, set **Organization Role** and **Project Role**, and choose the **Projects** this account can access. Leave **Expires** as **Never** unless your organization requires rotation.

**4. Copy credentials**

Click **Create**, then copy the **username** and **secret** immediately. Mixpanel shows the secret only once.

![Mixpanel Create Service Account dialog with Name, Organization Role, Projects, Project Role, and Expires fields.](https://mintlify.s3.us-west-1.amazonaws.com/dhiwisepvtltd-5e04e6a4/images/build/connectors/mixpanel/web-browser/mixpanel-create-service-account-light.webp)

![Mixpanel Create Service Account dialog with Name, Organization Role, Projects, Project Role, and Expires fields.](https://mintlify.s3.us-west-1.amazonaws.com/dhiwisepvtltd-5e04e6a4/images/build/connectors/mixpanel/web-browser/mixpanel-create-service-account-dark.webp)

Create Service Account dialog in Mixpanel

> [!NOTE]
>
> Mixpanel is a **task-level** connector. Each Rocket task connects to its own Mixpanel credentials independently.

## Connect Mixpanel

**Web Browser**

You can connect from two places. Both do the same thing.

**Option 1: From chat**

Type a prompt that mentions Mixpanel, for example `Connect Mixpanel and track when users click the Sign Up button`. Rocket detects the intent and shows a **Connect** button inline. Click it to open the credentials popup.

![Rocket chat panel showing a Connect prompt for Mixpanel.](https://mintlify.s3.us-west-1.amazonaws.com/dhiwisepvtltd-5e04e6a4/images/build/connectors/mixpanel/web-browser/mixpanel-chat-light.webp)

![Rocket chat panel showing a Connect prompt for Mixpanel.](https://mintlify.s3.us-west-1.amazonaws.com/dhiwisepvtltd-5e04e6a4/images/build/connectors/mixpanel/web-browser/mixpanel-chat-dark.webp)

Mixpanel connection prompt in chat

**Option 2: From the Connectors tab**

Click the **`...`** button in the preview toolbar, then select **Connectors**.

Open Connectors from the toolbar

Click the **Mixpanel** card, then click **Connect**.

![Connectors panel showing the Mixpanel card with a Connect button.](https://mintlify.s3.us-west-1.amazonaws.com/dhiwisepvtltd-5e04e6a4/images/build/connectors/mixpanel/web-browser/mixpanel-connectors-tab-light.webp)

![Connectors panel showing the Mixpanel card with a Connect button.](https://mintlify.s3.us-west-1.amazonaws.com/dhiwisepvtltd-5e04e6a4/images/build/connectors/mixpanel/web-browser/mixpanel-connectors-tab-dark.webp)

Mixpanel card in the Connectors panel

**After clicking Connect**

**1. Enter credentials**

A popup opens. Enter your **Account username**, **Account secret**, and **Region**.

![Connect Mixpanel popup with Account username, Account secret, and Region fields.](https://mintlify.s3.us-west-1.amazonaws.com/dhiwisepvtltd-5e04e6a4/images/build/connectors/mixpanel/web-browser/mixpanel-popup-light.webp)

![Connect Mixpanel popup with Account username, Account secret, and Region fields.](https://mintlify.s3.us-west-1.amazonaws.com/dhiwisepvtltd-5e04e6a4/images/build/connectors/mixpanel/web-browser/mixpanel-popup-dark.webp)

Connect Mixpanel popup

**2. Confirm connection**

Click **Connect**. A green dot appears next to Mixpanel when the connection is active.

**Update or disconnect**

Open [**Connectors > Mixpanel**](#connect-mixpanel) and click the card. Click **Edit** to update your credentials or **Disconnect** to remove the integration from this task.

![Mixpanel card showing Edit and Disconnect buttons.](https://mintlify.s3.us-west-1.amazonaws.com/dhiwisepvtltd-5e04e6a4/images/build/connectors/mixpanel/web-browser/mixpanel-disconnect-light.webp)

![Mixpanel card showing Edit and Disconnect buttons.](https://mintlify.s3.us-west-1.amazonaws.com/dhiwisepvtltd-5e04e6a4/images/build/connectors/mixpanel/web-browser/mixpanel-disconnect-dark.webp)

Edit and Disconnect options on a connected Mixpanel card

**Mobile App**

You can connect from two places. Both do the same thing.

**Option 1: From chat**

Type a prompt that mentions Mixpanel. Rocket detects the intent and shows a **Connect** button inline. Tap it to open the credentials screen.

**Option 2: From the Connectors tab**

**1. Open the More menu**

Tap the **More** button in the header.

**2. Go to Integrations**

Tap **Integrations**.

**3. Connect Mixpanel**

Tap the **Mixpanel** card, then tap **Connect**.

**After tapping Connect**

A popup opens. Enter your **Account username**, **Account secret**, and **Region**, then tap **Done**.

A green dot appears next to Mixpanel when the connection is active.

**Update or disconnect**

Go back to the **Mixpanel** card in Integrations. Tap **Edit** to update credentials or **Disconnect** to remove it from this task.

## Example prompts

| What you want | Prompt to use |
| :- | :- |
| Button tracking | `Track clicks on the Sign Up and Subscribe buttons and send events to Mixpanel.` |
| Page views | `Track page views for every route in my app and send them to Mixpanel with the page name.` |
| Signup funnel | `Track a signup funnel: Visit > Click Sign Up > Complete Form > Verify Email. Show drop-off rates.` |
| Feature usage | `Track usage of the search, filter, and export features. Show a daily usage chart for the last 30 days.` |
| User properties | `Set Mixpanel user properties for plan type, signup date, and company name on login.` |
| Retention chart | `Show a weekly retention chart for users who completed onboarding in the last 8 weeks.` |
| A/B test | `Track an A/B test on the pricing page. Compare conversion rates for monthly vs. annual pricing.` |
| Revenue tracking | `Send a Purchase Completed event to Mixpanel with the order total and product name.` |
| Error tracking | `Track JavaScript errors as Mixpanel events with the error message and stack trace.` |
| Session duration | `Track session start and end times. Show average session duration per day on a line chart.` |

## Tips

* **Data region matters.** Choose `US` or `EU` to match where your Mixpanel project data is hosted.

  > [!WARNING]
  >
  > Using the wrong region causes events to fail silently - they appear to send but never appear in your Mixpanel dashboard.
* **Events appear with a short delay.** Mixpanel typically processes events within a few seconds, but dashboard aggregations may take a few minutes to update.
* **Some analytics features depend on your Mixpanel plan.** Advanced features like signal reports and data pipelines may require a paid plan.
* **One Mixpanel account per task.** Each Rocket task connects to one set of Mixpanel credentials. Use different tasks for different Mixpanel accounts.
* **Credentials are stored securely.** Rocket encrypts them at rest and never exposes them in client-side code.

## What's next?

> **[Supabase](https://dhiwisepvtltd-5e04e6a4.mintlify.site/build/connectors/supabase/overview.md)**
>
> Link Mixpanel events to authenticated users with Supabase user management.

> **[Stripe](https://dhiwisepvtltd-5e04e6a4.mintlify.site/build/connectors/stripe.md)**
>
> Track payment events and revenue alongside user behavior in Mixpanel.

> **[Twilio](https://dhiwisepvtltd-5e04e6a4.mintlify.site/build/connectors/twilio.md)**
>
> Combine SMS notifications with analytics for a complete user communication picture.

> **[All connectors](https://dhiwisepvtltd-5e04e6a4.mintlify.site/build/connectors/overview.md)**
>
> Browse every available integration.


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