Skip to main content

Mixpanel integration

Track events, sync user and group profiles, query reports, and react to cohorts and alerts in your clients' Mixpanel projects.

View the Mixpanel page

What it does

The Mixpanel integration keeps each client's product analytics in step with the rest of their stack. Connect a client project once and your workflows can send events and profile updates into Mixpanel, pull funnel, retention and segmentation numbers into reports, manage annotations and data definitions, and start automations when users join a cohort, when a tracked event happens, or when a Mixpanel alert fires.

Connect a Mixpanel account

  1. In Mixpanel, open Organization Settings, Service Accounts, and create a Service Account with access to the client's project. Use the Admin role if you plan to import events, and Analyst or higher for annotations. Copy the username and the secret. Mixpanel shows the secret only once.
  2. In Project Settings, Overview, copy the numeric Project ID and the Project Token.
  3. In the client workspace in TaskJuice, go to Connections, choose Mixpanel, and paste the username, secret, Project ID and Project Token.
  4. Leave the host fields at their defaults for US projects. For EU data residency use api-eu.mixpanel.com and eu.mixpanel.com. For India use api-in.mixpanel.com and in.mixpanel.com.

The Project Token is public by design (Mixpanel ships it in browser tracking code), so TaskJuice stores it with the connection's regular settings and adds it to every event and profile request for you. You never paste it into a payload.

Rotate Service Accounts from Mixpanel Organization Settings.

Triggers

  • mixpanel/events-recorded (Events Recorded) watches one named event and emits one activation per poll cycle, with every new event in an items array. Each cycle re-reads today and yesterday in UTC and skips events it has already sent, matched on $insert_id, so late events are still picked up and nothing is sent twice. Watch an event recording up to about 500 events a day; above that the trigger misses events. The first cycle after publishing records the current window without emitting.
  • mixpanel/user-added-to-cohort (User Added to Cohort) fires when users newly appear in a saved cohort, for example when someone becomes a power user or enters a churn-risk segment. Each activation carries the new members in items, with their distinct ID and profile properties. The first cycle records the current members without emitting. It watches the first 1,000 members of the cohort.
  • mixpanel/alert-triggered-v2 (Alert Triggered) fires instantly when a Mixpanel custom or anomaly alert on an Insights or Funnels report goes off. The payload includes the alert, the condition and current value, and links to the report and root cause analysis. It replaces the older mixpanel/alert-triggered, which had no connection and no longer starts workflows: replace that step with the new Alert Triggered on a Mixpanel connection, republish the workflow, and paste the new URL into Mixpanel.

Set up the Alert Triggered webhook

You connect this trigger once by hand in Mixpanel:

  1. Pick the Mixpanel connection on the Alert Triggered step, publish the workflow, and copy the delivery URL the step shows for that connection. Each connection has its own URL, and an alert sent to it starts only the workflows that use that connection, so give each client project its own connection. The URL is private and is the only credential, so keep it out of shared documents; if it ever leaks, remove the connection and connect again so the old URL stops answering.
  2. In the Mixpanel project that connection belongs to, open the gear icon, Destinations, Notification Webhook, and select Add Webhook. Paste the URL and submit. Mixpanel's optional username and password are not needed.
  3. Open the report the alert belongs to, select the bell icon, and create or edit the alert. Under Notify, pick your webhook in Webhook.
  4. Select Test Notification Configuration. A test alert starts a run of your workflow within a few seconds.

Alert webhooks need a Mixpanel Growth or Enterprise plan.

Actions

Events and identity

  • mixpanel/track-event records one event for a user, with custom properties, an optional timestamp and an optional insert ID for safe retries.
  • mixpanel/import-events sends a batch of up to 2,000 events through the import endpoint. Use it for historical backfills and for tracking many live events at once.
  • mixpanel/create-identity, mixpanel/create-alias and mixpanel/merge-identities link anonymous and known IDs. They only apply to projects on Mixpanel's Original ID Merge system. Merging cannot be undone.

User and group profiles

  • mixpanel/update-profile sets, sets once, increments, unions, appends, removes or deletes properties on a user profile.
  • mixpanel/delete-profile permanently deletes a user profile.
  • mixpanel/update-group-profile sets, sets once, unions, removes or deletes properties on a group profile such as a company. Requires Group Analytics.
  • mixpanel/delete-group-profile permanently deletes a group profile.
  • mixpanel/batch-update-profiles and mixpanel/batch-update-group-profiles send up to 1,000 user or group profile updates in one request, each with its own operation such as $set, $add or $delete. TaskJuice adds the Project Token to every update.
  • mixpanel/query-profiles searches user or group profiles with a filter expression, 1,000 per page.
  • mixpanel/get-profile fetches one user profile by distinct ID.
  • mixpanel/list-cohorts and mixpanel/list-cohort-members list saved cohorts and the users in one.
  • mixpanel/get-profile-activity returns the events one user performed in a date range.

Reports

  • mixpanel/query-insights returns the result of a saved Insights report.
  • mixpanel/list-funnels and mixpanel/query-funnel list saved funnels and return a funnel's step-by-step conversion.
  • mixpanel/query-retention and mixpanel/query-frequency measure how often users come back.
  • mixpanel/query-segmentation, mixpanel/query-segmentation-buckets, mixpanel/query-segmentation-sum and mixpanel/query-segmentation-average count, bucket, sum or average an event over time.
  • mixpanel/query-events returns totals for one or more events.
  • mixpanel/list-top-events, mixpanel/list-event-names, mixpanel/list-top-event-properties, mixpanel/list-event-property-values and mixpanel/query-event-property explore which events, properties and values are most common.
  • mixpanel/export-events downloads raw events for a date range as a file.

Project management

  • mixpanel/create-annotation, mixpanel/list-annotations, mixpanel/get-annotation, mixpanel/update-annotation and mixpanel/delete-annotation manage the notes shown on Mixpanel charts, such as releases and campaign launches.
  • mixpanel/list-annotation-tags and mixpanel/create-annotation-tag list and create the tags you attach to annotations. Mixpanel has no API to delete a tag.
  • mixpanel/list-schemas, mixpanel/list-entity-schemas, mixpanel/get-schema, mixpanel/upsert-schema, mixpanel/upload-schemas and mixpanel/delete-schema read and write Lexicon data definitions, one at a time or as a whole tracking plan.
  • mixpanel/delete-entity-schemas deletes the definitions of one event, or of every event or the user profile, and mixpanel/delete-all-schemas deletes every definition in the project. Events and their data are kept.
  • mixpanel/list-lookup-tables and mixpanel/replace-lookup-table list lookup tables and replace one table's rows with new CSV data.
  • mixpanel/create-pipeline, mixpanel/list-pipelines, mixpanel/get-pipeline-status, mixpanel/list-pipeline-logs, mixpanel/edit-pipeline, mixpanel/pause-pipeline, mixpanel/resume-pipeline and mixpanel/delete-pipeline manage Data Pipelines exports to a warehouse or bucket. Data Pipelines is a paid Mixpanel add-on.
  • mixpanel/query-audit-logs searches the organization's audit log for who changed what, and when. It needs a Service Account with organization admin access.

Experiments and feature flags

  • mixpanel/list-experiments, mixpanel/get-experiment, mixpanel/create-experiment, mixpanel/update-experiment and mixpanel/delete-experiment manage experiments in a workspace.
  • mixpanel/launch-experiment, mixpanel/force-conclude-experiment and mixpanel/decide-experiment start an experiment, end it early, and record whether it succeeded and which variant won.
  • mixpanel/archive-experiment and mixpanel/unarchive-experiment hide an experiment from the active list and bring it back.
  • mixpanel/list-feature-flags, mixpanel/get-feature-flag, mixpanel/create-feature-flag, mixpanel/update-feature-flag and mixpanel/delete-feature-flag manage feature flags and their rollout rules. Disable a flag before you delete it.
  • mixpanel/get-flag-variants returns the variant each enabled flag serves one user, and mixpanel/list-flag-definitions lists every enabled flag with its rules.

Warehouse imports

  • mixpanel/list-warehouse-imports, mixpanel/get-warehouse-import, mixpanel/update-warehouse-import and mixpanel/delete-warehouse-import manage the imports that sync warehouse tables into Mixpanel, including pausing them and changing how often they run.
  • mixpanel/create-event-stream-import, mixpanel/create-people-import, mixpanel/create-group-import and mixpanel/create-lookup-table-import start syncing events, user profiles, group profiles or a lookup table from a warehouse table.
  • mixpanel/run-warehouse-import starts a sync now, and mixpanel/get-warehouse-import-history lists the 30 most recent runs.

Event, property, funnel, cohort, annotation, workspace, experiment, feature flag, warehouse import, lookup table and organization fields offer a dropdown of the values in the connected account, and every field also accepts a mapped value.

Known limitations

  • The Query API allows about 60 queries per hour and 5 at a time per project. Report actions, profile queries, dropdowns and the User Added to Cohort trigger all count toward it. When Mixpanel returns a rate-limit response, TaskJuice retries with backoff.
  • Raw exports are limited to 60 per hour. Lexicon schema changes are limited to 5 per minute.
  • Track Event only accepts events from the last 5 days. Use Import Events for older data.
  • Event and profile writes run in strict mode, so a rejected record fails the step with Mixpanel's validation message instead of being silently dropped.
  • The Events Recorded trigger watches one event name and suits events recording up to about 500 a day. User Added to Cohort suits cohorts up to about 1,000 users.
  • Export Events and the Data Pipelines actions ask for the data residency host on the node, because those APIs use separate regional hosts from the connection. Query Audit Logs asks for the region host for the same reason.
  • Warehouse imports need a Mixpanel plan that includes Warehouse Connectors. On other plans Mixpanel refuses those actions as forbidden.
  • Experiments and feature flags belong to a workspace. Most projects have one workspace, called All Project Data.
  • Mixpanel's activity feed endpoint is in maintenance mode. JQL is not offered because Mixpanel recommends discontinuing it. GDPR data requests and Service Account management are not offered, because they need a personal Mixpanel login rather than the connection's Service Account.
  • Each Service Account connection covers one project. Workflows that span several Mixpanel projects need one connection per project.
Was this helpful?