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.

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 (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.

Set up the Alert Triggered webhook

Mixpanel has no API for creating webhooks, so you connect this trigger once by hand:

  1. Publish the workflow and copy its TaskJuice webhook URL.
  2. In Mixpanel, open the gear icon, Destinations, Notification Webhook, and select Add Webhook.
  3. Paste the URL, choose a username and password for Basic authentication, then select Test connection and Submit.
  4. In TaskJuice, paste the matching Authorization header value (Basic followed by the base64 of username:password) into the trigger's inbound authentication.
  5. In each alert you want to forward, open Notify and pick your webhook under via Webhook.

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/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-schemas, mixpanel/upsert-schema and mixpanel/delete-schema manage Lexicon data definitions.
  • mixpanel/create-pipeline, mixpanel/list-pipelines, mixpanel/get-pipeline-status, mixpanel/list-pipeline-logs and mixpanel/delete-pipeline manage Data Pipelines exports to a warehouse or bucket. Data Pipelines is a paid Mixpanel add-on.

Event, property, funnel, cohort and annotation fields offer a dropdown of the values in the connected project, 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.
  • Mixpanel's activity feed endpoint is in maintenance mode. JQL is not offered because Mixpanel recommends discontinuing it.
  • Each Service Account connection covers one project. Workflows that span several Mixpanel projects need one connection per project.
Was this helpful?