Mixpanel

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

Why route Mixpanel through Datafly Signal

  • Your numbers stop depending on what the browser allows. Client-side analytics loses every visit where the tag is blocked or the page unloads early. Signal delivers from the server, so Mixpanel receives the complete event stream.
  • Client IP and user agent are carried in the payload. Both are taken from the original visitor request rather than your server, which is what Mixpanel needs to attribute the event to the right session.
  • Delivery is batched, rate-limited, and retried. Signal buffers to Kafka, respects the Mixpanel rate limit, and retries on 429 or transient failure rather than dropping the event.
  • Presets for Retail and B2B / SaaS. The mapping starts from a working configuration for your vertical instead of a blank field map.
  • One consent decision governs every destination. Mixpanel is gated by the same consent state as the rest of your stack, so a withdrawal applies everywhere at once.

Prerequisites

Before configuring Mixpanel in Datafly Signal, you need a Mixpanel account, a project and its project token.

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, and it is all the /track endpoint needs.

Step 4: API Secret (not needed)

The integration has an API Secret field for a future /import route. Signal does not use it today; leave it empty.

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?verbose=1       (US)
POST https://api-eu.mixpanel.com/track?verbose=1    (EU Data Residency)

Each event is a JSON object {"event": "<name>", "properties": {...}} with the project token in properties.token, time in epoch milliseconds and $insert_id (the Signal event ID) for deduplication (Track Events). verbose=1 makes Mixpanel answer {"status": 1} or {"status": 0, "error": "..."}, so a rejected event is reported instead of counted as delivered.

Configuration

FieldTypeRequiredDescription
project_tokenstringYesYour Mixpanel project token. Found in Project Settings > Access Keys.
api_secretsecretNoNot used by the /track route; kept for a future /import route.
eu_data_residencybooleanNoEnable for projects enrolled in EU Data Residency: every event goes to api-eu.mixpanel.com. 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.
    • 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",
      "eu_data_residency": false
    },
    "delivery_mode": "server_side"
  }'

Presets

PresetKeyEvents
DefaultdefaultPage view, sign-up, login, search, product view, add to cart, checkout, purchase, refund, lead, subscription start and cancel.
RetailecommerceEvery event in the ecommerce event spec.
B2B / SaaSsaasEvery event in the SaaS event spec.
Media & StreamingmediaEvery event in the media event spec.
InsuranceinsuranceEvery event in the insurance event spec, plus application_started / application_submitted.
TraveltravelEvery event in the travel event spec.

Each event keeps its Signal name (page views are sent as page_view) and its documented properties as event properties, numbers typed as numbers. Events a preset does not list are not sent. You can customise any preset after installation.

Identity

Signal follows Mixpanel’s server-side Simplified ID Merge guidance: every event carries $device_id (the Signal anonymous ID) and, once the visitor is identified, $user_id (the user_id from datafly.identify()). Signal also sets distinct_id to the user ID once known, else the anonymous ID: under Simplified ID Merge that is the value Mixpanel would derive (a set distinct_id must equal $user_id), and projects on the Original ID Merge API, the default for organisations created before April 2024, need it on every event. Mixpanel merges $device_id and $user_id when an event carries both (Simplified ID Merge only).

SourceMixpanel property
anonymous_id$device_id
user_id$user_id
user_id, else anonymous_iddistinct_id
event_id$insert_id
timestamptime (epoch milliseconds)
context.ipip (Mixpanel derives city, region and country from it)
context.page.url / context.page.referrer$current_url / $referrer
context.campaign.*utm_source, utm_medium, utm_campaign, utm_term, utm_content

identify() traits are not forwarded, and user profile updates (/engage) are not part of this integration. Event properties are forwarded as sent, so keep personal data out of track() properties (the event specs require it), and the client IP is sent as ip for geolocation.

Default consent category: analytics. Events are suppressed for visitors who have not consented to analytics tracking.

Revenue

purchase carries value (a number), currency, transaction_id and the items array as event properties. Use value as the revenue property in Mixpanel’s reports.

Verify it’s working

  1. In the Signal Management UI, open your Mixpanel integration and watch the Live Events stream as you trigger events on your site.
  2. Confirm 200 responses from the Mixpanel /track endpoint.
  3. In Mixpanel, open Events in the left sidebar — events arrive in seconds.

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 the user ID ($user_id) or the anonymous ID ($device_id).
  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 emptyProfiles are not sentThis integration sends events only; profile properties (/engage) are not part of it
Data missing in EU projectWrong data residency settingEnable eu_data_residency in the integration config — US and EU endpoints are completely separate
Delivery fails with status 0Mixpanel rejected every event in the requestThe error names the field; most often the project token is wrong
Revenue not appearingMissing valueEnsure purchase events include value (or the legacy revenue)
Duplicate usersIdentity not mergedMixpanel merges $device_id and $user_id when one event carries both: call datafly.identify() so later events carry the user ID. Projects on the Original ID Merge API merge only on an $identify event, which Signal does not send; enable Simplified ID Merge for automatic merging
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.

Blueprint

The Mixpanel blueprint version is 0.4.0 (not yet tested against a live Mixpanel project). It ships with Default, Retail, B2B / SaaS, Media & Streaming, Insurance and Travel presets.

See also

  • Amplitude — alternative product analytics destination.
  • Heap — autocapture product analytics.