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
- Go to mixpanel.com and click Get Started or Sign Up Free.
- Sign up with your email, Google, or SSO provider.
- 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
- In the Mixpanel dashboard, click the project selector in the top-left corner.
- Click Create New Project.
- Enter a project name (e.g. “My Website - Production”).
- Select a timezone for your project reporting.
- Click Create.
Step 3: Find Your Project Token
- In the Mixpanel dashboard, click the Settings gear icon.
- Go to Project Settings.
- Under Access Keys, locate the Project Token.
- 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
| Field | Type | Required | Description |
|---|---|---|---|
project_token | string | Yes | Your Mixpanel project token. Found in Project Settings > Access Keys. |
api_secret | secret | No | Not used by the /track route; kept for a future /import route. |
eu_data_residency | boolean | No | Enable for projects enrolled in EU Data Residency: every event goes to api-eu.mixpanel.com. Defaults to false (US). |
Management UI Setup
- Go to Integrations in the sidebar.
- Open the Integration Library tab.
- Find Mixpanel or filter by Analytics.
- 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).
- 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
| Preset | Key | Events |
|---|---|---|
| Default | default | Page view, sign-up, login, search, product view, add to cart, checkout, purchase, refund, lead, subscription start and cancel. |
| Retail | ecommerce | Every event in the ecommerce event spec. |
| B2B / SaaS | saas | Every event in the SaaS event spec. |
| Media & Streaming | media | Every event in the media event spec. |
| Insurance | insurance | Every event in the insurance event spec, plus application_started / application_submitted. |
| Travel | travel | Every 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).
| Source | Mixpanel property |
|---|---|
anonymous_id | $device_id |
user_id | $user_id |
user_id, else anonymous_id | distinct_id |
event_id | $insert_id |
timestamp | time (epoch milliseconds) |
context.ip | ip (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.
Consent
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
- In the Signal Management UI, open your Mixpanel integration and watch the Live Events stream as you trigger events on your site.
- Confirm 200 responses from the Mixpanel
/trackendpoint. - 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:
- In the Mixpanel dashboard, go to Events in the left sidebar.
- The Events feed shows events arriving in real-time — look for your tracked event names.
- Click on an event to inspect its properties and verify the data is correct.
- Go to Users and search by the user ID (
$user_id) or the anonymous ID ($device_id). - 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
| Symptom | Cause | Fix |
|---|---|---|
| No events in dashboard | Incorrect project token | Verify the project token matches your project in Project Settings > Access Keys |
| Events arrive but user profiles are empty | Profiles are not sent | This integration sends events only; profile properties (/engage) are not part of it |
| Data missing in EU project | Wrong data residency setting | Enable eu_data_residency in the integration config — US and EU endpoints are completely separate |
Delivery fails with status 0 | Mixpanel rejected every event in the request | The error names the field; most often the project token is wrong |
| Revenue not appearing | Missing value | Ensure purchase events include value (or the legacy revenue) |
| Duplicate users | Identity not merged | Mixpanel 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 request | Malformed event payload | Check Datafly Signal delivery logs for the full Mixpanel error response |
| Events sent to wrong project | Token mismatch | Each 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.