Skip to main content

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

  1. Sign in to Mixpanel (or create a free account).
  2. Create a new project for your store, or open an existing one.
  3. 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

  1. In Mixpanel, open Project Settings (the gear / settings menu).
  2. Copy the Project token.
  3. 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.
  4. 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.

  1. In Mixpanel, open Organization Settings → Service Accounts.

  2. Create a new service account and grant it access to your project.

  3. Copy the Username (it looks like name.123abc.mp-service-account) and the Secret.

    caution

    The Secret is shown only once, at creation time. Copy it immediately.

  4. 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.