Skip to content

Commit 070d2fa

Browse files
authored
Myronkaifung docsfeedback 20250515 (#1877)
* add Session Replay example init combos * add detail about User ID Property for Cohort Sync connection setup * Add instruction for resetting API Secret and API Key * add callout regarding project token reset not being self-served * add clarification about how canonical distinct ID is determined for v2 and v3
1 parent 876a5b8 commit 070d2fa

File tree

14 files changed

+85
-21
lines changed

14 files changed

+85
-21
lines changed

pages/docs/cohort-sync/integrations/braze.md renamed to pages/docs/cohort-sync/integrations/braze.mdx

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
1-
# Braze
1+
import { Callout } from 'nextra/components'
22

3+
# Braze
34

45
## Overview
56

@@ -25,6 +26,10 @@ Enter the Mixpanel project where the integration is to be performed, then:
2526

2627
2. Select the Braze integration tab. Click **Connect**.
2728

29+
<Callout type="info">
30+
If you set a User ID Property, it should be a Mixpanel user property that matches the Braze External ID. If you do not select one, Mixpanel will default to using the `$braze_external_id` property to match users between Braze and Mixpanel. See more about [matching users between Braze and Mixpanel](/docs/cohort-sync/integrations/braze#matching-mixpanel-and-braze-users).
31+
</Callout>
32+
2833
![Braze 2 Image](/braze2.png)
2934

3035
If you've set up a Connection already, you have the option of reconnecting the existing Connection.
@@ -91,15 +96,19 @@ In order to build a Braze Segment after importing a cohort:
9196

9297
## Matching Mixpanel and Braze Users
9398

94-
> **Warning:** Projects using the [simplified ID merge system](/docs/tracking-methods/id-management#identity-merge-apis) must have the `$user_id` in Mixpanel match the user identifier in the partner service. Using any alternative partner properties to match users between tools may result in partner events not being attributed to the correct user in Mixpanel. Any partner properties mentioned in the below section are primarily applicable to projects on the original ID merge system.
99+
<Callout type="warning">
100+
**Warning:** Projects using the [Simplified ID merge system](/docs/tracking-methods/id-management#identity-merge-apis) must have the `$user_id` in Mixpanel match the user identifier in the partner service. Using any alternative partner properties to match users between tools may result in partner events not being attributed to the correct user in Mixpanel. Any partner properties mentioned in the below section are primarily applicable to projects on the original ID merge system.
101+
</Callout>
95102

96103
In order to match Mixpanel users to ones on Braze's end, the user in Mixpanel should have a profile property named $braze_external_id with the value you have assigned in Braze to the same user as [external_user_id](https://www.braze.com/docs/developer_guide/platform_integration_guides/legacy_sdks/ios/analytics/setting_user_ids/#suggested-user-id-naming-convention).
97104

98105
The recommendation would be to insert code after the user authenticates that sends a `people.set` operation to the `$braze_external_id` property with the string value so it is stored in the Mixpanel profile. This could be when they sign up (or just log in if they already had an account). By setting the property each time the user authenticates you would ensure users who have signed up previous to this code changes also have it.
99106

100107
If you are planning to also enable sending engagement events from Braze to Mixpanel, and the Braze external_user_id differs from the user_id you identify the user with in Mixpanel, you can also alias the Braze external_user_id to the distinct_id you identify users with after they authenticate. Often times, you use the same user ID for both the external_user_id in Braze, and the ID you identify with in Mixpanel, so in that case, aliasing would not be needed.
101108

102-
>Note: SDK versions older than Android v5.9.6, Swift: v2.10.4, and Objective-C: v3.9.2 automatically created both the profile property and the alias mentioned above. This has since been deprecated due to possible ID management issues in some use cases, so on the SDK versions cited (or above), you should set the `$braze_external_id` profile property and alias when applicable.
109+
<Callout type="info">
110+
SDK versions older than Android v5.9.6, Swift: v2.10.4, and Objective-C: v3.9.2 automatically created both the profile property and the alias mentioned above. This has since been deprecated due to possible ID management issues in some use cases, so on the SDK versions cited (or above), you should set the `$braze_external_id` profile property and alias when applicable.
111+
</Callout>
103112

104113
## Braze Events into Mixpanel & MTU exemptions
105114

pages/docs/cohort-sync/integrations/insider.md renamed to pages/docs/cohort-sync/integrations/insider.mdx

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
1-
# Insider
1+
import { Callout } from 'nextra/components'
22

3+
# Insider
34

45
## Overview
56

@@ -11,21 +12,20 @@ You must be a Mixpanel project admin to enable the Insider integration.
1112

1213
## Enable the Integration
1314

14-
To enable the integration, select **Integrations** under the **Data Management** tab in the top navigation bar.
15+
1. To enable the integration, select **Integrations** under the **Data Management** tab in the top navigation bar.
1516

1617
![insider 1 Image](/insider1.png)
1718

18-
From the Integrations page, select the Insider dropdown, and select **Connect**.
19-
20-
Find the Insider API Key from the Insider's Mobile App Settings > Integration tab.
19+
2. From the Integrations page, select the Insider dropdown, and select **Connect**.
2120

22-
![insider_APIkey](https://github.com/mixpanel/docs/assets/13739415/086ebe51-b4ab-4f55-bb13-83de81f40561)
23-
24-
Enter the Insider API Key in Mixpanel and select **Continue**
21+
<Callout type="info">
22+
If you set a User ID Property, it should be a Mixpanel user property that matches the email or phone number set in Insider.
23+
</Callout>
2524

2625
![insider 2 Image](/insider2.png)
2726

28-
The Insider integration will show a **Connected** tag in the UI once the connection succeeds.
27+
28+
3. The Insider integration will show a **Connected** tag in the UI once the connection succeeds.
2929

3030
## Matching Users between Insider and Mixpanel
3131

pages/docs/cohort-sync/integrations/moengage.md renamed to pages/docs/cohort-sync/integrations/moengage.mdx

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
import { Callout } from 'nextra/components'
2+
13
# Moengage
24

35
## Overview
@@ -16,6 +18,10 @@ You must be a Mixpanel project admin to enable the MoEngage integration.
1618

1719
2. From the Integrations page, select the MoEngage dropdown, and select **Connect**.
1820

21+
<Callout type="info">
22+
If you set a User ID Property, it should be a Mixpanel user property that matches the MoEngage External ID. If you do not select one, Mixpanel will default to using the `$moengage_user_id` property to match users between MoEngage and Mixpanel. See more about [matching users between MoEngage and Mixpanel](/docs/cohort-sync/integrations/moengage#matching-users-between-moengage-and-mixpanel).
23+
</Callout>
24+
1925
![Moengage 2 Image](/moengage2.png)
2026

2127
3. The connection uses a Basic Authorization Username/Password system. You will need to provide two credentials to authorize the connection:
@@ -35,7 +41,9 @@ You can find these values in your MoEngage settings page - note that MoEngage Ap
3541

3642
## Matching Users between MoEngage and Mixpanel
3743

38-
> **Warning:** Projects using the [simplified ID merge system](/docs/tracking-methods/id-management#identity-merge-apis) must have the `$user_id` in Mixpanel match the user identifier in the partner service. Using any alternative partner properties to match users between tools may result in partner events not being attributed to the correct user in Mixpanel. Any partner properties mentioned in the below section are primarily applicable to projects on the original ID merge system.
44+
<Callout type="warning">
45+
**Warning:** Projects using the [Simplified ID merge system](/docs/tracking-methods/id-management#identity-merge-apis) must have the `$user_id` in Mixpanel match the user identifier in the partner service. Using any alternative partner properties to match users between tools may result in partner events not being attributed to the correct user in Mixpanel. Any partner properties mentioned in the below section are primarily applicable to projects on the original ID merge system.
46+
</Callout>
3947

4048
Mixpanel only exports identified user profiles to match to MoEngage - users without user profile properties (i.e. anonymous users) will not export.
4149

pages/docs/cohort-sync/integrations/onesignal.md renamed to pages/docs/cohort-sync/integrations/onesignal.mdx

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
1-
# OneSignal
1+
import { Callout } from 'nextra/components'
22

3+
# OneSignal
34

45
## Overview
56

@@ -23,13 +24,19 @@ Follow these steps to enable the integration with OneSignal:
2324

2425
2. From the Integrations page, select the OneSignal dropdown, and select **Connect**.
2526

27+
<Callout type="info">
28+
If you set a User ID Property, it should be a Mixpanel user property that matches the OneSignal External ID. If you do not select one, Mixpanel will default to using the `$onesignal_user_id` property to match users between OneSignal and Mixpanel. See more about [matching users between OneSignal and Mixpanel](/docs/cohort-sync/integrations/onesignal#matching-users-between-onesignal-and-mixpanel).
29+
</Callout>
30+
2631
![OneSignal 2 Image](/onesignal6.png)
2732

2833
3. You will need to provide two credentials to authorize the connection: **API Key and App ID**. You can find these values in your **OneSignal settings** page. The OneSignal integration will show a **Connected** tag in the UI once the connection succeeds.
2934

3035
## Matching Users between OneSignal and Mixpanel
3136

32-
> **Warning:** Projects using the [simplified ID merge system](/docs/tracking-methods/id-management#identity-merge-apis) must have the `$user_id` in Mixpanel match the user identifier in the partner service. Using any alternative partner properties to match users between tools may result in partner events not being attributed to the correct user in Mixpanel. Any partner properties mentioned in the below section are primarily applicable to projects on the original ID merge system.
37+
<Callout type="warning">
38+
**Warning:** Projects using the [Simplified ID merge system](/docs/tracking-methods/id-management#identity-merge-apis) must have the `$user_id` in Mixpanel match the user identifier in the partner service. Using any alternative partner properties to match users between tools may result in partner events not being attributed to the correct user in Mixpanel. Any partner properties mentioned in the below section are primarily applicable to projects on the original ID merge system.
39+
</Callout>
3340

3441
Mixpanel only exports identified user profiles to match to OneSignal - users without user profile properties (i.e. anonymous users) will not export.
3542

pages/docs/cohort-sync/integrations/segment.md renamed to pages/docs/cohort-sync/integrations/segment.mdx

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
1-
# Segment
1+
import { Callout } from 'nextra/components'
22

3+
# Segment
34

45
## Overview
56

@@ -42,6 +43,10 @@ We will use the Write Key from Segment to enable the connection in Mixpanel.
4243

4344
2. Then select Segment, click **Connect**, and paste the** Write Key** that you generated in Segment.
4445

46+
<Callout type="info">
47+
If you set a User ID Property, it should be a Mixpanel user property that matches the Segment User ID.
48+
</Callout>
49+
4550
![Segment 5 Image](/segment5.png)
4651

4752
3. Click **Continue** to complete the process.

pages/docs/orgs-and-projects/managing-projects.mdx

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -86,17 +86,25 @@ Click the Settings gear in the upper right-hand corner of your Mixpanel project
8686

8787
### Locate Tokens for All Projects in Your Mixpanel Account
8888

89-
To view the project tokens for all your projects, click the **Settings** gear icon in the top right of Mixpanel and select **Personal Settings**.
89+
To view the project tokens for all your projects, click the **Settings** gear icon and select **Personal Settings**.
9090

9191
![manageprojects 7 Image](/manageprojects7.png)
9292

9393
Then select the Projects tab.
9494

9595
![manageprojects 8 Image](/manageprojects8.png)
9696

97+
#### Reset Project API Secret and API Key
98+
99+
You can reset the API Secret and API Keys for any projects you own. To do so, go to **Settings****Profile****Projects****Your Projects**, and click **Reset** next to the desired project.
100+
101+
#### Reset Project Token
102+
103+
Project Token cannot be reset in a self-served manner. If you need to reset your project token for any reason, please [reach out to our Support team](https://mixpanel.com/get-support).
104+
97105
## Manage Timezones for Projects
98106

99-
<Callout type="info" emoji="ℹ️">
107+
<Callout type="info">
100108
For projects created before 1 Jan 2023, Mixpanel converts event timestamps to your project timezone before writing the event to your Mixpanel data stores, meaning that event timestamps are stored based on the project timezone setting at the time of ingestion.
101109
</Callout>
102110

pages/docs/session-replay/implement-session-replay/session-replay-web.mdx

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,16 @@ mixpanel.init(
108108
| `record_sessions_percent` | Percentage of SDK initializations that will qualify for replay data capture. A value of "1" = 1%. | `0` |
109109
| `record_canvas` | When true, Mixpanel will record snapshots of `<canvas>` elements on your site at up to 15 frames per second | `false` |
110110

111+
**Example Usage**
112+
113+
```javascript
114+
mixpanel.init('YOUR_PROJECT_TOKEN', {
115+
record_sessions_percent: 1, //records 1% of all sessions
116+
record_mask_text_selector: '', //unmask all text elements
117+
record_block_selector: '' //unmask images and videos
118+
});
119+
```
120+
111121
## Replay ID
112122

113123
When a replay capture begins, a Replay ID is generated by the SDK and is attached as an event property (`$mp_replay_id`) to events tracked by the SDK during the capture session. Events containing the same `$mp_replay_id` will appear in the same Replay.

pages/docs/tracking-methods/id-management/identifying-users-original.mdx

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -104,9 +104,11 @@ If using our Web/Mobile SDKs or a CDP like Segment or Rudderstack, there are onl
104104
- Calling `.reset` will clear the local storage (which contains the `$user_id` and `$device_id`), and generate a new `$device_id` for the session. A best practice would be to only call `.reset()` if there is a definite intent to change user on the same device, example clicking on “Sign-up” button instead of “Login”.
105105

106106

107-
<Callout type="warning">
108-
The `distinct_id` is programmatically selected by Mixpanel, using one of the IDs inside of an identity cluster, based on the most optimal merging process. This means that the canonical distinct_id could be set to a `$device_id` or your chosen `user_id`. This is not user-configurable. You can use any of the IDs in the cluster for ingestion, but only the canonical `distinct_id` can be used in queries and exports.
109-
</Callout>
107+
## Canonical Distinct ID
108+
109+
Once a user has been identified via the `.identify(user_id)` method, their `$device_id` prior to identification will be combined with the `$user_id` to form an identity cluster containing both IDs, as well as any other IDs previously merged with the `$user_id`. During this process, the canonical `distinct_id` is programmatically selected by Mixpanel, using one of the IDs inside of the identity cluster, based on the most optimal merging process. This means that the canonical distinct_id could be set to a `$device_id` or your chosen `user_id`. This is not user-configurable.
110+
111+
You can use any of the IDs in the cluster for ingestion, but only the canonical `distinct_id` can be used in queries and exports.
110112

111113
## Example User Flows
112114
Let's walk through a few user flows where ID Merge is useful, and when to call `.identify()` and `.reset()` to use ID Merge properly.

pages/docs/tracking-methods/id-management/identifying-users-simplified.mdx

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,12 @@ If using our Web/Mobile SDKs or a CDP like Segment or Rudderstack, there are onl
6565

6666
- Calling `.reset` will clear the local storage (which contains the `$user_id` and `$device_id`), and generate a new `$device_id` for the session. It is recommended to call `.reset` when a user logout or times out of an authenticated session to prevent the unintentional merging of multiple users sharing one device.
6767

68+
## Canonical Distinct ID
69+
70+
Once a user has been identified via the `.identify(user_id)` method, their `$device_id` prior to identification will be combined with the `$user_id` to form an identity cluster containing both IDs, as well as any other IDs previously merged with the `$user_id`. For projects using the Simplified ID Merge API, the canonical `distinct_id` is always set to the `$user_id`.
71+
72+
You can use any of the IDs in the cluster for ingestion, but only the canonical `distinct_id` can be used in queries and exports.
73+
6874
## Example User Flows
6975
Let's walk through a few user flows where ID Merge is useful, and when to call `.identify()` and `.reset()` to use ID Merge properly.
7076

pages/docs/tracking-methods/sdks/javascript.mdx

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -969,6 +969,15 @@ Customize the Replay capture behavior using the library init options outlined be
969969
| `record_canvas` | When true, Mixpanel will record snapshots of `<canvas>` elements on your site at up to 15 frames per second | `false` |
970970
| `record_heatmap_data` | When true, Mixpanel will capture click events during replays to populate Heatmaps. Viewing Heatmaps is currently in Beta. | `false` |
971971

972+
**Example Usage**
973+
974+
```javascript
975+
mixpanel.init('YOUR_PROJECT_TOKEN', {
976+
record_sessions_percent: 1, //records 1% of all sessions
977+
record_mask_text_selector: '', //unmask all text elements
978+
record_block_selector: '' //unmask images and videos
979+
});
980+
```
972981

973982
### Manual Capture
974983

0 commit comments

Comments
 (0)