# Mixpanel (Actions) 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 (Actions)** in the [Integrations object.](/docs/segment/guides/filtering-data/#filtering-with-the-integrations-object)
* This integration is **partner owned.** Please reach out to the partner's support for any issues.

> \[!NOTE]
>
> This page is about the Mixpanel (Actions) Destination. See below for information about other versions of the Mixpanel destination:
>
> * [Mixpanel (Classic)](/docs/segment/connections/destinations/catalog/mixpanel)

[Mixpanel](https://mixpanel.com/) lets you build better products through powerful, self-serve product analytics to help you convert, engage, and retain more users.

## Benefits of Mixpanel (Actions) vs Mixpanel Classic

Mixpanel (Actions) provides the following benefits over the classic Mixpanel destination:

* **Simpler setup** - Mixpanel (Actions) has a streamlined default setup process making it easier to get started in a way that "just works".
* **More control** - Actions-based destinations enable you to define the mapping between the data Segment receives from your source, and the data Segment sends to the destination.
* **Additional default property mappings** - More default mappings from the Segment context like app name, app namespace, device type, and more.
* **Improved Groups support** - Implementation of [Segment Groups](/docs/segment/connections/spec/group/) with [Mixpanel Group Analytics](https://help.mixpanel.com/hc/en-us/articles/360025333632-Group-Analytics) is easier. If you're already using Segment Groups, no code changes are required.
* **E-commerce mappings** - Mixpanel (Actions) accepts products nested within arrays in the `Order Completed` event as described in the Segment [ecommerce spec](/docs/segment/connections/spec/ecommerce/v2/#order-completed).
* **Batching Requests** - If you have a lot of events, Mixpanel (Actions) provides more efficient way to receive and process those large sets of data.

## Getting started

1. Go to your [Mixpanel project settings](https://mixpanel.com/report/settings/#account/projects). Copy the Mixpanel API Key and API Secret for your project.
2. In the your Segment workspace, click **Catalog**, then click **Destinations**.
3. Navigate to **Destinations Actions**, select "Mixpanel", then click **Add destination**.
4. Choose which of your sources to connect the destination to. (You can connect more sources to the destination later.)

### Connection modes for Mixpanel (Actions) destination

The Mixpanel (Actions) destination does not offer a device-mode connection mode. If you're using one of Segment's libraries ([Analytics.js 2.0](/docs/segment/connections/sources/catalog/libraries/website/javascript/), [Swift](https://github.com/segmentio/analytics-swift) or [Kotlin](https://github.com/segmentio/analytics-kotlin)) with the Actions-framework version of the destination, you do not need the device-mode connection.

## Destination Settings

| Field          | Description                                                                                                                                                                                                                                        | Required | Type     |
| -------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------- | -------- |
| Data Residency | Learn about \[EU data residency]\(https://docs.mixpanel.com/docs/privacy/eu-residency) and \[India data residency]\(https://docs.mixpanel.com/docs/privacy/in-residency)                                                                           | No       | select   |
| Secret Key     | Mixpanel project secret.                                                                                                                                                                                                                           | Yes      | password |
| Project Token  | Mixpanel project token.                                                                                                                                                                                                                            | Yes      | string   |
| Source Name    | This value, if it's not blank, will be sent as segment\_source\_name to Mixpanel for every event/page/screen call.                                                                                                                                 | No       | string   |
| Strict Mode    | 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]\(https://developer.mixpanel.com/reference/import-events) | No       | select   |

## Available Presets

Mixpanel (Actions) has the following presets

| Preset Name           | Trigger                                             | Default Action      |
| --------------------- | --------------------------------------------------- | ------------------- |
| Page Calls            | Event type = "page"                                 | Track Event         |
| Track Calls           | Event type = "track" and event != "Order Completed" | Track Event         |
| Order Completed Calls | Event type = "track" and event = "Order Completed"  | Track Purchase      |
| Identify Calls        | Event type = "identify"                             | Identify User       |
| Group Calls           | Event type = "group"                                | Group Identify User |
| Screen Calls          | Event type = "screen"                               | Track Event         |

## Available Actions

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

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

* [Alias](#alias-2)
* [Group Identify User](#group-identify-user)
* [Track Event](#track-event-22)
* [Identify User](#identify-user-12)
* [Track Purchase](#track-purchase)
* [Increment Properties](#increment-properties)

### Alias

Create an alias to a distinct id. This action is primarily supported for the sake of customers using the legacy identity management in their Mixpanel project. For new customers or those who have [migrated](https://help.mixpanel.com/hc/en-us/articles/360039133851-Moving-to-Identity-Merge?source=segment-actions) to the [new identity management](https://help.mixpanel.com/hc/en-us/articles/360041039771-Getting-Started-with-Identity-Management?source=segment-actions) in Mixpanel should use `identify`.

Alias is a **Cloud** action.

| Field       | Description                                                                                               | Required | Type   |
| ----------- | --------------------------------------------------------------------------------------------------------- | -------- | ------ |
| Alias       | A new distinct id to be merged with the original distinct id. Each alias can only map to one distinct id. | No       | STRING |
| Distinct ID | A distinct id to be merged with the alias.                                                                | No       | STRING |

### Group Identify User

Updates or adds properties to a group profile. The profile is created if it does not exist. [Learn more about Group Analytics.](https://help.mixpanel.com/hc/en-us/articles/360025333632-Group-Analytics?source=segment-actions)

Group Identify User is a **Cloud** action. The default Trigger is `type = "group"`

| Field            | Description                                                                                                                     | Required | Type   |
| ---------------- | ------------------------------------------------------------------------------------------------------------------------------- | -------- | ------ |
| Group Key        | The group key you specified in Mixpanel under Project settings. If this is not specified, it will be defaulted to "$group\_id". | No       | STRING |
| Group ID         | The unique identifier of the group. If there is a trait that matches the group key, it will override this value.                | Yes      | STRING |
| Group Properties | The properties to set on the group profile.                                                                                     | No       | OBJECT |

In the default configuration, Mixpanel (Actions) triggers this action when it receives a Group call.

> \[!WARNING]
>
> Group Analytics is available as an add-on package to customers on [Growth](https://mixpanel.com/pricing/) and [Enterprise](https://mixpanel.com/pricing/) plans.

This action sets or updates the properties of specific groups. Use this when you want to update properties on a [group profile](https://help.mixpanel.com/hc/en-us/articles/360025333632-Group-Analytics#group-profiles).

The Groups model in Segment is slightly different than in Mixpanel. To explain the conceptual difference, it may help to think in terms of database tables. In Segment, there is a single "groups" table. You can have as many group rows as you want and each row has a unique identifier. When you want to set traits on that group, you only need to know the group ID.

However, in Segment you cannot distinguish between "types" of groups. For example, a user can belong to a "Company" as well as a "Team". There is no way to differentiate between those in Segment. In Mixpanel, you can have multiple group types which are defined by a `group key`. To update group traits in Mixpanel you need to specify the `group key` *and* `group id`.

### Default group key

By default, the Mixpanel (Actions) destination uses `$group_id` as the group key. Create a new group in Mixpanel with `$group_id` as the group key to complete the configuration.

1. Go to your [Mixpanel project](https://mixpanel.com/report) settings.
2. Scroll to the "Group Keys" section. If this section doesn't exist, you may not have the Group Analytics add-on.
3. Create the new group key:

![GIF showing how to add a Group Key in Mixpanel's Group Keys section.](https://docs-resources.prod.twilio.com/38512d4ca87d45126fc32e190c1c7aed75592b3c6922582c6de47f4e5797dca7.gif)

### Using a different group key

If you already have a group set up in Mixpanel with a different group key and wish to use that one, you can specify it in the `Group Key` field of the destination configuration.

### Backwards-compatibility with Mixpanel Classic destination

In the classic destination, the "group ID" specified in the Segment SDK call was ignored and you were required to set a trait where the key of the trait is the group key and the value of that trait is the group ID. While that is no longer necessary, this behavior is supported in the Mixpanel (Actions) destination to ensure backwards-compatibility. *If* you specify a trait that matches specified group key, Mixpanel uses the value of that trait as the group ID.

#### Scenario 1: No group key trait specified

```js
analytics.group("0e8c78ea9d97a7b8185e8632", {
  name: "Initech",
  industry: "Technology",
  employees: 329,
  plan: "enterprise",
  "total billed": 830
});
```

The group ID that Mixpanel will use is `0e8c78ea9d97a7b8185e8632`.

#### Scenario 2: Group key trait IS specified

```js
analytics.group("0e8c78ea9d97a7b8185e8632", {
  $group_id: "12345",
  name: "Initech",
  industry: "Technology",
  employees: 329,
  plan: "enterprise",
  "total billed": 830
});
```

The group ID that Mixpanel will use is `12345`.

> \[!TIP]
>
> The below special traits will be mapped to Mixpanel reserved properties automatically to fit Mixpanel's use cases. `traits.name` -> `$name`.

### Track Event

Send an event to Mixpanel. [Learn more about Events in Mixpanel](https://help.mixpanel.com/hc/en-us/articles/360041995352-Mixpanel-Concepts-Events?source=segment-actions)

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

| Field                            | Description                                                                                                                                                                                                                           | Required | Type     |
| -------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------- | -------- |
| Event Name                       | The name of the action being performed.                                                                                                                                                                                               | Yes      | STRING   |
| Distinct ID                      | A distinct ID specified by you.                                                                                                                                                                                                       | No       | STRING   |
| Anonymous ID                     | A distinct ID randomly generated prior to calling identify.                                                                                                                                                                           | No       | STRING   |
| User ID                          | The distinct ID after calling identify.                                                                                                                                                                                               | No       | STRING   |
| Group ID                         | The unique identifier of the group that performed this event.                                                                                                                                                                         | No       | STRING   |
| Insert ID                        | A random id that is unique to an event. Mixpanel uses $insert\_id to deduplicate events.                                                                                                                                              | No       | STRING   |
| Timestamp                        | The timestamp of the event. Mixpanel expects epoch timestamp in millisecond or second. Please note, Mixpanel only accepts this field as the timestamp. If the field is empty, it will be set to the time Mixpanel servers receive it. | No       | DATETIME |
| App Name                         | The name of your application.                                                                                                                                                                                                         | No       | STRING   |
| App Namespace                    | The namespace of your application.                                                                                                                                                                                                    | No       | STRING   |
| App Build                        | The current build of your application.                                                                                                                                                                                                | No       | STRING   |
| App Version                      | The current version of your application.                                                                                                                                                                                              | No       | STRING   |
| OS Name                          | The name of the mobile operating system or browser that the user is using.                                                                                                                                                            | No       | STRING   |
| OS Version                       | The version of the mobile operating system or browser the user is using.                                                                                                                                                              | No       | STRING   |
| Device ID                        | A unique identifier for the device the user is using.                                                                                                                                                                                 | No       | STRING   |
| Device Type                      | The type of the user's device.                                                                                                                                                                                                        | No       | STRING   |
| Device Name                      | The name of the user's device.                                                                                                                                                                                                        | No       | STRING   |
| Device Manufacturer              | The device manufacturer that the user is using.                                                                                                                                                                                       | No       | STRING   |
| Device Model                     | The device model that the user is using.                                                                                                                                                                                              | No       | STRING   |
| Bluetooth Enabled                | Whether bluetooth is enabled.                                                                                                                                                                                                         | No       | BOOLEAN  |
| Carrier                          | The carrier that the user is using.                                                                                                                                                                                                   | No       | STRING   |
| Cellular Enabled                 | Whether cellular is enabled.                                                                                                                                                                                                          | No       | BOOLEAN  |
| Wifi                             | Set to true if user’s device has an active, available Wifi connection, false if not.                                                                                                                                                  | No       | BOOLEAN  |
| Country                          | The current country of the user.                                                                                                                                                                                                      | No       | STRING   |
| Region                           | The current region of the user.                                                                                                                                                                                                       | No       | STRING   |
| Language                         | The language set by the user.                                                                                                                                                                                                         | No       | STRING   |
| Library Name                     | The name of the SDK used to send events.                                                                                                                                                                                              | No       | STRING   |
| Library Version                  | The version of the SDK used to send events.                                                                                                                                                                                           | No       | STRING   |
| IP Address                       | The IP address of the user. This is only used for geolocation and won't be stored.                                                                                                                                                    | No       | STRING   |
| Identifier For Advertiser (IDFA) | Identifier for Advertiser. \_(iOS)\_                                                                                                                                                                                                  | No       | STRING   |
| URL                              | The full URL of the webpage on which the event is triggered.                                                                                                                                                                          | No       | STRING   |
| Screen width                     | Width, in pixels, of the device screen.                                                                                                                                                                                               | No       | NUMBER   |
| Screen height                    | Height, in pixels, of the device screen.                                                                                                                                                                                              | No       | NUMBER   |
| Screen density                   | Pixel density of the device screen.                                                                                                                                                                                                   | No       | NUMBER   |
| Referrer                         | Referrer url                                                                                                                                                                                                                          | No       | STRING   |
| User Agent                       | User agent                                                                                                                                                                                                                            | No       | STRING   |
| Advertising ID                   | Advertising ID                                                                                                                                                                                                                        | No       | STRING   |
| Ad Tracking Enabled              | Ad Tracking Enabled (true or false)                                                                                                                                                                                                   | No       | STRING   |
| Timezone                         | The event timezone                                                                                                                                                                                                                    | No       | STRING   |
| App Platform                     | The App Platform, if applicable                                                                                                                                                                                                       | No       | STRING   |
| Event Original Name              | The Event Original Name, if applicable                                                                                                                                                                                                | No       | STRING   |
| Event Properties                 | An object of key-value pairs that represent additional data to be sent along with the event.                                                                                                                                          | No       | OBJECT   |
| UTM Properties                   | UTM Tracking Properties                                                                                                                                                                                                               | No       | OBJECT   |
| Batch Data to Mixpanel           | Set as true to ensure Segment sends data to Mixpanel in batches.                                                                                                                                                                      | No       | BOOLEAN  |
| Batch Size                       | Maximum number of events to include in each batch. Actual batch sizes may be lower.                                                                                                                                                   | No       | NUMBER   |
| User Agent Data                  | The user agent data of device sending the event                                                                                                                                                                                       | No       | OBJECT   |

### Identify User

Set the user ID for a particular device ID or update user properties. Learn more about [User Profiles](https://help.mixpanel.com/hc/en-us/articles/115004501966?source=segment-actions) and [Identity Management](https://help.mixpanel.com/hc/en-us/articles/360041039771-Getting-Started-with-Identity-Management?source=segment-actions).

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

| Field           | Description                                                                        | Required | Type   |
| --------------- | ---------------------------------------------------------------------------------- | -------- | ------ |
| IP Address      | The IP address of the user. This is only used for geolocation and won't be stored. | No       | STRING |
| User ID         | The unique user identifier set by you                                              | No       | STRING |
| Anonymous ID    | The generated anonymous ID for the user                                            | No       | STRING |
| User Properties | Properties to set on the user profile                                              | No       | OBJECT |

> \[!TIP]
>
> Segment maps the userId set in the Identify event to the distinct ID in Mixpanel.
>
> Segment also maps the following traits to Mixpanel reserved properties to fit Mixpanel's use cases: `traits.created` -> `$created`, `traits.email` -> `$email`, `traits.firstName` -> `$first_name`, `traits.lastName` -> `$last_name`, `traits.name` -> `$name`, `traits.username` -> `$username` and `traits.phone` -> `$phone`.
>
> For more detail, see Mixpanel's documentation on [Reserved Properties](https://docs.mixpanel.com/docs/data-structure/property-reference/reserved-properties).

##### Example

For example, if you map `traits.email` to Mixpanel, Segment automatically transforms this into Mixpanel's reserved property `$email`.

![Mapping traits.email from Segment to Mixpanel's email field.](https://docs-resources.prod.twilio.com/403b023ba0f270f04a8dcaf5f58cc5ec8f6b5184e36261f38cfd289f235139ec.png)

### Track Purchase

Send an 'Order Completed' Event to Mixpanel.

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

| Field                               | Description                                                                                                                                                                                                                           | Required | Type     |
| ----------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------- | -------- |
| Generate Purchase Event Per Product | When enabled, send "Product Purchased" with each product within the event.                                                                                                                                                            | No       | BOOLEAN  |
| Distinct ID                         | A distinct ID specified by you.                                                                                                                                                                                                       | No       | STRING   |
| Anonymous ID                        | A distinct ID randomly generated prior to calling identify.                                                                                                                                                                           | No       | STRING   |
| User ID                             | The distinct ID after calling identify.                                                                                                                                                                                               | No       | STRING   |
| Group ID                            | The unique identifier of the group that performed this event.                                                                                                                                                                         | No       | STRING   |
| Insert ID                           | A random id that is unique to an event. Mixpanel uses $insert\_id to deduplicate events.                                                                                                                                              | No       | STRING   |
| Timestamp                           | The timestamp of the event. Mixpanel expects epoch timestamp in millisecond or second. Please note, Mixpanel only accepts this field as the timestamp. If the field is empty, it will be set to the time Mixpanel servers receive it. | No       | DATETIME |
| App Name                            | The name of your application.                                                                                                                                                                                                         | No       | STRING   |
| App Namespace                       | The namespace of your application.                                                                                                                                                                                                    | No       | STRING   |
| App Build                           | The current build of your application.                                                                                                                                                                                                | No       | STRING   |
| App Version                         | The current version of your application.                                                                                                                                                                                              | No       | STRING   |
| OS Name                             | The name of the mobile operating system or browser that the user is using.                                                                                                                                                            | No       | STRING   |
| OS Version                          | The version of the mobile operating system or browser the user is using.                                                                                                                                                              | No       | STRING   |
| Device ID                           | A unique identifier for the device the user is using.                                                                                                                                                                                 | No       | STRING   |
| Device Type                         | The type of the user's device.                                                                                                                                                                                                        | No       | STRING   |
| Device Name                         | The name of the user's device.                                                                                                                                                                                                        | No       | STRING   |
| Device Manufacturer                 | The device manufacturer that the user is using.                                                                                                                                                                                       | No       | STRING   |
| Device Model                        | The device model that the user is using.                                                                                                                                                                                              | No       | STRING   |
| Bluetooth Enabled                   | Whether bluetooth is enabled.                                                                                                                                                                                                         | No       | BOOLEAN  |
| Carrier                             | The carrier that the user is using.                                                                                                                                                                                                   | No       | STRING   |
| Cellular Enabled                    | Whether cellular is enabled.                                                                                                                                                                                                          | No       | BOOLEAN  |
| Wifi                                | Set to true if user’s device has an active, available Wifi connection, false if not.                                                                                                                                                  | No       | BOOLEAN  |
| Country                             | The current country of the user.                                                                                                                                                                                                      | No       | STRING   |
| Region                              | The current region of the user.                                                                                                                                                                                                       | No       | STRING   |
| Language                            | The language set by the user.                                                                                                                                                                                                         | No       | STRING   |
| Library Name                        | The name of the SDK used to send events.                                                                                                                                                                                              | No       | STRING   |
| Library Version                     | The version of the SDK used to send events.                                                                                                                                                                                           | No       | STRING   |
| IP Address                          | The IP address of the user. This is only used for geolocation and won't be stored.                                                                                                                                                    | No       | STRING   |
| Identifier For Advertiser (IDFA)    | Identifier for Advertiser. \_(iOS)\_                                                                                                                                                                                                  | No       | STRING   |
| URL                                 | The full URL of the webpage on which the event is triggered.                                                                                                                                                                          | No       | STRING   |
| Screen width                        | Width, in pixels, of the device screen.                                                                                                                                                                                               | No       | NUMBER   |
| Screen height                       | Height, in pixels, of the device screen.                                                                                                                                                                                              | No       | NUMBER   |
| Screen density                      | Pixel density of the device screen.                                                                                                                                                                                                   | No       | NUMBER   |
| Referrer                            | Referrer url                                                                                                                                                                                                                          | No       | STRING   |
| User Agent                          | User agent                                                                                                                                                                                                                            | No       | STRING   |
| Advertising ID                      | Advertising ID                                                                                                                                                                                                                        | No       | STRING   |
| Ad Tracking Enabled                 | Ad Tracking Enabled (true or false)                                                                                                                                                                                                   | No       | STRING   |
| Timezone                            | The event timezone                                                                                                                                                                                                                    | No       | STRING   |
| App Platform                        | The App Platform, if applicable                                                                                                                                                                                                       | No       | STRING   |
| Event Original Name                 | The Event Original Name, if applicable                                                                                                                                                                                                | No       | STRING   |
| Event Properties                    | An object of key-value pairs that represent additional data to be sent along with the event.                                                                                                                                          | No       | OBJECT   |
| UTM Properties                      | UTM Tracking Properties                                                                                                                                                                                                               | No       | OBJECT   |
| Batch Data to Mixpanel              | Set as true to ensure Segment sends data to Mixpanel in batches.                                                                                                                                                                      | No       | BOOLEAN  |
| Batch Size                          | Maximum number of events to include in each batch. Actual batch sizes may be lower.                                                                                                                                                   | No       | NUMBER   |
| User Agent Data                     | The user agent data of device sending the event                                                                                                                                                                                       | No       | OBJECT   |
| Products                            | Products in the order.                                                                                                                                                                                                                | No       | OBJECT   |
| Event Name                          | The name of the action being performed.                                                                                                                                                                                               | Yes      | STRING   |

When `Generate Purchase Event Per Product` is set to `true`, this setting effectively "flattens" the array of objects in the `Order Completed`'s `products` property by tracking a `Product Purchased` event for each item in the array. This enables a more sophisticated analysis on a per-product basis in Mixpanel. These `Product Purchased` events will contain all of the key-value pairs from their respective object in the `products` array as event properties, along with the `order_id` and `checkout_id` from the `Order Completed` event.

### Increment Properties

Increment the value of a user profile property. [Learn More](https://developer.mixpanel.com/reference/profile-numerical-add).

Increment Properties is a **Cloud** action. The default Trigger is `type = "track"`

| Field                          | Description                                                                                                   | Required | Type   |
| ------------------------------ | ------------------------------------------------------------------------------------------------------------- | -------- | ------ |
| IP Address                     | The IP address of the user. This is only used for geolocation and won't be stored.                            | No       | STRING |
| User ID                        | The unique user identifier set by you                                                                         | No       | STRING |
| Anonymous ID                   | The generated anonymous ID for the user                                                                       | No       | STRING |
| Increment Numerical Properties | Object of properties and the values to increment or decrement. For example: \`\{"purchases": 1, "items": 6}}. | Yes      | OBJECT |

> \[!NOTE]
>
> [Mixpanel](https://developer.mixpanel.com/reference/create-identity#create-identity) requires that values it receives for the anonymous identifier (`anonymousId` in Segment) must be in the UUID v4 format. Analytics.js sends `anonymousId` in this format by default. If you manually send anonymous identifiers to Mixpanel, ensure they are in the correct format.

## Migration from Mixpanel Classic

Assuming you're already using Segment Cloud-mode, the Mixpanel (Actions) destination is expected to have no breaking changes when upgrading. With the exception of a few new properties added to your events in the new Actions destination, there should be no difference in the data received in Mixpanel when using either of the Mixpanel destinations.

If you want to confirm, you can configure the new destination to point to a different Mixpanel project and connect it to the same source(s) as the Classic destination and manually verify before fully switching over.

> \[!NOTE]
>
> Contact [Mixpanel support](https://mixpanel.com/contact-us/support/) if you find features missing from the Mixpanel (Actions) destination that were available in the classic Mixpanel destination.

### Mixpanel settings mappings

#### CONNECTION SETTINGS

* **API Secret** (CLOUD, DEVICE-WEB, DEVICE-MOBILE):
  * Global Settings
  * The setting is called \`Secret Key\`.
* **Token** (CLOUD, DEVICE-WEB, DEVICE-MOBILE):
  * Global Settings
  * The setting is called \`Project Token\`.

#### EVENT TRACKING

* **Track All Pages to Mixpanel with a Consolidated Event Name** (CLOUD, DEVICE-WEB):
  * Subscription \*\*Page Calls\*\*
  * When enabled, Mixpanel (Actions) tracks all Page calls as \`Viewed \{name}\` by default. You can change the default name by updating the \`Event Name\` field.

#### TRAITS & PROPERTIES

* **Group Identifier Traits** (CLOUD, DEVICE-WEB, DEVICE-MOBILE):
  * Subscription \*\*Group Calls\*\*
  * When enabled, you can set the group key as you specified in Mixpanel under Project settings to the \`Group Key\` field. You can also specify group id in the \`Group ID\` field directly.
* **Traits to set as People Properties** (CLOUD, DEVICE-WEB, DEVICE-MOBILE):
  * Subscription \*\*Identify Calls\*\*
  * When enabled, Mixpanel (Actions) maps Traits as People Properties by default. You can change it by updating the \`User Properties\` field.

#### OTHER SETTINGS

* **Enable European Union Endpoint** (CLOUD, DEVICE-WEB, DEVICE-MOBILE):
  * Global Settings
  * The setting is called \`Data Residency\`.
* **Source Name** (CLOUD, DEVICE-WEB, DEVICE-MOBILE):
  * Global Settings
  * The setting is called \`Source Name\`.

## Troubleshooting

#### Track events are not attributed to Mixpanel Groups

If the Mixpanel (Actions) destination uses `$group_id` as the group key, ensure that the mappings handling your `track` events have the field for **Group ID** mapped to a valid value. By default, this field maps to the event variable `context.groupId`.

To send Track events with a custom Group key, include the key as a property of Track events. For example:

```js
analytics.track('Example Event', { custom_group_key : 'group1' });
```

#### Failed events due to timestamp

If your integration is correct and you are still seeing failed events, review and verify that you are sending all date properties as UTC time format, due to Mixpanel timestamp format requirements.

#### Failed events due to messageId

Segment maps the `messageId` of a Segment event to Mixpanel's `insert_id` value. If you are generating your own `messageId`, ensure the format complies with Mixpanel's `insert_id` requirements. For more information, see Mixpanel's [Import Events](https://developer.mixpanel.com/reference/import-events#propertiesinsert_id) documentation.

Failing to generate a `messageId` that complies with Mixpanel's `insert_id` standard might result in a `400 Bad Request` error from Mixpanel.

#### Why is Boardman, Oregon appearing in my users' profile location field?

If you are seeing traffic from Boardman or see Segment as the browser, you might be sending server side calls to your Mixpanel (Actions) destination. To correctly populate your users' profile location field, manually pass the IP information in the context object from the server.

#### Why is the Operating System field empty in Mixpanel?

Mixpanel captures the `Operating System` field from the "OS Name" field in Segment. For Analytics.js sources, ensure that `context.userAgentData.platform` is correctly mapped to the "OS Name" field in your destination mappings. If this mapping is missing or misconfigured, the Operating System field may appear empty in Mixpanel.
