In the simplest form, the Segment libraries (“Sources”) generate messages about what’s happening in your site or app, and send them to the Segment servers. Segment then translates the content of those messages into different formats for use by other tools (which we call ‘Destinations’), and sends the translated messages to those tools. The Segment servers also archive a copy of the data, and can send data to your storage systems (such as databases, warehouses, or bulk-storage buckets).

For detailed instructions on how to install and initialize the Segment library please refer to the Segment Getting Started Guide.

1. Integrate with Segment

Once you've installed and initialized a Segment library in your application, in order to get your data into Mixpanel follow the instructions for setting up the Mixpanel (Actions) Destination

2. Identify Users

The next thing you need to do is identify your users, so that you can understand what your users are really doing. When you call Segment's identify API, Mixpanel will set the specified userId as the Mixpanel distinct_id along with any additional traits that you provide.

3. Track User Actions

Lastly, track your users' actions using Segment's track API call.

4. Check for Success

Open up Events View in Mixpanel to view incoming events.