Mixpanel
Jitsu supports Mixpanel as a destination and sends data using Ingestion API.
Jitsu sends events to Ingestion API filling as much Mixpanel Events Properties as possible from original event data.
Mixpanel destination may also send User Profiles data to Mixpanel accounts that have User Profiles enabled.
Implementation is based on npm-package: mixpanel-destination
Source code on Jitsu Github
Tracking Revenue#
In addition to Mixpanel Default properties, Jitsu automatically sets Revenue
field for each event if original event has revenue
field, e.g. conversion
User Profiles#
If enabled Jitsu sets Mixpanel User Profiles properties
from user_identify
events.
Aliases#
Jitsu automatically create aliases in Mixpanel on user_identify
events if user.id
or user.email
is present in event along with user.anonymous_id
.
User Profiles properties and counters#
Jitsu automatically updates following User Profile properties on every event except user_identify
:
Last ${event name or type}
with_timestamp
of incoming event. E.g.:Last Page View: 2021-11-11T16:12:41
${event name or type}
ā increments counter by 1 for each event. E.g.:Page View: 1
Jitsu automatically increments Lifetime Revenue
User Profile property on events with revenue
field like conversion
Events Customization#
Use JavaScript Transform to set your own event names based on incoming event data:
if ($.doc_path?.startsWith("/shop/")) {
$.event_type = "Shop Page";
}
return $;
Custom event properties#
Jitsu automatically pass all non standard jitsu event properties from original event to Mixpanel. You can add custom property by adding it with JS SDK on the web site or using JavaScript Transform on server side.
Skipping events#
If not all event types are needed in Mixpanel ā you can skip unnecessary evens using JavaScript Transform general skip logic by returning null
:
if ($.event_type === "not_interesting") {
return null;
}
return $;
Configuration#
Mixpanel destination config consists of the following schema:
destinations:
my_mixpanel:
type: npm
package: jitsu-mixpanel-destination@^0.2.0
mode: stream
config:
token: abc123abc123abc123
api_secret: zzzz123123
project_id: "123456"
users_enabled: true
anonymous_users_enabled: false
Configuration Parameters#
Configuration parameters for Mixpanel destination must be provided under template_variables
object. See example above.
Parameter | Type | Description |
---|---|---|
project_id (required) | string | ID of Mixpanel project. Can be found in the Project Details section of a project's settings overview page: https://mixpanel.com/settings/project/ |
token (required) | string | Project Token . A project's token can be found in the Access Keys section of a project's settings overview page: |
api_secret (required) | string | API Secret. A project's API Secret can be found in the Access Keys section of a project's settings overview page: https://mixpanel.com/settings/project/ |
users_enabled | boolean | Enables Mixpanel destination to work with User Profiles. See User Profiles section |
anonymous_users_enabled | boolean | Enables updating User Profiles for anonymous users. Requires users_enabled set to true |