# Mixpanel

Product analytics platform

- Category: Analytics
- Runs in: the Phloem cloud

Lets you and Hamming read raw events and user profiles from a Mixpanel project, with its event names listed in Trace.

## What Phloem reads
- Up to 100 event names, each with its top properties, listed in Trace
- The project's user profiles, as `$users`

Phloem only reads. It never sends data to Mixpanel.

## What you need
- The Mixpanel project ID
- A Mixpanel service account (username and secret) with access to that project
- Whether the project keeps its data in the US or the EU

## Connect
1. In the console, open **Connectors**, choose **Add connector**, then **Mixpanel**.
2. Enter a **Display Name**, then **Project ID**, **Service Account Username** and **Service Account Secret**.
3. Under **Data Region**, choose **United States** or **European Union**.
4. Choose **Test Connection** (it lists the project's event names), then **Create Connection**.

## What Hamming can do
- Query events with JSON that you or Hamming write: `{"event": "Signup", "from_date": "2024-01-01", "to_date": "2024-01-31", "limit": 100}`. Each row is one event, with its properties as columns.

## Notes
- A query names one event, or leaves out `event` to read all events in the range.
- Without `from_date` and `to_date`, a query covers the last 30 days.
- A query returns 100 events unless it sets `limit`.

## Connection fields

| Field | Type | Required | Notes |
|---|---|---|---|
| Project ID | Text | Yes | Mixpanel Project ID |
| Service Account Username | Text | Yes | Service Account username |
| Service Account Secret | Secret | Yes | Service Account secret |
| Data Region | One of | No | Mixpanel data residency region |
