Skip to content

Commit 907f964

Browse files
author
markzegarelli
committed
Re-apply Mixpanel's previous updates
1 parent 1ee2499 commit 907f964

File tree

2 files changed

+184
-7
lines changed

2 files changed

+184
-7
lines changed

src/_data/actions/mixpanel.yml

Lines changed: 167 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,167 @@
1+
config:
2+
- category: Connection Settings
3+
settings:
4+
- name: API Secret
5+
connection_mode:
6+
- cloud
7+
- device-web
8+
- device-mobile
9+
configurable: true
10+
location: Global Settings
11+
notes: The setting is called `Secret Key`.
12+
- name: Token
13+
connection_mode:
14+
- cloud
15+
- device-web
16+
- device-mobile
17+
configurable: true
18+
location: Global Settings
19+
notes: The setting is called `Project Token`.
20+
- name: Connection Mode
21+
connection_mode:
22+
- cloud
23+
- device-web
24+
- device-mobile
25+
configurable: false
26+
location:
27+
notes:
28+
- category: Event Tracking
29+
settings:
30+
- name: Track All Pages to Mixpanel with a Consolidated Event Name
31+
connection_mode:
32+
- cloud
33+
- device-web
34+
configurable: true
35+
location: Subscription **Page Calls**
36+
notes: 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.
37+
- name: Events to increment in People
38+
connection_mode:
39+
- cloud
40+
- device-web
41+
- device-mobile
42+
configurable: false
43+
location:
44+
notes: Not supported with Actions.
45+
- name: Track All Pages to Mixpanel
46+
connection_mode:
47+
- cloud
48+
- device-web
49+
configurable: false
50+
location: Subscription **Page Calls**
51+
notes: 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.
52+
- name: Track Categorized Pages to Mixpanel
53+
connection_mode:
54+
- cloud
55+
- device-web
56+
configurable: false
57+
location: Subscription **Page Calls**
58+
notes: When enabled, Mixpanel (Actions) tracks all Page calls as `Viewed {name}` by default. You can add {category} to the `Event Name` field.
59+
- name: Track Named Pages to Mixpanel
60+
connection_mode:
61+
- cloud
62+
- device-web
63+
configurable: false
64+
location: Subscription **Page Calls**
65+
notes: 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.
66+
- category: Traits & Properties
67+
settings:
68+
- name: Group Identifier Traits
69+
connection_mode:
70+
- cloud
71+
- device-web
72+
- device-mobile
73+
configurable: true
74+
location: Subscription **Group Calls**
75+
notes: 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.
76+
- name: Group Traits to Set Once
77+
connection_mode:
78+
- cloud
79+
- device-web
80+
- device-mobile
81+
configurable: false
82+
location:
83+
notes:
84+
- name: Legacy Super Properties
85+
connection_mode:
86+
- device-web
87+
- device-mobile
88+
configurable: false
89+
location:
90+
notes:
91+
- name: Traits to set as People Properties
92+
connection_mode:
93+
- cloud
94+
- device-web
95+
- device-mobile
96+
configurable: true
97+
location: Subscription **Identify Calls**
98+
notes: When enabled, Mixpanel (Actions) maps Traits as People Properties by default. You can change it by updating the `User Properties` field.
99+
- name: Properties to increment in People
100+
connection_mode:
101+
- cloud
102+
- device-web
103+
- device-mobile
104+
configurable: false
105+
location:
106+
notes:
107+
- name: Properties to send as Super Properties
108+
connection_mode:
109+
- cloud
110+
- device-web
111+
- device-mobile
112+
configurable: false
113+
location:
114+
notes:
115+
- category: Identity Resolution
116+
settings:
117+
- name: Use Mixpanel People
118+
connection_mode:
119+
- cloud
120+
- device-web
121+
- device-mobile
122+
configurable: false
123+
location:
124+
notes:
125+
- category: Other Settings
126+
settings:
127+
- name: Cross Subdomain Cookie
128+
connection_mode:
129+
- device-web
130+
configurable: false
131+
location:
132+
notes:
133+
- name: Enable European Union Endpoint
134+
connection_mode:
135+
- cloud
136+
- device-web
137+
- device-mobile
138+
configurable: true
139+
location: Global Settings
140+
notes: The setting is called `Data Residency`.
141+
- name: Persistence Type
142+
connection_mode:
143+
- device-web
144+
configurable: false
145+
location:
146+
notes:
147+
- name: Secure Cookie
148+
connection_mode:
149+
- device-web
150+
configurable: false
151+
location:
152+
notes:
153+
- name: Automatically set all Traits as Super Properties and People Properties
154+
connection_mode:
155+
- device-web
156+
- device-mobile
157+
configurable: false
158+
location:
159+
notes:
160+
- name: Source Name
161+
connection_mode:
162+
- cloud
163+
- device-web
164+
- device-mobile
165+
configurable: true
166+
location: Global Settings
167+
notes: The setting is called `Source Name`.

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

Lines changed: 17 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,8 @@ Mixpanel (Actions) provides the following benefits over the classic Mixpanel des
2323
- **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.
2424
- **Additional default property mappings** - More default mappings from the Segment context like app name, app namespace, device type, and more.
2525
- **Improved Groups support** - Implementation of [Segment Groups](/docs/connections/spec/group/) with [Mixpanel Group Analytics](https://help.mixpanel.com/hc/en-us/articles/360025333632-Group-Analytics){:target='_blank'} is easier. If you're already using Segment Groups, no code changes are required.
26+
- **E-commerce mappings** - Mixpanel (Actions) accepts products nested within arrays in the `Order Completed` event as described in the Segment [ecommerce spec](/docs/connections/spec/ecommerce/v2/#order-completed).
27+
- **Batching Requests** - If you have a lot of events, Mixpanel (Actions) provides more efficient way to receive and process those large sets of data.
2628

2729
## Getting started
2830

@@ -36,11 +38,11 @@ Mixpanel (Actions) provides the following benefits over the classic Mixpanel des
3638

3739
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) or [Kotlin](https://github.com/segmentio/analytics-kotlin)) with the Actions-framework version of the destination, you do not need the device-mode connection.
3840

39-
### Mappings
40-
You can follow the steps in the Destinations Actions documentation on [Customizing mappings](/docs/connections/destinations/actions/#customizing-mappings).
41+
{% capture track_purchase_details %}
4142

42-
> success ""
43-
> Make sure you map the `traits.email` property to Mixpanel's `$email`, otherwise email will be undefined.
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.
44+
45+
{% endcapture %}
4446

4547

4648

@@ -71,7 +73,7 @@ By default, the Mixpanel (Actions) destination uses `$group_id` as the group key
7173
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.
7274

7375
### Backwards-compatibility with Mixpanel Classic destination
74-
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, we will use the value of that trait as the group id.
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.
7577

7678
#### Scenario 1: No group key trait specified
7779
```js
@@ -98,10 +100,18 @@ analytics.group("0e8c78ea9d97a7b8185e8632", {
98100
```
99101
The group id that Mixpanel will use is `12345`.
100102

103+
> success ""
104+
> The below special traits will be mapped to Mixpanel reserved properties automatically to fit Mixpanel's use cases. `traits.name` -> `$name`.
105+
101106
{% endcapture %}
102-
{% include components/actions-fields.html content1=group_identify_user_details section1="groupIdentifyUser" %}
103107

108+
{% capture identify_user_details %}
109+
> success ""
110+
> The below special traits will be mapped to Mixpanel reserved properties automatically 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`.
111+
112+
{% endcapture %}
104113

114+
{% include components/actions-fields.html content1=track_purchase_details section1="trackPurchase" content2=group_identify_user_details section2="groupIdentifyUser" content3=identify_user_details section3="identifyUser" %}
105115
## Migration from Mixpanel Classic
106116

107117
{% include content/ajs-upgrade.md %}
@@ -113,4 +123,4 @@ If you want to confirm, you can configure the new destination to point to a diff
113123
> info ""
114124
> Contact Mixpanel support if you find features missing from the Mixpanel (Actions) destination that were available in the classic Mixpanel destination.
115125
116-
{% include components/actions-map-table.html name="mixpanel" %}
126+
{% include components/actions-map-table.html name="mixpanel" %}

0 commit comments

Comments
 (0)