# Mixpanel Web Destination

## Destination Info

* Accepts [Page](/docs/segment/connections/spec/page), [Alias](/docs/segment/connections/spec/alias), [Group](/docs/segment/connections/spec/group), [Identify](/docs/segment/connections/spec/identify), [Track](/docs/segment/connections/spec/track) calls.
* Refer to it as **Mixpanel Web (actions)** in the [Integrations object.](/docs/segment/guides/filtering-data/#filtering-with-the-integrations-object)
* This destination is not compatible with [Destination Insert Functions.](/docs/segment/connections/functions/insert-functions/)
* This integration is **partner owned.** Please reach out to the partner's support for any issues.
* This destination is **Beta.**

[Mixpanel](https://mixpanel.com/?utm_source=segmentio\&utm_medium=docs\&utm_campaign=partners) is an event analytics platform that lets product teams understand user behavior, measure engagement, and drive retention through data-driven insights.

This destination is maintained by Mixpanel. For any issues with the destination, [contact the Mixpanel Support team](mailto:support@mixpanel.com).

## Getting started

1. From your workspace's [Destination catalog page](https://app.segment.com/goto-my-workspace/destinations/catalog), search for "Mixpanel Web".
2. Select **Mixpanel Web (Actions)** and click **Add Destination**.
3. Select an existing JavaScript source to connect to Mixpanel Web (Actions).
4. Go to your [Mixpanel project settings](https://mixpanel.com/settings/project), find and copy the **Project Token**.
5. Enter the **Project Token** in the Mixpanel Web destination settings in Segment.

## Destination Settings

| Field                            | Description                                                                                                                               | Required | Type    |
| -------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------- | -------- | ------- |
| API Host                         | The Mixpanel API host to send data to.                                                                                                    | Yes      | string  |
| Autocapture                      | Enable or disable Mixpanel autocapture functionality. Select "Custom" to specify fine grained control over which events are autocaptured. | No       | select  |
| Autocapture Capture Text Content | Capture text content of elements in autocaptured events                                                                                   | Yes      | boolean |
| Autocapture Click                | Capture click events automatically                                                                                                        | Yes      | boolean |
| Cookie Expiration (days)         | Set the cookie expiration time in days for Mixpanel cookies.                                                                              | No       | number  |
| Cross Subdomain Cookie           | Enable or disable cross subdomain cookies for Mixpanel.                                                                                   | No       | boolean |
| Autocapture Dead Click           | Capture dead click events automatically                                                                                                   | Yes      | boolean |
| Disable Persistence              | Disable all persistence mechanisms for Mixpanel.                                                                                          | No       | boolean |
| Autocapture Input                | Capture input events automatically                                                                                                        | Yes      | boolean |
| Send IP Address                  | Enable or disable sending IP address information to Mixpanel.                                                                             | No       | boolean |
| Mixpanel Instance Name           | The name for the new mixpanel instance that you want created.                                                                             | No       | string  |
| Autocapture Pageview             | Capture pageview events automatically                                                                                                     | Yes      | select  |
| Persistence Method               | Set the persistence method for Mixpanel (cookie or localStorage).                                                                         | No       | select  |
| Project Token                    | Your Mixpanel project token.                                                                                                              | Yes      | string  |
| Autocapture Rage Click           | Capture rage click events automatically                                                                                                   | Yes      | boolean |
| Record Block Class               | CSS class to block elements from being recorded in session recordings.                                                                    | No       | string  |
| Record Block Selector            | CSS selector to block elements from being recorded in session recordings.                                                                 | No       | string  |
| Record Canvas                    | Enable or disable recording of canvas elements in session recordings.                                                                     | No       | boolean |
| Record Heatmap Data              | Enable or disable tracking of heatmap events in session recordings.                                                                       | No       | boolean |
| Record Idle Timeout (ms)         | Idle timeout in milliseconds for session recordings.                                                                                      | No       | number  |
| Record Mask Text Class           | CSS class to mask text elements in session recordings.                                                                                    | No       | string  |
| Record Mask Text Selector        | CSS selector to mask text elements in session recordings.                                                                                 | No       | string  |
| Record Max (ms)                  | Maximum recording time in milliseconds for session recordings.                                                                            | No       | number  |
| Record Min (ms)                  | Minimum recording time in milliseconds for session recordings.                                                                            | No       | number  |
| Record Sessions Percent          | Percentage of sessions to record for session recordings.                                                                                  | No       | number  |
| Autocapture Scroll               | Capture scroll events automatically                                                                                                       | Yes      | boolean |
| Autocapture Submit               | Capture form submit events automatically                                                                                                  | No       | boolean |
| Track Marketing Campaigns        | Enable or disable tracking of marketing campaigns in Mixpanel. Includes UTM parameters and click identifiers for various ad platforms.    | No       | boolean |

## Available Presets

Mixpanel Web (actions) has the following presets

| Preset Name | Trigger                 | Default Action |
| ----------- | ----------------------- | -------------- |
| Identify    | Event type = "identify" | Identify       |
| Track       | Event type = "track"    | Track          |

## Available Actions

Build your own Mappings. Combine supported [triggers](/docs/segment/connections/destinations/actions/#components-of-a-destination-action) with the following Mixpanel Web (actions)-supported actions:

> \[!NOTE]
>
> Individual destination instances have support a maximum of 50 mappings.

* [Identify](#identify)
* [Alias](#alias)
* [Track Page View](#track-page-view)
* [Track](#track)
* [Group](#group)

### Identify

Sync user profile data to Mixpanel.

Identify is a **Web** action. The default Trigger is `type = "identify"`

| Field                                | Description                                                                                                                 | Required | Type   |
| ------------------------------------ | --------------------------------------------------------------------------------------------------------------------------- | -------- | ------ |
| Unique ID                            | The unique ID to associate with the user.                                                                                   | Yes      | STRING |
| User Profile Properties to Set       | User Profile Properties to set on the user profile in Mixpanel.                                                             | No       | OBJECT |
| User Profile Properties to Set Once  | User Profile Properties to set once on the user profile in Mixpanel. Values which get set once cannot be overwritten later. | No       | OBJECT |
| User Profile Properties to Increment | User Profile Properties to increment on the user profile in Mixpanel. Values must be numeric.                               | No       | OBJECT |

### Alias

Sync alias data to Mixpanel. Use this to replace a Unique ID with a new one.

Alias is a **Web** action. The default Trigger is `type = "alias"`

| Field       | Description                                 | Required | Type   |
| ----------- | ------------------------------------------- | -------- | ------ |
| Alias ID    | The new ID to associate with the user.      | Yes      | STRING |
| Original ID | The original ID to associate with the user. | Yes      | STRING |

### Track Page View

Sync Segment page events to Mixpanel.

Track Page View is a **Web** action. The default Trigger is `type = "page"`

| Field                                | Description                                                                                                                                           | Required | Type   |
| ------------------------------------ | ----------------------------------------------------------------------------------------------------------------------------------------------------- | -------- | ------ |
| Event Name                           | The name of the event to track in Mixpanel.                                                                                                           | No       | STRING |
| Event Properties                     | Properties to associate with the event.                                                                                                               | No       | OBJECT |
| Unique ID                            | The unique ID to associate with the user. Settings this value will trigger a Mixpanel identify call before immediately the page event is sent.        | No       | STRING |
| User Profile Properties to Set       | User Profile Properties to set on the user profile in Mixpanel.                                                                                       | No       | OBJECT |
| User Profile Properties to Set Once  | User Profile Properties to set once on the user profile in Mixpanel. Values which get set once cannot be overwritten later.                           | No       | OBJECT |
| User Profile Properties to Increment | User Profile Properties to increment on the user profile in Mixpanel. Values must be numeric.                                                         | No       | OBJECT |
| Group Details                        | Details for the group to be created or updated in Mixpanel. Setting this value will trigger a Mixpanel set\_group call before the page event is sent. | No       | OBJECT |
| Group properties to Set              | Group Profile Properties to set on the group in Mixpanel.                                                                                             | No       | OBJECT |
| Group properties to set once         | Group Profile Properties to set once on the group profile in Mixpanel. Values which get set once cannot be overwritten later.                         | No       | OBJECT |
| Group list properties to union       | Merge a list into a list group property. Duplicates will be removed.                                                                                  | No       | OBJECT |

### Track

Sync Segment track events to Mixpanel.

Track is a **Web** action. The default Trigger is `type = "track"`

| Field                                | Description                                                                                                                                            | Required | Type   |
| ------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------ | -------- | ------ |
| Event Name                           | The name of the event to track in Mixpanel.                                                                                                            | Yes      | STRING |
| Event Properties                     | Properties to associate with the event.                                                                                                                | No       | OBJECT |
| Unique ID                            | The unique ID to associate with the user. Settings this value will trigger a Mixpanel identify call before immediately the track event is sent.        | No       | STRING |
| User Profile Properties to Set       | User Profile Properties to set on the user profile in Mixpanel.                                                                                        | No       | OBJECT |
| User Profile Properties to Set Once  | User Profile Properties to set once on the user profile in Mixpanel. Values which get set once cannot be overwritten later.                            | No       | OBJECT |
| User Profile Properties to Increment | User Profile Properties to increment on the user profile in Mixpanel. Values must be numeric.                                                          | No       | OBJECT |
| Group Details                        | Details for the group to be created or updated in Mixpanel. Setting this value will trigger a Mixpanel set\_group call before the track event is sent. | No       | OBJECT |
| Group properties to Set              | Group Profile Properties to set on the group in Mixpanel.                                                                                              | No       | OBJECT |
| Group properties to set once         | Group Profile Properties to set once on the group profile in Mixpanel. Values which get set once cannot be overwritten later.                          | No       | OBJECT |
| Group list properties to union       | Merge a list into a list group property. Duplicates will be removed.                                                                                   | No       | OBJECT |

### Group

Sync Group data to Mixpanel.

Group is a **Web** action. The default Trigger is `type = "group"`

| Field                          | Description                                                                                                                   | Required | Type   |
| ------------------------------ | ----------------------------------------------------------------------------------------------------------------------------- | -------- | ------ |
| Group Details                  | Details for the group to be created or updated in Mixpanel.                                                                   | Yes      | OBJECT |
| Group properties to Set        | Group Profile Properties to set on the group in Mixpanel.                                                                     | No       | OBJECT |
| Group properties to set once   | Group Profile Properties to set once on the group profile in Mixpanel. Values which get set once cannot be overwritten later. | No       | OBJECT |
| Group list properties to union | Merge a list into a list group property. Duplicates will be removed.                                                          | No       | OBJECT |

## Autocapture

Mixpanel's Autocapture feature automatically tracks user interactions without requiring manual instrumentation. You can configure autocapture in three modes:

* **Enabled**: Automatically captures all supported events including page views, clicks, scrolls, form submissions, and input changes.
* **Disabled**: No automatic event capture. Only explicitly tracked events are sent.
* **Custom**: Fine-grained control over which event types to capture (clicks, rage clicks, dead clicks, scrolls, form submissions, input changes) and how page views are tracked.

## User profile properties

The Track, Track Page View, and Identify actions support three methods for updating user profile properties:

* **Set**: Overwrites the property value.
* **Set Once**: Sets the property only if it doesn't already exist. Useful for immutable properties like signup date.
* **Increment**: Adds a numeric value to an existing property. Useful for counters like login count or purchase count.

## Group analytics

Mixpanel supports Group Analytics for company or organization-level analysis. To use groups:

1. Define group keys in your Mixpanel project settings before sending group data.
2. Use the Group action or include group details in Track events to associate users with groups.
3. Set group profile properties using the same set, set once, and union operations available for user profiles.

## Session recording

Mixpanel Web supports session recording through Mixpanel's Replay feature. Configure recording settings including:

* **Sampling rate**: Control what percentage of sessions are recorded.
* **Block and mask selectors**: Define CSS selectors to block or mask sensitive content.
* **Recording duration**: Set minimum and maximum recording times.
* **Canvas recording**: Enable to capture canvas element content.

## Alias

Use [Alias](/docs/segment/connections/spec/alias) events to merge user identities when a user's identifier changes, such as when an anonymous user signs up and receives a new user ID. This creates a link between the original ID and the new alias in Mixpanel.
