Mixpanel

Connect & Ingest data from Mixpanel

Mixpanel is a product analytics platform that helps teams understand user behavior. The Sling Mixpanel connector extracts data from the Mixpanel API, supporting raw event exports and user profiles.

circle-check

Setup

The following credentials are accepted:

Secrets:

  • username (required) -> Service Account Username

  • secret (required) -> Service Account Secret

  • project_id (required) -> Mixpanel Project ID

Inputs (optional):

  • anchor_date -> Starting date for first sync (defaults to 1 year ago)

  • base_url -> Override the base URL (defaults to https://mixpanel.com)

  • export_base_url -> Override the export base URL (defaults to https://data.mixpanel.com)

Getting Your Credentials

  1. Go to Settings (gear icon) β†’ Organization Settings β†’ Service Accounts

  2. Click Add Service Account

  3. Give the account a name (e.g., "Sling Integration") and select the Consumer role

  4. Click Create and note the Username and Secret

  5. Go to Settings β†’ Project Settings to find your Project ID (also visible in the URL)

circle-info

Data Residency: If your Mixpanel project is in the EU data center, set base_url to https://eu.mixpanel.com and export_base_url to https://data-eu.mixpanel.com.

circle-exclamation

Using sling conns

Here are examples of setting a connection named MIXPANEL. We must provide the type=api property:

Environment Variable

Sling Env File YAML

See here to learn more about the sling env.yaml file.

Replication

Here's an example replication configuration to sync Mixpanel data to a PostgreSQL database:

Endpoints

Endpoint
Description
Incremental
Depends On

engage

User profiles (people)

No

β€”

export

Raw events by date range

Yes

β€”

cohorts

Cohort definitions (requires paid plan)

No

β€”

To discover available endpoints:

Endpoint Details

engage β€” Returns all user profiles in the project, including custom properties, last seen timestamps, and geographic data. Uses session-based pagination to iterate through all profiles.

export β€” Returns raw events by date range. Iterates day by day from the anchor date (or last sync date) to yesterday. Supports incremental sync β€” after the first full extraction, subsequent runs only fetch new days. Supports backfill via the range source option.

cohorts β€” Returns all cohort definitions in the project. This endpoint requires a paid Mixpanel plan (returns 402 on free plans). Disabled by default.

Incremental Sync

The export endpoint supports incremental sync using date-based iteration:

  • First run: Fetches all events from the anchor_date (default: 1 year ago) to yesterday

  • Subsequent runs: Only fetches events from the last synced date onward

To customize the starting date:

Backfill

To backfill a specific date range, use the range source option:

The engage endpoint runs in full-refresh mode since user profiles represent the current state.

Rate Limiting

The Mixpanel API enforces rate limits, especially on the free plan:

  • Export API: Strict rate limits on the data export endpoint

  • Query API (engage, cohorts): Separate rate limit pool

The connector automatically:

  • Uses conservative rate limiting (1 request/second)

  • Processes export dates sequentially (concurrency of 1) to respect rate limits

  • Retries with exponential backoff on 429 (rate limit) responses

  • Allows up to 5 retry attempts with a base backoff of 10 seconds

If you are facing issues connecting, please reach out to us at [email protected]envelope, on discordarrow-up-right or open a Github Issue herearrow-up-right.

Last updated

Was this helpful?