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

# Mixpanel

> Connect to Mixpanel product analytics.

Humm queries your Mixpanel events, funnels, cohorts, and retention data. Ask about conversion rates, which features drive activation, or how a cohort's engagement changes over time.

## Tools

| Tool                              | Description                                            |
| --------------------------------- | ------------------------------------------------------ |
| `MIXPANEL_JQL_QUERY`              | Execute custom JQL (JavaScript Query Language) queries |
| `MIXPANEL_QUERY_PROFILES`         | Query user or group profile data                       |
| `MIXPANEL_QUERY_SEGMENTATION`     | Get event data segmented and filtered by properties    |
| `MIXPANEL_LIST_FUNNELS`           | Get funnel names and IDs                               |
| `MIXPANEL_QUERY_FUNNEL`           | Retrieve funnel performance data                       |
| `MIXPANEL_LIST_COHORTS`           | Get all cohorts in a project                           |
| `MIXPANEL_QUERY_RETENTION_REPORT` | Get cohort analysis and retention data                 |
| `MIXPANEL_QUERY_INSIGHT`          | Get data from insights reports                         |
| `MIXPANEL_AGGREGATE_EVENT_COUNTS` | Retrieve event counts aggregated over time             |
| `MIXPANEL_TODAYS_TOP_EVENTS`      | Get top events for today with counts                   |
| `MIXPANEL_GET_ALL_PROJECTS`       | List all projects for the authenticated account        |

## JQL Query Examples

Humm can execute JQL (JavaScript Query Language) queries against Mixpanel's Query API. Here are common patterns:

```javascript theme={"theme":{"light":"github-light","dark":"github-dark"}}
// Get events from the last 7 days
function main() {
  return Events({
    from_date: '2024-01-01',
    to_date: '2024-01-07'
  });
}

// Filter events by name
function main() {
  return Events({
    from_date: '2024-01-01',
    to_date: '2024-01-07'
  }).filter(function(event) {
    return event.name == 'Purchase';
  });
}

// Group by property
function main() {
  return Events({
    from_date: '2024-01-01',
    to_date: '2024-01-07'
  }).groupBy(['properties.plan_type'], mixpanel.reducer.count());
}
```

## Query Constraints

JQL queries have the following limits:

* 60 queries per hour rate limit
* Maximum 5 concurrent queries
* 2-minute execution timeout
* 5 GB data processing limit
* 2 GB output limit

## Authentication

<Card title="OAuth" icon="plug">
  Connect securely via OAuth. Authorize Humm to access your Mixpanel workspace.
</Card>
