Skip to main content
The Mixpanel live data source reads one Mixpanel project. Lightdash turns each query into a Query API report, and Mixpanel computes the event counts, unique users, funnels and retention itself. Event data stays in Mixpanel. It’s a level 3 integration: its API runs reports from a fixed menu.

Before you start

  • Live data sources enabled for your organization. See Live data sources.
  • Admin role in the Lightdash project.
  • A Mixpanel plan with the Query API, Growth or Enterprise.
  • A service account with access to the project. In Mixpanel, open Organization settings → Service accounts, create one, give it access to the project, and copy its username and secret. Mixpanel shows the secret only when it creates the account.
  • The project ID, the number after /project/ in the project’s URL, or under Project settings → Overview.
  • The project’s data region: US, EU or India. Projects you open at eu.mixpanel.com are in the EU, and at in.mixpanel.com in India.

Connect Mixpanel

  1. On the nav bar, click Browse → Semantic Layer.
  2. In the sidebar, select Live data sources, then click Add.
  3. Select Mixpanel.
  4. Choose the Data region, enter the Project ID, the Service account username and its Secret, then click Test. A working account shows how many events the project tracked in the last 31 days.
  5. Under Details, check the Name and Explore prefix. People see the name in Explore and agents use it to refer to the source. The prefix is filled in from the name and can’t be changed later. See Explore prefix.
  6. Click Add source.
Lightdash adds Top events today, Events, Funnel and Retention tables to Explore, grouped under the source’s name. To use another service account or project, delete the source and add it again; you can reattach the deleted source so its charts keep working.

Tables

  • Top events today lists the project’s most common events so far today.
  • Events needs an Event filter with 1 to 3 event names; Mixpanel counts one event per call. It can be filtered and grouped by these event properties, grouped by one at a time: Country, Region, City, Browser, OS, Device, Library, Referring domain, UTM source, UTM medium and UTM campaign.
  • Funnel reads a funnel saved in Mixpanel. Filter Funnel ID to the number in the funnel report’s URL. Its steps and conversion window come from the saved funnel, and it covers the whole date range.
  • Retention needs a cohort dimension and the matching Days, Weeks or Months after start. Filter Start event to put users in a cohort the first time they did it; without it, a cohort is everyone who did the return event in that period. Filter Return event to choose what counts as coming back; without it, any event counts. Period 0 is the cohort’s own day, week or month, where every user counts, and a query reads at most 90 days, 52 weeks or 24 months after start.
Unique users and rates are counted once per row. Choose a coarser date grain instead of adding rows together.

Supported features

Limits

Mixpanel allows 60 Query API calls an hour and 5 at once per project, shared with every other tool that reads the project. Lightdash uses at most 40 of them an hour to leave room for those tools, and caches results for an hour, so repeated queries don’t count again. Custom event and user properties, user profiles, sums and averages of numeric properties, saved Insights reports, sessions and user paths aren’t available from the Mixpanel source.

Example questions

  • “Daily Sign Up events over the last 30 days.”
  • “Monthly unique users of Export Report this year, by country.”
  • “Step-by-step conversion of saved funnel 1234567 this month.”
  • “Weekly retention of users who signed up in the last quarter.”

Troubleshooting

Mixpanel rejected the service account. Copy the username and secret again. A deleted or expired service account stops working. Mixpanel denied access. Check that the service account was added to the project, and that the Project ID and Data region match it. Mixpanel rate limit reached. The project has used its 60 calls this hour, possibly through other tools. Wait, or use cached results.