How to connect a Mixpanel project
To send data to Mixpanel you need a project and its Project token. To additionally sync customer people profiles, you also need a Service account. This guide walks through obtaining both.
1. Create a Mixpanel project
- Sign in to Mixpanel (or create a free account).
- Create a new project for your store, or open an existing one.
- When creating a project, Mixpanel asks you to choose a data residency - US or EU. Make a note of it; you must select the same value in the extension's Data residency setting.
2. Get the Project token
- In Mixpanel, open Project Settings (the gear / settings menu).
- Copy the Project token.
- In Magento, go to Stores → Settings → Configuration → Mirasvit Extensions → Mixpanel, set Enable Mixpanel to Yes, paste the token into Project token, and select the matching Data residency.
- Save the configuration.
This is all that's required for event tracking - product views, add-to-cart, checkout, purchase, search, and refunds will start flowing into Mixpanel.
3. (Optional) Create a Service account for profile sync
A Service account is only needed if you want to enrich Mixpanel people profiles with customer lifetime value and order statistics.
-
In Mixpanel, open Organization Settings → Service Accounts.
-
Create a new service account and grant it access to your project.
-
Copy the Username (it looks like
name.123abc.mp-service-account) and the Secret.cautionThe Secret is shown only once, at creation time. Copy it immediately.
-
In Magento, paste them into Service account username and Service account secret and save.
See How to sync customer profiles for how the sync works.
4. Match the data residency
Double-check that the Data residency setting matches your project's region. If it doesn't, server-side requests (refunds and profile sync) are sent to the wrong endpoint and Mixpanel will reject them.