Connect Mixpanel to Rig

    Bring the cohorts and funnels your team has built in Mixpanel into the warehouse, so the segments people already argue about by name exist as rows you can join to revenue, support and product data.

    Requirements
    A paid Mixpanel plan, and permission to create a service account
    Time required
    5 mins

    Before you start

    • Service accounts are a paid feature. On a free project the option is not there.
    • You need to know whether your project stores data in the US or the EU. It changes which Mixpanel API answers you, and getting it wrong looks like an authentication failure rather than a region problem.

    Create a service account

    1. Open Mixpanel and make sure you are in the right project. The header shows which one.
    2. Click the gear icon, then Settings, then Project settings.
    3. Go to Service accounts and create one. Give it a role that can read the project.
    4. Copy the username and the secret now. The secret is shown once and is not recoverable.
    5. While you are in project settings, take the project ID from the Overview tab.

    The project ID is a number, not the project name
    Mixpanel uses the numeric ID in its API and the name everywhere in the interface, so it is easy to copy the wrong one. If what you have is words rather than digits, go back to Overview.

    Connect it in Rig

    1. In Rig, open Connections and go to Sources & actions.
    2. Search for Mixpanel and open the card.
    3. Service Account username and Service Account secret: the pair you just created.
    4. Mixpanel project ID: the number from Overview.
    5. Region: leave it as us, or set it to eu if your project has EU data residency.
    6. Click Test, then Sync.

    What Rig pulls in

    Mixpanel lands in its own mixpanel schema, in two tables.

    • Cohorts: every saved cohort in the project, with its name, description, current member count and when it was created. This is the definition and the size of each segment, not the list of who is in it.
    • Funnels: every saved funnel, with its ID and name. Enough to know which funnels your team maintains and to reference them consistently elsewhere.

    Both are merged on their IDs each sync, so a renamed cohort updates in place rather than arriving as a second row, and a deleted one stops being refreshed.

    What does not come across: events, user profiles, retention tables and funnel conversion figures. Those are computed by Mixpanel per query rather than exposed as a table, and the connector does not request them.

    Good to know

    • The useful thing here is vocabulary, not volume. Two tables of definitions sounds thin, and as data it is. What it buys you is that when someone asks about the activated cohort, Rig knows that cohort exists, what it is called and how big it is, instead of guessing at what the phrase means.
    • One connection covers one project. Mixpanel workspaces with a project per environment or per brand need a connection each, since the project ID is part of every request.
    • A service account outlives the person who made it, which is the reason to use one rather than a personal API secret. Someone leaving does not silently stop the sync.
    • Cohort counts are a snapshot, not a history. Each sync overwrites the count with the current one. If you want the count over time, that is a warehouse job: snapshot the table on a schedule downstream.

    Troubleshooting

    • Authentication fails with credentials you know are right: check the region first. An EU project queried against the US endpoint refuses the credentials rather than saying anything about residency, so this reads as a wrong password when it is not one.
    • There is no Service accounts section: the project is on a plan that does not include them, or your role cannot see project settings.
    • The secret is not accepted and you cannot find it again: it was only ever shown at creation. Delete the service account and make a new one.
    • Both tables sync but come back empty: the project genuinely has no saved cohorts or funnels. This connector reflects what is saved in Mixpanel, so nothing saved means nothing to sync.
    • You expected events and there are none: this connector syncs saved cohort and funnel definitions rather than the event stream, so that is its scope rather than a fault.

    What people use this for

    • Give Rig your team's cohort vocabulary
    • Keep an inventory of saved analyses

    More ideas for using Mixpanel

    Was this guide helpful?