Mixpanel

Server-side event and profile delivery to Mixpanel via the Ingestion API for product analytics, funnel analysis, and user segmentation.

Prerequisites

Before configuring Mixpanel in Datafly Signal, you need a Mixpanel account, a project, and your project token and API secret.

Step 1: Create a Mixpanel Account

  1. Go to mixpanel.com and click Get Started or Sign Up Free.
  2. Sign up with your email, Google, or SSO provider.
  3. During onboarding, select your data residency region:
    • United States (default): Data stored in US data centers.
    • European Union: Data stored in EU data centers. Required for GDPR compliance if your users are in the EU.
⚠️

Data residency is set at the organization level during sign-up and cannot be changed later. All projects within the organization inherit this setting. If you need both US and EU residency, you must create separate organizations.

Step 2: Create a Project

  1. In the Mixpanel dashboard, click the project selector in the top-left corner.
  2. Click Create New Project.
  3. Enter a project name (e.g. “My Website - Production”).
  4. Select a timezone for your project reporting.
  5. Click Create.

Step 3: Find Your Project Token

  1. In the Mixpanel dashboard, click the Settings gear icon.
  2. Go to Project Settings.
  3. Under Access Keys, locate the Project Token.
  4. Copy the token — this is the primary identifier for your project.

The Project Token is safe to use server-side. It identifies your project but cannot be used to read data. You will also need the API Secret for server-side authentication.

Step 4: Find Your API Secret

  1. On the same Project Settings page, locate the API Secret under Access Keys.
  2. Click Show to reveal the API Secret.
  3. Copy the value.
⚠️

The API Secret provides write access to your Mixpanel project. Keep it secure and never expose it in client-side code.

Step 5: Confirm Your Data Residency

To verify which data residency region your organization uses:

  • US: Your Mixpanel dashboard URL starts with mixpanel.com
  • EU: Your Mixpanel dashboard URL starts with eu.mixpanel.com

Select the matching region when configuring the integration in Datafly Signal. This determines which API endpoint events are sent to:

  • US: https://api.mixpanel.com
  • EU: https://api-eu.mixpanel.com

API Endpoint

POST https://api.mixpanel.com/track          (US - events)
POST https://api.mixpanel.com/engage         (US - profiles)
POST https://api-eu.mixpanel.com/track       (EU - events)
POST https://api-eu.mixpanel.com/engage      (EU - profiles)

Events and profile updates are sent as JSON payloads. Authentication is handled via the project token in the request body.

Configuration

FieldTypeRequiredDescription
project_tokenstringYesYour Mixpanel project token. Found in Project Settings > Access Keys.
api_secretsecretYesYour Mixpanel project API secret for server-side authentication. Found in Project Settings > Access Keys.
eu_data_residencybooleanNoEnable to send data to Mixpanel’s EU data center (api-eu.mixpanel.com). Required for EU-resident organizations. Defaults to false (US).

Management UI Setup

  1. Go to Integrations in the sidebar.
  2. Open the Integration Library tab.
  3. Find Mixpanel or filter by Analytics.
  4. Click Install, select a variant if available, and fill in the required fields:
    • Enter your Project Token from Step 3.
    • Paste your API Secret from Step 4.
    • Toggle EU Data Residency on if your organization is EU-based (Step 5).
  5. Click Install Integration to create the integration with a ready-to-use default blueprint.

Management API Setup

curl -X POST http://localhost:8084/v1/admin/integration-catalog/mixpanel/install \
  -H "Authorization: Bearer YOUR_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Mixpanel",
    "variant": "default",
    "config": {
      "project_token": "abc123def456789",
      "api_secret": "your_api_secret",
      "eu_data_residency": false
    },
    "delivery_mode": "server_side"
  }'

Variants

Mixpanel is available in multiple pre-configured variants to match your industry:

VariantKeyDescription
DefaultdefaultStandard Mixpanel server-side event and profile delivery with identity management and property mapping.
Retail & EcommerceretailEcommerce-optimized configuration with purchase event mapping, revenue properties, and product catalog integration.

Each variant provides a tuned default blueprint. You can customise any setting after installation.

Identity

Mixpanel uses a two-part identity model based on distinct_id and $user_id.

Anonymous Users

Before a user is identified, Datafly Signal sends the Datafly anonymous_id as Mixpanel’s distinct_id. This creates an anonymous user profile in Mixpanel.

Identified Users

When your application calls _df.identify(userId), Datafly Signal sends the user ID as $user_id and calls Mixpanel’s $identify operation to merge the anonymous and known user profiles.

_df.identify("user-123", {
  email: "[email protected]",
  plan: "premium"
});

How Mixpanel Resolves Identity

  1. Anonymous visitor: Events arrive with distinct_id set to the Datafly anonymous ID.
  2. User identifies: A call to _df.identify("user-123") triggers a $identify event linking the anonymous distinct_id to the known $user_id.
  3. Merge: Mixpanel merges the anonymous and identified profiles, attributing prior anonymous activity to the identified user.
  4. Subsequent events: All future events include $user_id as the distinct_id.

Event Mapping

Datafly Signal maps standard event names to their Mixpanel equivalents:

Datafly EventMixpanel EventNotes
page (page view)Page ViewedPage URL, title, referrer sent as event properties
Product ViewedProduct ViewedProduct details as event properties
Product AddedProduct AddedProduct details as event properties
Product RemovedProduct RemovedProduct details as event properties
Checkout StartedCheckout StartedCart value, currency, items
Order CompletedOrder CompletedTriggers revenue tracking (see below)
Products SearchedProducts SearchedSearch query as event property
Custom eventsPassed throughAny _df.track("event_name") is sent with its original name

Revenue Tracking

When Datafly Signal receives an Order Completed event, it maps the transaction data to Mixpanel’s revenue tracking:

Datafly PropertyMixpanel PropertyDescription
total or revenue$amountTotal transaction value
currency$currencyISO 4217 currency code
order_idOrder IDTransaction identifier
products[].product_idProduct IDProduct identifier

Revenue events appear in Mixpanel’s Revenue report and are attached to the user profile via the $transaction people operation.

User Properties

When _df.identify() is called with traits, those traits are forwarded to Mixpanel as profile properties via the $set operation on the /engage endpoint:

{
  "token": "abc123def456789",
  "distinct_id": "user-123",
  "$set": {
    "$email": "[email protected]",
    "$name": "Jane Smith",
    "plan": "premium",
    "company": "Acme Inc"
  }
}

Mixpanel reserves certain property names (prefixed with $) for standard fields like $email, $name, $phone, and $city. Datafly Signal automatically maps common trait names to the corresponding Mixpanel reserved properties.

Testing

Once your integration is active and events are flowing, verify in Mixpanel:

  1. In the Mixpanel dashboard, go to Events in the left sidebar.
  2. The Events feed shows events arriving in real-time — look for your tracked event names.
  3. Click on an event to inspect its properties and verify the data is correct.
  4. Go to Users and search by distinct_id or user properties to find a specific user profile.
  5. Check the user’s Activity Feed to see their full event history.

Mixpanel processes events in near real-time. Events typically appear in the dashboard within seconds.

Troubleshooting

SymptomCauseFix
No events in dashboardIncorrect project tokenVerify the project token matches your project in Project Settings > Access Keys
Events arrive but user profiles are emptyProfile updates not enabledEnsure identify calls include user traits and the blueprint maps to the /engage endpoint
Data missing in EU projectWrong data residency settingEnable eu_data_residency in the integration config — US and EU endpoints are completely separate
401 authentication errorInvalid API secretRegenerate the API secret in Project Settings > Access Keys
Revenue not appearingMissing $amount propertyEnsure Order Completed events include a total or revenue property
Duplicate user profilesIdentity not mergedVerify that _df.identify() is called before or alongside tracked events so the $identify operation links anonymous and known IDs
400 bad requestMalformed event payloadCheck Datafly Signal delivery logs for the full Mixpanel error response
Events sent to wrong projectToken mismatchEach Mixpanel project has a unique token — verify you are using the correct one

Delivery

Events are delivered server-side from your Datafly Signal infrastructure directly to the Mixpanel Ingestion API. No client-side Mixpanel scripts are loaded for this integration.

Visit the Mixpanel Ingestion API documentation for full API reference and advanced configuration options.