- Documentation
- Integrations
- Apps
- Mixpanel integration
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
- 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.
- In Project Settings, Overview, copy the numeric Project ID and the Project Token.
- In the client workspace in TaskJuice, go to Connections, choose Mixpanel, and paste the username, secret, Project ID and Project Token.
- Leave the host fields at their defaults for US projects. For EU data residency use
api-eu.mixpanel.comandeu.mixpanel.com. For India useapi-in.mixpanel.comandin.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 anitemsarray. 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 initems, 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:
- Publish the workflow and copy its TaskJuice webhook URL.
- In Mixpanel, open the gear icon, Destinations, Notification Webhook, and select Add Webhook.
- Paste the URL, choose a username and password for Basic authentication, then select Test connection and Submit.
- In TaskJuice, paste the matching
Authorizationheader value (Basicfollowed by the base64 ofusername:password) into the trigger's inbound authentication. - 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-eventrecords one event for a user, with custom properties, an optional timestamp and an optional insert ID for safe retries.mixpanel/import-eventssends 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-aliasandmixpanel/merge-identitieslink 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-profilesets, sets once, increments, unions, appends, removes or deletes properties on a user profile.mixpanel/delete-profilepermanently deletes a user profile.mixpanel/update-group-profilesets, sets once, unions, removes or deletes properties on a group profile such as a company. Requires Group Analytics.mixpanel/delete-group-profilepermanently deletes a group profile.mixpanel/query-profilessearches user or group profiles with a filter expression, 1,000 per page.mixpanel/get-profilefetches one user profile by distinct ID.mixpanel/list-cohortsandmixpanel/list-cohort-memberslist saved cohorts and the users in one.mixpanel/get-profile-activityreturns the events one user performed in a date range.
Reports
mixpanel/query-insightsreturns the result of a saved Insights report.mixpanel/list-funnelsandmixpanel/query-funnellist saved funnels and return a funnel's step-by-step conversion.mixpanel/query-retentionandmixpanel/query-frequencymeasure how often users come back.mixpanel/query-segmentation,mixpanel/query-segmentation-buckets,mixpanel/query-segmentation-sumandmixpanel/query-segmentation-averagecount, bucket, sum or average an event over time.mixpanel/query-eventsreturns totals for one or more events.mixpanel/list-top-events,mixpanel/list-event-names,mixpanel/list-top-event-properties,mixpanel/list-event-property-valuesandmixpanel/query-event-propertyexplore which events, properties and values are most common.mixpanel/export-eventsdownloads raw events for a date range as a file.
Project management
mixpanel/create-annotation,mixpanel/list-annotations,mixpanel/get-annotation,mixpanel/update-annotationandmixpanel/delete-annotationmanage the notes shown on Mixpanel charts, such as releases and campaign launches.mixpanel/list-schemas,mixpanel/upsert-schemaandmixpanel/delete-schemamanage Lexicon data definitions.mixpanel/create-pipeline,mixpanel/list-pipelines,mixpanel/get-pipeline-status,mixpanel/list-pipeline-logsandmixpanel/delete-pipelinemanage 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.