Skip to content

Commit 28a8d85

Browse files
committed
Added screenshot of mapping in Segment UI to Mixpanel docs
1 parent cb09fc2 commit 28a8d85

File tree

2 files changed

+29
-23
lines changed

2 files changed

+29
-23
lines changed
65.5 KB
Loading

src/connections/destinations/catalog/actions-mixpanel/index.md

Lines changed: 29 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ redirect_from:
1313
{% include content/plan-grid.md name="actions" %}
1414

1515

16-
[Mixpanel](https://mixpanel.com/){:target='_blank'} enables you to build better products through powerful, self-serve product analytics to help you convert, engage, and retain more users.
16+
[Mixpanel](https://mixpanel.com/){:target='_blank'} lets you build better products through powerful, self-serve product analytics to help you convert, engage, and retain more users.
1717

1818

1919
## Benefits of Mixpanel (Actions) vs Mixpanel Classic
@@ -29,18 +29,17 @@ Mixpanel (Actions) provides the following benefits over the classic Mixpanel des
2929
## Getting started
3030

3131
1. Go to your [Mixpanel project settings](https://mixpanel.com/report/settings/#account/projects){:target='_blank'}. Copy the Mixpanel API Key and API Secret for your project.
32-
2. From the Segment web app, click **Catalog**, then click **Destinations**.
33-
3. Find the Destinations Actions item in the left navigation, and click it.
34-
4. Click the "Mixpanel" item to select it and click **Configure**.
35-
5. Choose which of your sources to connect the destination to. (You can connect more sources to the destination later.)
32+
2. In the your Segment workspace, click **Catalog**, then click **Destinations**.
33+
3. Navigate to **Destinations Actions** and select "Mixpanel" and click **Add destination**.
34+
4. Choose which of your sources to connect the destination to. (You can connect more sources to the destination later.)
3635

37-
### Connection Modes for Mixpanel (Actions) destination
36+
### Connection modes for Mixpanel (Actions) destination
3837

39-
The Mixpanel (Actions) destination does not offer a device-mode connection mode. If you're using one of Segment's new libraries ([Analytics.js 2.0](/docs/connections/sources/catalog/libraries/website/javascript/), [Swift](https://github.com/segmentio/analytics-swift){:target="_blank”} or [Kotlin](https://github.com/segmentio/analytics-kotlin){:target="_blank”}) with the Actions-framework version of the destination, you do not need the device-mode connection.
38+
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/connections/sources/catalog/libraries/website/javascript/), [Swift](https://github.com/segmentio/analytics-swift){:target="_blank”} or [Kotlin](https://github.com/segmentio/analytics-kotlin){:target="_blank”}) with the Actions-framework version of the destination, you do not need the device-mode connection.
4039

4140
{% capture track_purchase_details %}
4241

43-
When set `Generate Purchase Event Per Product` 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 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.
42+
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.
4443

4544
{% endcapture %}
4645

@@ -56,24 +55,24 @@ In the default configuration, Mixpanel (Actions) triggers this action when it re
5655
5756
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){:target='_blank'}.
5857

59-
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.
58+
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.
6059

6160
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`.
6261

6362
### Default group key
6463
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.
6564

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

70-
![Set Group Key](./images/set-group-key.gif)
69+
![GIF demonstratin how to set Group key in Mixpanel UI](./images/set-group-key.gif)
7170

7271
### Using a different group key
7372
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.
7473

7574
### Backwards-compatibility with Mixpanel Classic destination
76-
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.
75+
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.
7776

7877
#### Scenario 1: No group key trait specified
7978
```js
@@ -85,7 +84,7 @@ analytics.group("0e8c78ea9d97a7b8185e8632", {
8584
"total billed": 830
8685
});
8786
```
88-
The group id that Mixpanel will use is `0e8c78ea9d97a7b8185e8632`.
87+
The group ID that Mixpanel will use is `0e8c78ea9d97a7b8185e8632`.
8988

9089
#### Scenario 2: Group key trait IS specified
9190
```js
@@ -98,7 +97,7 @@ analytics.group("0e8c78ea9d97a7b8185e8632", {
9897
"total billed": 830
9998
});
10099
```
101-
The group id that Mixpanel will use is `12345`.
100+
The group ID that Mixpanel will use is `12345`.
102101

103102
> success ""
104103
> The below special traits will be mapped to Mixpanel reserved properties automatically to fit Mixpanel's use cases. `traits.name` -> `$name`.
@@ -107,7 +106,14 @@ The group id that Mixpanel will use is `12345`.
107106

108107
{% capture identify_user_details %}
109108
> success ""
110-
> 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`.
109+
> Segment maps the userId set in the identify event to the distinct ID in Mixpanel.
110+
>
111+
> 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`.
112+
113+
### Example
114+
For example, if you map `traits.email` to Mixpanel, Segment automatically transforms this into Mixpanel's reserved property `$email`.
115+
116+
![Screenshot of mapping traits.email from Segment to Mixpanel email field, which Segment transforms to $email](./traits-mapping-screenshot.png)
111117

112118
{% endcapture %}
113119

@@ -123,33 +129,33 @@ Assuming you're already using Segment Cloud-mode, the Mixpanel (Actions) destina
123129
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.
124130

125131
> info ""
126-
> Contact Mixpanel support if you find features missing from the Mixpanel (Actions) destination that were available in the classic Mixpanel destination.
132+
> Contact [Mixpanel support](https://mixpanel.com/contact-us/support/){:target="_blank"} if you find features missing from the Mixpanel (Actions) destination that were available in the classic Mixpanel destination.
127133
128134
{% include components/actions-map-table.html name="mixpanel" %}
129135

130136
## Troubleshooting
131137

132-
### Track events are not attributed to Mixpanel Groups
138+
#### Track events are not attributed to Mixpanel Groups
133139

134-
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`.
140+
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`.
135141

136-
To send Track events with a custom Group Key, include the key as a property of Track events. For example:
142+
To send Track events with a custom Group key, include the key as a property of Track events. For example:
137143
```js
138144
analytics.track('Example Event', { custom_group_key : 'group1' });
139145
```
140-
### Failed events due to timestamp
146+
#### Failed events due to timestamp
141147

142148
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.
143149

144-
### Failed events due to messageId
150+
#### Failed events due to messageId
145151
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){:target="_blank”} documentation.
146152

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

149-
### Why is Boardman, Oregon appearing in my users' profile location field?
155+
#### Why is Boardman, Oregon appearing in my users' profile location field?
150156

151157
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.
152158

153159

154-
### Why is the Operating System field empty in Mixpanel?
160+
#### Why is the Operating System field empty in Mixpanel?
155161
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.

0 commit comments

Comments
 (0)