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

# Mixpanel

> Query Mixpanel events, saved funnels and retention live from Explore and AI agents

The Mixpanel [live source](https://docs.lightdash.com/integrations/live-sources) reads the events, saved funnels and retention of one Mixpanel project, as Mixpanel computes them.

## Before you start

* **A Growth or Enterprise plan** in Mixpanel.
* **A service account** with a role on the project, from **Organization settings** → **Service accounts** in Mixpanel.
* **Project ID**, the number after `/project/` in the project's URL.

## Connect Mixpanel

[Add a live source](https://docs.lightdash.com/integrations/live-sources/set-up-and-manage.md#connect-a-live-source), select **Mixpanel**, choose the **Data region**, and enter the **Project ID**, **Service account** and **Secret**.

![The Add Mixpanel source dialog with Data region set to US, EU or India, Project ID, Service account and Secret fields and a Test button under Authentication, and Name under Details](https://mintcdn.com/lightdash/WuPlti30p6CHhcUC/images/integrations/live-sources/mixpanel-config.png?fit=max\&auto=format\&n=WuPlti30p6CHhcUC\&q=85\&s=9f97e28d23353d5464e89bbbd84c74b1)

## Semantic layer

### Top events today

Today's most common events in one Mixpanel project, with their count so far and the change from yesterday

| Field | Description |
| - | - |
|  Event | Name of the event, as tracked in Mixpanel |
|  Event count today | Number of times the event was triggered today so far |
|  Change from yesterday | Change from yesterday's count, as Mixpanel normalizes it |

### Events

Event counts and unique users per event in one Mixpanel project, by day or month and one event property

| Field | Description |
| - | - |
|  Date | Day of the event, in the project time zone |
|  Date month | Month of the event, shown as its first day in the project time zone |
|  Event | Name of the event, as tracked in Mixpanel |
|  Country | Country code of the user, as Mixpanel resolves it from the IP address |
|  Region | Region or state of the user |
|  City | City of the user |
|  Browser | Browser, such as Chrome or Safari |
|  OS | Operating system, such as Mac OS X, iOS or Android |
|  Device | Device, such as iPhone or Android |
|  Library | Mixpanel library that sent the event, such as `web`, `iphone` or `python` |
|  Referring domain | Domain of the page that linked to the current page |
|  UTM source | `utm_source` of the URL the user landed on |
|  UTM medium | `utm_medium` of the URL the user landed on |
|  UTM campaign | `utm_campaign` of the URL the user landed on |
|  Event count | Number of times the event was triggered (Mixpanel's "general") |
|  Unique users | Number of distinct users who triggered the event at least once in the period (Mixpanel's "unique") |
|  Events per user | Average number of times each user triggered the event in the period (Mixpanel's "average") |

### Funnel

A funnel saved in Mixpanel: users who did each step in order over the date range, and how many converted

| Field | Description |
| - | - |
|  Date | Day users entered the funnel |
|  Funnel ID | ID of the saved funnel. Its steps and conversion window come from the funnel as saved in Mixpanel |
|  Step number | Position of the step in the funnel, from 1 |
|  Step event | Event or custom event of the step, as labeled |
|  Users | Users who reached the step, having done every step before it in order |
|  Conversion from first step | Users at the step divided by users at the first step |
|  Conversion from previous step | Users at the step divided by users at the step before |
|  Average time to step (seconds) | Average seconds from the previous step to this one, for users who reached it |

### Retention

Of the users in each cohort, how many came back in each later day, week or month, as Mixpanel computes it

| Field | Description |
| - | - |
|  Cohort | Day the cohort started, in the project time zone |
|  Cohort week | Week the cohort started, shown as its first day |
|  Cohort month | Month the cohort started, shown as its first day |
|  Days after start | Days after the cohort started; 0 counts users who came back less than one day after joining the cohort |
|  Weeks after start | Weeks after the cohort started; 0 counts users who came back less than one week after joining the cohort |
|  Months after start | Months after the cohort started; 0 counts users who came back less than one month after joining the cohort |
|  Start event | Event that puts users in a cohort, the first time they do it |
|  Return event | Event that counts as coming back |
|  Retained users | Users of the cohort who did the return event in the period |
|  Cohort users | Users in the cohort |
|  Retention rate | Retained users divided by cohort users |

## Limits

| Limit | Value |
| - | - |
| Default date range | Last 30 days, when the query has no date filter |
| Most rows per query | 5,000 |
| Retention range | 90 days, 52 weeks or 24 months after start. Longer cohort ranges are refused |
| Events per query | 1 to 3 |
| Top events today | Up to 100 |
| Events × metrics per query | Up to 6 |
| Event properties to group by | 1 |
| Values of a grouped property | 1,000 per event |


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