Mixpanel

Mixpanel

Send event data to Mixpanel

The configuration process for this destination mirrors Segment's setup. We've automatically modified the documentation from third-party sources to show you how to set up this destination with PostHog.

Mixpanel enables you to build better products through powerful, self-serve product analytics to help you convert, engage, and retain more users.

Installation

  1. Go to your Mixpanel project settings. Copy the Mixpanel API Key and API Secret for your project.
  2. From the PostHog web app, click Data pipelines, then click Destinations.
  3. Find the Destinations Actions item in the left navigation, and click it.
  4. Click the "Mixpanel" item to select it and click Configure.
  5. Choose which of your sources to connect the destination to. (You can connect more sources to the destination later.)

Configuration

OptionDescription
Project Token
Type: string
Required: True

Mixpanel project token.

Secret Key
Type: string
Required: True

Mixpanel project secret.

Data Residency
Type: choice
Required: False

Learn about EU data residency and India data residency

Source Name
Type: string
Required: False

This value, if it's not blank, will be sent as segment_source_name to Mixpanel for every event/page/screen call.

Strict Mode
Type: choice
Required: False

This value, if it's 1 (recommended), Mixpanel will validate the events you are trying to send and return errors per event that failed. Learn more about the Mixpanel Import Events API

Debug Mode
Type: boolean
Required: False

Will log configuration and request details

Using our REST API you can create this destination like so:

Terminal
# Create a new destination
curl --location 'https://us.i.posthog.com/api/environments/:project_id/hog_functions' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer <POSTHOG_PERSONAL_API_KEY>' \
--data '{
"type": "destination",
"name": "Mixpanel",
"inputs": {
"projectToken": {
"value": ""
},
"apiSecret": {
"value": ""
}
},
"enabled": true,
"template_id": "segment-actions-mixpanel"
}'

FAQ

Is the source code for this destination available?

Yes. The source code is available on GitHub.

Who maintains this?

This is maintained by Segment. If you have issues with it not functioning as intended, please let us know!

What if I have feedback on this destination?

We love feature requests and feedback. Please tell us what you think.

What if my question isn't answered above?

We love answering questions. Ask us anything via our community forum.

Parts of this page are sourced from segmentio/segment-docs under the Creative Commons Attribution 4.0 International License. The content may have been modified according to this code.