Mixpanel integration

Product analytics: track events, update people profiles, group profiles, raw event export, cohorts

Help CentreConnectors

Overview

Mixpanel is product analytics – events, profiles, cohorts, funnels, exports. The Automize connector covers track (ingest), engage (people profiles), exports, JQL queries, annotations, and lookup-table / group management.

  • Regions: US (api.mixpanel.com) and EU (api-eu.mixpanel.com). Set the region on the project at creation time – projects can't be migrated between regions.
  • Plans: Free tier has unlimited events, but Cohort export, Group Analytics, and JQL all require Growth or Enterprise. Service-account auth (which the connector uses) is paid-only.

Setting up the connection

Auth type: HTTP Basic.

  1. In Mixpanel → Project Settings → Service Accounts, click Create. Pick a role (Admin / Member / Consumer) – Consumer is enough for read-only Export + JQL flows.
  2. Copy the username (looks like 'name.<random>.mp-service-account') and secret.
  3. In Automize, paste the service-account username + secret, plus the Project ID (visible in Project Settings → Overview).
  4. Ingest endpoints (track, track-batch, engage, groups) also accept the project token alone – but the connector standardises on service accounts so the same credential covers query + ingest.

Find your credentials at https://docs.mixpanel.com/docs/orgs-and-projects/service-accounts.


Rate limits

Ingest (track / track-batch / engage): 2000 req/sec, batches up to 2000 events. Query (export / JQL / engage queries): 60 req/hour per project on free plans, higher on Growth+. Connector backs off on 429 with the Retry-After hint.


Data model

Mixpanel's analytics graph:

    Organization
      └─ Projects               (separate token + secret per project)
           ├─ Events            (timestamped, $insert_id-deduped)
           │    └─ Properties   (dict; reserved keys prefixed $)
           ├─ People (Users)
           │    ├─ distinct_id  (canonical user identifier)
           │    └─ Properties   ($set, $add, $append, $union, $unset)
           ├─ Groups            (entity analytics – accounts, teams)
           ├─ Cohorts           (saved query result sets)
           ├─ Annotations       (chart markers – deploys, campaigns)
           └─ Lookup Tables     (CSV-uploaded join data)

Reserved property keys (prefix $):

    $insert_id    5-day dedupe key for retries
    $time         event timestamp (unix ms / sec, configurable)
    $browser, $os, $city, etc. – auto-set by client SDKs only

Identity model: distinct_id is the join key. $identify events merge
multiple distinct_ids; alias is the legacy linking method. People
profiles are 1:1 with the canonical distinct_id.

Region matters: events posted to api.mixpanel.com (US) and
api-eu.mixpanel.com (EU) are stored in separate clusters. Projects
are pinned to a region at creation and CANNOT be migrated.

Available operations

11 operations available. Click any row to jump to its detail.

OperationCategoryWhat it does
List AnnotationsGeneralList project annotations
Get Cohort MembersGeneralEngage-format query for members of a cohort
Create AnnotationGeneralCreate a project annotation
Update People ProfileGeneralSet, set-once, increment, append, union, unset on a user profile
Export EventsGeneralRaw event export (Data Pipeline / Raw Export)
Update Group ProfileGeneralUpdate group analytics profile
List CohortsGeneralList saved cohorts
List Lookup TablesGeneralList configured lookup tables
Run JQL QueryGeneralRun a JavaScript Query Language script
Track BatchGeneralIngest up to 2000 events in one call
Track EventGeneralIngest a single event (JSON Importer)

Operations

List Annotations

List project annotations

No input parameters.

Tips

  • GET /api/2.0/annotations – chart markers (deploys, campaigns, incidents) overlaid on dashboards.
  • Filter by from_date + to_date; date format is YYYY-MM-DD.

Get Cohort Members

Engage-format query for members of a cohort

ParameterRequiredTypeDescription
Filter By Cohort filter_by_cohortNotext

Tips

  • Returns distinct_ids of users in a saved cohort. cohort_id from List Cohorts.
  • engagement parameter switches between fetching by user-ID or by full profile.

Create Annotation

Create a project annotation

ParameterRequiredTypeDescription
Date dateNotext
Description descriptionNotext
Project Id project_idNotext

Tips

  • POST /api/2.0/annotations/create – body: date (YYYY-MM-DD HH:MM:SS) + description.
  • Useful for automated CI: post a Mixpanel annotation on every prod deploy to correlate metric shifts with releases.

Update People Profile

Set, set-once, increment, append, union, unset on a user profile

No input parameters.

Tips

  • People profile mutations. Operators: $set, $set_once, $add, $append, $union, $remove, $unset, $delete.
  • $ignore_time:true keeps $last_seen from being touched – useful for backfills.

Export Events

Raw event export (Data Pipeline / Raw Export)

No input parameters.

Tips

  • Raw event export. from_date + to_date in YYYY-MM-DD UTC. Streaming JSONL response – large windows can take minutes.
  • where= takes the Mixpanel expression language; e.g. properties['$country_code'] == 'ZA'.

Update Group Profile

Update group analytics profile

No input parameters.

Tips

  • Group Analytics – entity-level (account, company, team) rather than user-level analytics.
  • Set group properties via $group_set, $group_unset operators on this endpoint. group_key + group_id together identify the entity.
  • Group Analytics needs Growth or Enterprise. Free tier returns 402 on these endpoints.

List Cohorts

List saved cohorts

No input parameters.

Tips

  • Returns project cohort definitions with cohort_id, name, description, count, is_visible_by_owner_only.
  • Cohorts can be Behavioral (events-based) or Property (people-properties-based). The 'name' is the only human-readable identifier – cohort_id is opaque integer.

List Lookup Tables

List configured lookup tables

No input parameters.

Tips

  • Returns CSV-uploaded join tables (Mixpanel's equivalent of dimension tables). Each table has a UUID + name + sync state.
  • Use these in JQL via mixpanel.lookups['<name>'] to enrich event reports with static metadata you don't want to send as event properties.

Run JQL Query

Run a JavaScript Query Language script

ParameterRequiredTypeDescription
Script scriptNotext
Params paramsNotext

Tips

  • JQL = JavaScript queries over events. Use Events() and People() as starting points; chain .filter / .groupBy / .reduce.
  • 5-minute query timeout. Heavy joins are faster as two queries + client-side merge.

Track Batch

Ingest up to 2000 events in one call

No input parameters.

Tips

  • Up to 2000 events / 2 MB. Way cheaper than 2000 single calls; use this whenever you have >1 event to send.
  • Each event needs its own $insert_id for dedupe – Mixpanel retains insert_ids for 5 days.

Track Event

Ingest a single event (JSON Importer)

No input parameters.

Tips

  • Single event ingest. Payload: event + properties (must include 'token' and either 'distinct_id' or 'device_id').
  • Server-side ingest doesn't auto-populate $os/$browser – set them explicitly if you want them in funnels.

FAQ

Service account vs project token vs API secret – which is which?
Project token: 32-char hex, public, used in client-side ingest. API secret: legacy, deprecated for query auth (warn now, removed later). Service account: u/p pair, scoped per-project, the only auth that still works for query going forward. Use service accounts for everything.
Why are events dropped silently?
Three causes: (1) time too far in past/future (>5 days each way); (2) distinct_id missing or empty string; (3) project token mismatch (wrong project). Server-side ingest reports success even on these – check /import/ endpoints for strict validation.
EU project – different endpoints?
Yes. api-eu.mixpanel.com for ingest and query. The connector auto-routes based on which region you select on the credential.
Can I delete a user (GDPR)?
Engage with $delete:true (or use a dedicated /api/2.0/engage with $delete). Hard-delete on Mixpanel's side is async – propagates within 30 days. The connector exposes this through Engage.

Related connectors

See it working on your own data

Everything documented here ships with the platform – try the document tools free, or go live in 7 days.