mixpanel
Mixpanel API for product analytics. Use when user mentions "Mixpanel", "product analytics", "event tracking", "funnels", "insights", or JQL queries.
What this skill does
## Troubleshooting
If requests fail, run `zero doctor check-connector --env-name MIXPANEL_SERVICE_ACCOUNT_USERNAME` or `zero doctor check-connector --url "https://mixpanel.com/api/2.0/insights?project_id=$MIXPANEL_PROJECT_ID" --method GET`
## How to Use
All examples below assume `MIXPANEL_SERVICE_ACCOUNT_USERNAME`, `MIXPANEL_SERVICE_ACCOUNT_SECRET`, and `MIXPANEL_PROJECT_ID` are set.
Authentication: HTTP Basic Auth with the Service Account username as the user and the Service Account secret as the password. Every request must also pass `project_id` as a query parameter.
Base URLs:
- Query / Insights / Funnels / JQL: `https://mixpanel.com`
- Raw event export: `https://data.mixpanel.com`
- Ingestion (track events, set profiles): `https://api.mixpanel.com`
### 1. Run Insights Query
Fetch a saved Insights report by bookmark id. Replace `<your-bookmark-id>` with the actual bookmark (saved report) id:
```bash
curl -s -G "https://mixpanel.com/api/2.0/insights" --data-urlencode "project_id=$MIXPANEL_PROJECT_ID" --data-urlencode "bookmark_id=<your-bookmark-id>" -u "$MIXPANEL_SERVICE_ACCOUNT_USERNAME:$MIXPANEL_SERVICE_ACCOUNT_SECRET"
```
### 2. Segmentation Query
Aggregate a single event by a property over a date range:
```bash
curl -s -G "https://mixpanel.com/api/2.0/segmentation" --data-urlencode "project_id=$MIXPANEL_PROJECT_ID" --data-urlencode "event=Signed Up" --data-urlencode "from_date=2026-04-01" --data-urlencode "to_date=2026-04-17" --data-urlencode "unit=day" -u "$MIXPANEL_SERVICE_ACCOUNT_USERNAME:$MIXPANEL_SERVICE_ACCOUNT_SECRET"
```
### 3. List Funnels
```bash
curl -s -G "https://mixpanel.com/api/2.0/funnels/list" --data-urlencode "project_id=$MIXPANEL_PROJECT_ID" -u "$MIXPANEL_SERVICE_ACCOUNT_USERNAME:$MIXPANEL_SERVICE_ACCOUNT_SECRET"
```
### 4. Query a Funnel
Replace `<your-funnel-id>` with the id returned by the list call:
```bash
curl -s -G "https://mixpanel.com/api/2.0/funnels" --data-urlencode "project_id=$MIXPANEL_PROJECT_ID" --data-urlencode "funnel_id=<your-funnel-id>" --data-urlencode "from_date=2026-04-01" --data-urlencode "to_date=2026-04-17" -u "$MIXPANEL_SERVICE_ACCOUNT_USERNAME:$MIXPANEL_SERVICE_ACCOUNT_SECRET"
```
### 5. Run a JQL Script
JQL (JavaScript Query Language) lets you run arbitrary map/reduce over events and profiles.
Write to `/tmp/mixpanel_jql.js`:
```
function main() {
return Events({
from_date: '2026-04-01',
to_date: '2026-04-17',
event_selectors: [{ event: 'Signed Up' }]
}).groupBy(['name'], mixpanel.reducer.count());
}
```
Then run:
```bash
curl -s -G "https://mixpanel.com/api/2.0/jql" --data-urlencode "project_id=$MIXPANEL_PROJECT_ID" --data-urlencode "script@/tmp/mixpanel_jql.js" -u "$MIXPANEL_SERVICE_ACCOUNT_USERNAME:$MIXPANEL_SERVICE_ACCOUNT_SECRET"
```
### 6. Raw Event Export
Stream raw events for a date range as newline-delimited JSON. Use the `data.mixpanel.com` host for export:
```bash
curl -s -G "https://data.mixpanel.com/api/2.0/export" --data-urlencode "project_id=$MIXPANEL_PROJECT_ID" --data-urlencode "from_date=2026-04-17" --data-urlencode "to_date=2026-04-17" -u "$MIXPANEL_SERVICE_ACCOUNT_USERNAME:$MIXPANEL_SERVICE_ACCOUNT_SECRET"
```
Add `--data-urlencode "event=[\"Signed Up\"]"` to filter to specific events.
### 7. Query User Profiles (Engage)
List or search user profiles. Use POST so large `where` filters fit:
Write to `/tmp/mixpanel_engage.json`:
```json
{
"where": "properties[\"$email\"] == \"[email protected]\""
}
```
Then run:
```bash
curl -s -X POST "https://mixpanel.com/api/2.0/engage?project_id=$MIXPANEL_PROJECT_ID" -u "$MIXPANEL_SERVICE_ACCOUNT_USERNAME:$MIXPANEL_SERVICE_ACCOUNT_SECRET" --header "Content-Type: application/x-www-form-urlencoded" --data-urlencode "where@/tmp/mixpanel_engage.json"
```
### 8. Track an Event (Ingestion)
Ingestion uses `api.mixpanel.com` and expects a base64-encoded JSON payload in the `data` parameter. It uses your project token (embedded inside the payload) rather than Basic auth — but the Service Account credentials still work for the `/import` endpoint.
Write to `/tmp/mixpanel_track.json`:
```json
[
{
"event": "Signed Up",
"properties": {
"token": "<your-project-token>",
"distinct_id": "user-123",
"$insert_id": "unique-dedup-key-001",
"time": 1744944000,
"source": "web"
}
}
]
```
Then run:
```bash
curl -s -X POST "https://api.mixpanel.com/import?project_id=$MIXPANEL_PROJECT_ID&strict=1" -u "$MIXPANEL_SERVICE_ACCOUNT_USERNAME:$MIXPANEL_SERVICE_ACCOUNT_SECRET" --header "Content-Type: application/json" -d @/tmp/mixpanel_track.json
```
The `/import` endpoint (Basic-auth) is preferred over the legacy `/track` endpoint for server-side ingestion because it supports deduplication via `$insert_id` and returns structured errors.
### 9. Update a User Profile ($set)
Write to `/tmp/mixpanel_engage_update.json`:
```json
[
{
"$token": "<your-project-token>",
"$distinct_id": "user-123",
"$set": {
"$email": "[email protected]",
"plan": "pro"
}
}
]
```
Then run:
```bash
curl -s -X POST "https://api.mixpanel.com/engage?project_id=$MIXPANEL_PROJECT_ID" --header "Content-Type: application/json" -d @/tmp/mixpanel_engage_update.json
```
### 10. List Cohorts
```bash
curl -s -G "https://mixpanel.com/api/2.0/cohorts/list" --data-urlencode "project_id=$MIXPANEL_PROJECT_ID" -u "$MIXPANEL_SERVICE_ACCOUNT_USERNAME:$MIXPANEL_SERVICE_ACCOUNT_SECRET"
```
### 11. Query Events by Cohort
Replace `<your-cohort-id>` with the id returned by the list call:
```bash
curl -s -X POST "https://mixpanel.com/api/2.0/engage?project_id=$MIXPANEL_PROJECT_ID" -u "$MIXPANEL_SERVICE_ACCOUNT_USERNAME:$MIXPANEL_SERVICE_ACCOUNT_SECRET" --header "Content-Type: application/x-www-form-urlencoded" --data-urlencode "filter_by_cohort={\"id\":<your-cohort-id>}"
```
## Guidelines
1. **Always include `project_id`**: Every API call requires it as a query parameter — without it, Mixpanel returns an auth error that looks like a credentials problem.
2. **Use Basic auth with Service Accounts**: `-u "$MIXPANEL_SERVICE_ACCOUNT_USERNAME:$MIXPANEL_SERVICE_ACCOUNT_SECRET"` — not the legacy project API secret.
3. **Date format**: Query endpoints use `YYYY-MM-DD`; raw `/export` uses the same. Ingestion `time` field uses UNIX seconds.
4. **Prefer `/import` over `/track`** for server-side ingestion: supports deduplication via `$insert_id` and returns structured errors.
5. **Rate limits**: Query APIs are limited to 60 queries/hour, 5 concurrent queries per project. Export API has separate limits.
6. **Raw export uses a different host**: `data.mixpanel.com`, not `mixpanel.com`.
## API Reference
- Authentication: https://developer.mixpanel.com/reference/authentication
- Query API: https://developer.mixpanel.com/reference/overview
- JQL: https://developer.mixpanel.com/reference/jql
- Raw export: https://developer.mixpanel.com/reference/raw-event-export
- Ingestion (`/import`): https://developer.mixpanel.com/reference/import-events
Related in Backend & APIs
jfrog
IncludedInteract with the JFrog Platform via the JFrog CLI and REST/GraphQL APIs. Use this skill when the user wants to manage Artifactory repositories, upload or download artifacts, manage builds, configure permissions, manage users and groups, work with access tokens, configure JFrog CLI servers, search artifacts, manage properties, set up replication, manage JFrog Projects, run security audits or scans, look up CVE details, query exposures scan results from JFrog Advanced Security, manage release bundles and lifecycle operations, aggregate or export platform data, or perform any JFrog Platform administration task. Also use when the user mentions jf, jfrog, artifactory, xray, distribution, evidence, apptrust, onemodel, graphql, workers, mission control, curation, advanced security, exposures, or any JFrog product name.
cupynumeric-migration-readiness
IncludedPre-migration readiness assessor for porting NumPy to cuPyNumeric. Use BEFORE substantial porting work begins when the user asks whether code will scale on GPU, whether they should migrate to cuPyNumeric, which NumPy patterns transfer cleanly, what must be refactored before porting, or mentions pre-port assessment, scaling analysis, or refactor planning. Inspect the user's source code, look up NumPy usage, cross-reference the cuPyNumeric API support manifest, and distinguish distributed-scaling-friendly patterns from blockers such as unsupported APIs, scalar synchronization, host round-trips, Python/object-heavy control flow, shape/data-dependent branching, and in-place mutation hazards. Produce a verdict of READY, LIGHT REFACTOR, SIGNIFICANT REFACTOR, or NOT RECOMMENDED, with concrete refactor pointers.
alibabacloud-data-agent-skill
IncludedInvoke Alibaba Cloud Apsara Data Agent for Analytics via CLI to perform natural language-driven data analysis on enterprise databases. Data Agent for Analytics is an intelligent data analysis agent developed by Alibaba Cloud Database team for enterprise users. It automatically completes requirement analysis, data understanding, analysis insights, and report generation based on natural language descriptions. This tool supports: discovering data resources (instances/databases/tables) managed in DMS, initiating query or deep analysis sessions, real-time progress tracking, and retrieving analysis conclusions and generated reports. Use this Skill when users need to query databases, analyze data trends, generate data reports, ask questions in natural language, or mention "Data Agent", "data analysis", "database query", "SQL analysis", "data insights".
token-optimizer
IncludedReduce OpenClaw token usage and API costs through smart model routing, heartbeat optimization, budget tracking, and native 2026.2.15 features (session pruning, bootstrap size limits, cache TTL alignment). Use when token costs are high, API rate limits are being hit, or hosting multiple agents at scale. The 4 executable scripts (context_optimizer, model_router, heartbeat_optimizer, token_tracker) are local-only — no network requests, no subprocess calls, no system modifications. Reference files (PROVIDERS.md, config-patches.json) document optional multi-provider strategies that require external API keys and network access if you choose to use them. See SECURITY.md for full breakdown.
resend-cli
IncludedUse this skill when the task is specifically about operating Resend from an AI agent, terminal session, or CI job via the official resend CLI: installing/authenticating the CLI, sending/listing/updating/cancelling emails, batch sends, domains and DNS, webhooks and local listeners, inbound receiving, contacts, topics, segments, broadcasts, templates, API keys, profiles, or debugging Resend CLI/API failures. Trigger on mentions of Resend CLI, `resend`, `resend doctor`, `resend emails send`, `resend domains`, `resend webhooks listen`, `resend emails receiving`, or agent-friendly terminal automation.
alibabacloud-odps-maxframe-coding
IncludedUse this skill for MaxFrame SDK development and documentation navigation on Alibaba Cloud MaxCompute (ODPS). Helps answer MaxFrame API, concept, official example, and supported pandas API questions; create data processing programs; read/write MaxCompute tables; debug jobs (remote or local); and build custom DPE runtime images. Trigger when users mention MaxFrame, MaxCompute with MaxFrame, ODPS table processing, DPE runtime, MaxFrame docs/examples, DataFrame/Tensor operations, or GPU runtime setup. Works for both English and Chinese queries about Alibaba Cloud data processing with MaxFrame.