Migrate from Mixpanel to Amplitude
The Amplitude Professional Services team compiled this guide to help you migrate from Mixpanel and start getting insights quickly.
Customer case study
Learn how Whisk migrated from Mixpanel to Amplitude on the Amplitude Blog.
Import Mixpanel historical data
Self-service Migrations panel
Amplitude now includes a Migrations panel under the Data tab that imports Mixpanel event data through a guided UI, with no API calls required. Refer to Self-service data migrations for details.
Amplitude offers two options to migrate historical data from Mixpanel using APIs:
- The Mixpanel import tool: Best for sending historical event data quickly.
- The Batch Event Upload API: Best for sending historical data, including events and user profile properties, at scale.
Mixpanel import tool
With your Mixpanel project's API key or service account credentials, this tool uses Mixpanel's Export API to export event data from Mixpanel and import it to your Amplitude project.
Limitations
- The tool processes about 160,000 events per batch.
- The tool doesn't support User Profile imports. To import user profile information, use one of the following options:
- Export your data from Mixpanel with the Mixpanel Export and Engage APIs, and import it to Amplitude with the Batch Event Upload API.
- Contact Amplitude Support or your Amplitude account manager to get custom services from Amplitude's Professional Services team.
Troubleshooting
If the import tool responds with an authentication error:
- Confirm you provide the correct authentication to the Mixpanel import tool.
- If you use your Mixpanel project's API key, reference the correct project. Each project in Mixpanel has its own API key.
- If you use a Mixpanel service account, enter the credentials as follows:
| Service account value | Amplitude field |
|---|---|
| Username | The username field in the import tool |
| Password | The API Key field |
| Project ID | The Project ID field |
- If you don't have the username and password for your Mixpanel project's service account, create a new service account for your project and copy the values.
- Confirm your Mixpanel service account has permission to access the information you need. Test your credentials with Mixpanel's Download Data page. If the page responds with a
200status, your service account has the necessary permissions.
If the import tool doesn't complete or responds with a generic error:
- The data set may be too large to process. Try again with a narrower time range, aiming for no more than ~160,000 events per batch.
If the tool imports fewer transactions than expected:
- Amplitude detects and excludes duplicate events. If your data contains many duplicates, Amplitude imports fewer events than expected.
- Some Mixpanel events may not be compatible with Amplitude events because of missing information. If your Mixpanel instrumentation doesn't capture fields like
name,date, ordevice ID, Amplitude may not import those events.
Amplitude Batch Event Upload API
Export your data from Mixpanel through the Mixpanel API and upload it to Amplitude with the Batch Event Upload API. If you host your data in another external source, you can also use the batch endpoint to upload data to Amplitude.
Professional Services
To get custom services from the Amplitude Professional Services team, contact your Amplitude account manager.
Plan new Amplitude tracking from Mixpanel
Set product goals
Before you start implementation, confirm that stakeholders and team members agree on what you want to get from the data and which use cases to focus on.
Common use cases by industry
Goal: Understand product engagement.
Key points
- See how your users convert through critical funnels: acquisition (free trial, sales, partner, POC), onboarding, activation, workflow, cross-sell/upsell funnels.
- Target the right customers at the right time to move them through a critical funnel.
- Find patterns in the way your customers move through key milestones (acquisition, onboarding, activation, renewal).
- Understand different customer segments’ use and adoption to define key personas based on use cases and needs.
- Optimize your product experience to target different customers personas needs and make them more successful.
Design and instrument a data taxonomy
- Review the Mixpanel to Amplitude Taxonomy workbook, built from common use cases of Amplitude customers who migrated from Mixpanel.
- For broader taxonomy guidance, refer to the Data Taxonomy Playbook.
Choose an instrumentation method
You can send data to Amplitude client-side, server-side, or through a third party. Use the following options based on where you track events:
- Client-side event tracking: use the Amplitude SDK Catalog. To replace your existing Mixpanel instrumentation, use the code mappings.
- Server-side event tracking: use the Amplitude HTTP API.
Map Mixpanel code to Amplitude
The following table maps Mixpanel JavaScript SDK calls to Browser SDK 2 calls. Other Amplitude SDKs use the same concepts with platform-specific syntax.
| Mixpanel | Amplitude | Notes |
|---|---|---|
mixpanel.track() | amplitude.track() | Takes an event name and an object of event properties. |
mixpanel.identify(user_id) | amplitude.setUserId(user_id) | In Amplitude, identify() sets user properties. It doesn't set the user ID. |
mixpanel.people.set() | Identify().set() | Send the Identify object with amplitude.identify(). |
mixpanel.people.set_once() | Identify().setOnce() | |
mixpanel.people.increment() | Identify().add() | Pass a negative number to decrement. |
mixpanel.people.append() | Identify().append() | |
mixpanel.people.union() | Identify().postInsert() | Adds the value only if the list doesn't already contain it. |
mixpanel.people.remove() | Identify().remove() | |
mixpanel.people.unset() | Identify().unset() | |
mixpanel.register() | An enrichment plugin | Amplitude has no super properties. A plugin adds the properties to every event. |
mixpanel.reset() | amplitude.reset() | Clears the user ID and generates a new device ID. |
mixpanel.alias() | No SDK call | Amplitude merges anonymous activity with a user automatically. Refer to Identity merge. |
Track events
mixpanel.track("Article Completed", {
title: "How to Create a Tracking Plan",
course: "Intro to Analytics",
});
Identify users and set user properties
mixpanel.identify("user-12345");
mixpanel.people.set({ plan: "Enterprise", email: "grace@example.com" });
mixpanel.people.set_once("first_login_date", "2026-10-30");
mixpanel.people.increment("login_count", 1);
mixpanel.people.union("devices", "iPhone");
Replace super properties
Mixpanel super properties attach to every event the SDK sends. Amplitude has no super properties. To get the same result, add an enrichment plugin that sets the properties on each event.
mixpanel.register({ app_version: "4.2.0" });
If the value describes the user rather than the event, set it as a user property with Identify().set() instead. Amplitude applies the latest user property values to every later event from that user.
Reset on logout
mixpanel.reset();
Identity merge
Mixpanel uses alias() and identify() to link an anonymous distinct_id to a known user. Amplitude doesn't need an extra call. When you call setUserId(), Amplitude merges the anonymous events from that device ID with the user. For details, refer to Track unique users.
Amplitude doesn't merge two different user IDs automatically. To map one user ID to another across projects, use the User Mapping (Aliasing) API, which requires the Portfolio add-on.
Minimum ID length
Amplitude requires user IDs and device IDs to have at least 5 characters. If an ID is shorter, Amplitude removes it from the event. If the event then has neither a user ID nor a device ID, Amplitude can reject it. Mixpanel has no minimum, so check for short IDs such as numeric database keys ("42") before you migrate.
To accept shorter IDs, either:
- Set the
minIdLengthoption when you initialize Browser SDK 2. - Pass
min_id_lengthin the request options for the HTTP V2 API or Batch Event Upload API, including when you import historical data.
Autocapture differences
The two SDKs have opposite defaults. The Mixpanel JavaScript SDK captures nothing automatically unless you set autocapture or track_pageview. Browser SDK 2 captures events as soon as you initialize it. If you didn't turn on Mixpanel autocapture, expect new events in Amplitude that you never tracked in Mixpanel.
With the default configuration, Browser SDK 2 captures the following:
- Page views
- Sessions (start and end)
- Marketing attribution
- Form interactions (start and submit)
- File downloads
- Page URL properties on every event
Don't send duplicate events from your own code for these interactions.
Element clicks, frustration interactions (such as rage clicks), web vitals, and network requests are off by default.
If you turned on Mixpanel autocapture, it captured clicks, dead clicks, rage clicks, input changes, form submits, scrolling, and page views. To capture the same interactions in Amplitude, turn on autocapture.elementInteractions for clicks and input changes, and autocapture.frustrationInteractions for dead clicks and rage clicks. For all options, refer to Autocapture.
Mixpanel names autocaptured events with a $mp_ prefix, for example $mp_click and $mp_web_page_view. Amplitude uses an [Amplitude] prefix, for example [Amplitude] Element Clicked and [Amplitude] Page Viewed. Update charts and saved analyses that use the Mixpanel event names.
Data privacy considerations
Consider the following features and areas when managing your customer data:
- Time to Live (TTL): Amplitude feature that controls how long event data lives in your Amplitude instance.
- How to manage Opt-Outs: SDK settings that let your website visitors disable activity tracking.
- IP Address: Amplitude captures IP address and location-based details by default with client-side tracking. To disable this tracking, refer to Browser SDK | Optional Tracking.
- User Privacy API: API to delete all data for a set of known Amplitude IDs or User IDs.
- Amplitude's Stance on Security & Privacy
GDPR compliance
Amplitude is fully GDPR compliant. For more information about compliance, refer to Security and Privacy.
Amplitude maintains a user privacy API that lets you service end user data deletion requests.
Feedback or questions
To submit feedback or questions about this implementation guide, use this form.
Was this helpful?
For AI agents: a documentation index is available at /docs/llms.txt. Append .md to any page URL for markdown, or send Accept: text/markdown.