Skip to main content

Mixpanel

Server Source code Package

Server-side event delivery to Mixpanel for product analytics, people profiles, and group analytics via the official mixpanel Node.js SDK.

Where this fits

Mixpanel is a server destination in the walkerOS flow:

Sends events server-side to Mixpanel via `/track` (real-time, up to 5 days old) or `/import` (historical, any age). Supports people profile operations, group analytics, and identity resolution.

Installation

Loading...
Loading...

Configuration

This destination uses the standard destination config wrapper (consent, data, env, id, ...). For the shared fields see destination configuration. Package-specific fields live under config.settings and are listed below.

Settings

PropertyTypeDescriptionMore
apiKey*stringYour Mixpanel project token. Find it in Project Settings > Access Keys. Passed as the first argument to Mixpanel.init().
secretstringAPI secret for the /import endpoint (historical data). Required when useImport is true.
hoststringMixpanel API host. Default: 'api.mixpanel.com' (US). Use 'api-eu.mixpanel.com' (EU) or 'api-in.mixpanel.com' (India).
protocolstringProtocol for API requests. Default: 'https'.
keepAlivebooleanReuse HTTP connections. Default: true.
geolocatebooleanParse IP for geolocation. Default: false. Server IP caveat: all users map to server location unless $ip is overridden.
debugbooleanEnable SDK debug logging. Default: false.
verbosebooleanEnable verbose request logging. Default: false.
testbooleanEnable dry-run mode. Default: false.
useImportbooleanUse /import endpoint instead of /track. Accepts events of any age (no 5-day limit). Requires secret for authentication.
identifyanywalkerOS mapping value resolving to { distinctId, alias? }. distinctId is passed as distinct_id on every SDK call.
includeanyEvent data sections to flatten into track() properties. Example: ['data', 'globals']. Sections are prefixed (data_, globals_, etc.).
* Required fields

Mapping

Per-event rules under config.mapping. For the standard rule fields (consent, condition, data, batch, name, policy) see mapping.

PropertyTypeDescriptionMore
identifyanyPer-event identity mapping. Resolves to { distinctId, alias? }. distinctId is passed as distinct_id to all SDK calls.
peopleanyPer-event people operations. Resolves to an object with any of: set, set_once, increment, append, union, remove, unset, delete_user. Each key fires a separate mp.people.* call with distinct_id as first arg.
groupanyPer-event group association. Resolves to { key, id }. The group key/id is added as a track() property.
groupProfileanyPer-event group profile operations. Resolves to { key, id, set?, set_once?, union?, remove?, unset?, delete? }. Fires mp.groups.* calls.
useImportanyPer-event import flag. When truthy, uses mp.import() instead of mp.track() for this rule.

Examples

Alias before track

A user login merges a prior anonymous id into the new user id via mp.alias before sending the track event.

Event
Mapping
Out

Common people operations

A profile update exercises the common Mixpanel people vocabulary: set, set_once, increment, append, union, remove, and unset. delete_user is not covered by this example.

Event
Mapping
Out

Group profile

A company update sets Mixpanel group profile properties via groups.set and groups.set_once.

Event
Mapping
Out

Default track

A walkerOS event is forwarded to Mixpanel as a track call with the user id as the distinct_id.

Event
Out

Historical import

Setting useImport routes the event through mp.import for backfilling historical Mixpanel data.

Event
Out

Per-event identify

A mapping-level identify overrides the destination default to resolve the distinct_id from event data.

Event
Mapping
Out

Track with group

A group key and id are attached as a Mixpanel track property so the event is associated with a company or account.

Event
Mapping
Out

Track with include

A destination-level include flattens the event data section into prefixed Mixpanel track properties.

Event
Out

User login people

A user login fires Mixpanel people.set, set_once, and increment operations without sending a track event.

Event
Mapping
Out
💡 Need implementation support?
elbwalker offers hands-on support: setup review, measurement planning, destination mapping, and live troubleshooting. Book a 2-hour session (€399)