mixpanel-react-native 3.0.0-beta.1 → 3.0.0-beta.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +50 -59
- package/README.md +7 -1
- package/Samples/MixpanelExpo/package-lock.json +22551 -0
- package/Samples/MixpanelExpo/package.json +1 -1
- package/__tests__/index.test.js +16 -15
- package/docs/Mixpanel.html +32 -32
- package/docs/MixpanelGroup.html +7 -7
- package/docs/People.html +12 -12
- package/docs/index.html +3 -2
- package/docs/index.js.html +29 -16
- package/index.d.ts +29 -7
- package/index.js +28 -15
- package/javascript/mixpanel-core.js +4 -5
- package/javascript/mixpanel-main.js +4 -2
- package/javascript/mixpanel-persistent.js +52 -37
- package/javascript/mixpanel-storage.js +13 -20
- package/logs/.b11bf985d66a037ca5688a574653f3bf76a28dfa-audit.json +6 -36
- package/logs/.c366df74eeb671df60a57a2075ae40a3dae2af25-audit.json +6 -36
- package/package.json +1 -1
- package/__tests__/persistent.test.js +0 -161
package/CHANGELOG.md
CHANGED
|
@@ -1,9 +1,29 @@
|
|
|
1
1
|
#
|
|
2
2
|
|
|
3
|
+
## [v3.0.0-beta.2](https://github.com/mixpanel/mixpanel-react-native/tree/v3.0.0-beta.2) (2024-03-06)
|
|
4
|
+
|
|
5
|
+
### Enhancements
|
|
6
|
+
- Add support to use custom storage instead of @react-native-async-storage/async-storage.(https://github.com/mixpanel/mixpanel-react-native/pull/225)
|
|
7
|
+
When JavaScript mode is enabled, Mixpanel utilizes [AsyncStorage](https://reactnative.dev/docs/asyncstorage) to persist data. If you prefer not to use it, or if AsyncStorage is unavailable in your target environment, you can import or define a different storage class. However, it must follow the same interface as [AsyncStorage](https://reactnative.dev/docs/asyncstorage) The following example demonstrates how to use a custom storage solution:
|
|
8
|
+
|
|
9
|
+
```
|
|
10
|
+
const MyAsyncStorage = require("@my-org/<library-path>/AsyncStorage"); // or your own storage class
|
|
11
|
+
const trackAutomaticEvents = false;
|
|
12
|
+
const useNative = false;
|
|
13
|
+
const mixpanel = new Mixpanel('YOUR_TOKEN', trackAutomaticEvents, useNative, MyAsyncStorage);
|
|
14
|
+
mixpanel.init();
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
### Fixes
|
|
18
|
+
- Make `optOutTracking` and `optInTracking` consistent with the native SDK.(https://github.com/mixpanel/mixpanel-react-native/pull/225)
|
|
19
|
+
|
|
20
|
+
#
|
|
21
|
+
|
|
3
22
|
## [v3.0.0-beta.1](https://github.com/mixpanel/mixpanel-react-native/tree/v3.0.0-beta.1) (2024-02-29)
|
|
4
23
|
|
|
5
24
|
### Expo and React Native Web support
|
|
6
|
-
|
|
25
|
+
|
|
26
|
+
This version(PR [\#223](https://github.com/mixpanel/mixpanel-react-native/pull/223)) introduces support for Expo, React Native Web, and any platform using React Native that does not support iOS and Android. To activate this, initialize Mixpanel with an additional parameter `useNative` set to false, which will enable JavaScript mode. Currently in beta, we plan to iterate on this to address any issues and add more features. We welcome your feedback.
|
|
7
27
|
|
|
8
28
|
```
|
|
9
29
|
const trackAutomaticEvents = false;
|
|
@@ -16,14 +36,21 @@ This version(PR [\#223](https://github.com/mixpanel/mixpanel-react-native/pull/2
|
|
|
16
36
|
mixpanel.init();
|
|
17
37
|
```
|
|
18
38
|
|
|
19
|
-
|
|
20
39
|
To try the Expo sample app, navigate to `Samples/MixpanelExpo`, run `npm install`, and then execute `npm run ios` or `npm run android`
|
|
21
40
|
|
|
22
41
|
Known limitations and differences compared to the native mode (iOS/Android):
|
|
42
|
+
|
|
23
43
|
- Automatic Events are currently not supported in this mode. Setting 'trackAutomaticEvents' to 'true' will have no effect.
|
|
24
44
|
- Certain Mixpanel Properties are unavailable in Javascript mode, including detailed information about the device and screen.
|
|
25
45
|
- The default flush interval is set to 10 seconds. The data will not flush automatically when the app moves to the background. We recommend flushing more frequently for key events.
|
|
26
46
|
|
|
47
|
+
#
|
|
48
|
+
|
|
49
|
+
## [v2.4.1](https://github.com/mixpanel/mixpanel-react-native/tree/v2.4.1) (2024-03-01)
|
|
50
|
+
|
|
51
|
+
### Fixes
|
|
52
|
+
|
|
53
|
+
- Fix mp_lib(Mixpanel Library) not being set as `react-native`
|
|
27
54
|
|
|
28
55
|
#
|
|
29
56
|
|
|
@@ -98,8 +125,8 @@ Known limitations and differences compared to the native mode (iOS/Android):
|
|
|
98
125
|
## [v2.2.0](https://github.com/mixpanel/mixpanel-react-native/tree/v2.2.0) (2023-03-06)
|
|
99
126
|
|
|
100
127
|
### NOTE:
|
|
101
|
-
- From this version we will prefix randomly generated device-specific distinct_ids with "$device:". The prefix is applied the next time a new random ID is generated, any IDs generated by previous SDK versions and persisted on the device will continue to be used as-is until reset is called to generate a new ID. This does not change the value sent for the $device_id property, which will continue to be the randomly-generated ID without a prefix. Mixpanel's $identify endpoint has been updated to accept UUIDs with this prefix to coordinate with this change.
|
|
102
128
|
|
|
129
|
+
- From this version we will prefix randomly generated device-specific distinct_ids with "$device:". The prefix is applied the next time a new random ID is generated, any IDs generated by previous SDK versions and persisted on the device will continue to be used as-is until reset is called to generate a new ID. This does not change the value sent for the $device_id property, which will continue to be the randomly-generated ID without a prefix. Mixpanel's $identify endpoint has been updated to accept UUIDs with this prefix to coordinate with this change.
|
|
103
130
|
|
|
104
131
|
### Enhancements
|
|
105
132
|
|
|
@@ -125,7 +152,8 @@ Known limitations and differences compared to the native mode (iOS/Android):
|
|
|
125
152
|
|
|
126
153
|
## [v2.0.0](https://github.com/mixpanel/mixpanel-react-native/tree/v2.0.0) (2022-09-09)
|
|
127
154
|
|
|
128
|
-
### BREAKING CHANGE:
|
|
155
|
+
### BREAKING CHANGE:
|
|
156
|
+
|
|
129
157
|
This major release removes all remaining calls to Mixpanel's `/decide` API endpoint. The main effect of this is that the SDK no longer fetches the remote status of your [project's "Automatically collect common mobile events" setting](https://help.mixpanel.com/hc/en-us/articles/115004596186#enable-or-disable-common-mobile-events). From this version forward, automatic event tracking can only be controlled by the, now required, parameter `trackAutomaticEvents`. Upon upgrading, existing implementations will need to add this parameter to their Mixpanel initializer calls.
|
|
130
158
|
|
|
131
159
|
### Enhancements
|
|
@@ -138,7 +166,7 @@ This major release removes all remaining calls to Mixpanel's `/decide` API endpo
|
|
|
138
166
|
|
|
139
167
|
### Enhancements
|
|
140
168
|
|
|
141
|
-
-
|
|
169
|
+
- bump versions to get millisecond precision for event time property [\#146](https://github.com/mixpanel/mixpanel-react-native/pull/146)
|
|
142
170
|
|
|
143
171
|
#
|
|
144
172
|
|
|
@@ -164,7 +192,7 @@ This major release removes all remaining calls to Mixpanel's `/decide` API endpo
|
|
|
164
192
|
|
|
165
193
|
- Bump to latest ios and android sdk versions and remove android people identify\(deprecated\) [\#137](https://github.com/mixpanel/mixpanel-react-native/pull/137)
|
|
166
194
|
- Allow disable flush on background [\#135](https://github.com/mixpanel/mixpanel-react-native/pull/135)
|
|
167
|
-
- Adds
|
|
195
|
+
- Adds a new API `getDeviceId` for React Native [\#134](https://github.com/mixpanel/mixpanel-react-native/pull/134)
|
|
168
196
|
|
|
169
197
|
#
|
|
170
198
|
|
|
@@ -201,11 +229,12 @@ This major release removes all remaining calls to Mixpanel's `/decide` API endpo
|
|
|
201
229
|
#
|
|
202
230
|
|
|
203
231
|
## [v1.3.6](https://github.com/mixpanel/mixpanel-react-native/tree/v1.3.6) (2022-01-13)
|
|
232
|
+
|
|
204
233
|
### Caution: Please DO NOT use this build! In this version, we have a bug in iOS that event names with `&` or `%` will be rejected by the server. We recommend you update to 1.3.7 or above.
|
|
205
234
|
|
|
206
235
|
### Fixes
|
|
207
236
|
|
|
208
|
-
- Fix common mobile events not showing
|
|
237
|
+
- Fix common mobile events not showing 'react-native' as property value for 'Mixpanel Library' [\#122](https://github.com/mixpanel/mixpanel-react-native/pull/122)
|
|
209
238
|
|
|
210
239
|
#
|
|
211
240
|
|
|
@@ -290,91 +319,53 @@ This major release removes all remaining calls to Mixpanel's `/decide` API endpo
|
|
|
290
319
|
## [v1.2.3](https://github.com/mixpanel/mixpanel-react-native/tree/v1.2.3) (2021-05-20)
|
|
291
320
|
|
|
292
321
|
- Bump Mixpanel Andriod dependency to 5.9.1 (Migrate to Airship 12.x for the integration)
|
|
293
|
-
https://github.com/mixpanel/mixpanel-react-native/pull/59
|
|
322
|
+
https://github.com/mixpanel/mixpanel-react-native/pull/59
|
|
294
323
|
|
|
295
324
|
#
|
|
296
325
|
|
|
297
326
|
## [v1.2.2](https://github.com/mixpanel/mixpanel-react-native/tree/v1.2.2) (2021-05-08)
|
|
298
327
|
|
|
299
328
|
- Fix Mixpanel type conversion for ios
|
|
300
|
-
https://github.com/mixpanel/mixpanel-react-native/pull/48
|
|
329
|
+
https://github.com/mixpanel/mixpanel-react-native/pull/48
|
|
301
330
|
- Fix iOS compile error
|
|
302
|
-
https://github.com/mixpanel/mixpanel-react-native/pull/53
|
|
331
|
+
https://github.com/mixpanel/mixpanel-react-native/pull/53
|
|
303
332
|
|
|
304
333
|
#
|
|
305
334
|
|
|
306
335
|
## [v1.2.0](https://github.com/mixpanel/mixpanel-react-native/tree/v1.2.0) (2021-05-03)
|
|
307
336
|
|
|
308
337
|
- Add new settings APIs: setUseIpAddressForGeolocation, setLoggingEnabled(add android), setServerURL(add android)
|
|
309
|
-
https://github.com/mixpanel/mixpanel-react-native/pull/44
|
|
338
|
+
https://github.com/mixpanel/mixpanel-react-native/pull/44
|
|
310
339
|
|
|
311
340
|
#
|
|
312
341
|
|
|
313
342
|
## [v1.1.1](https://github.com/mixpanel/mixpanel-react-native/tree/v1.1.1) (2021-03-17)
|
|
343
|
+
|
|
314
344
|
- Fix the issue of passing boolean value as int in iOS
|
|
315
|
-
https://github.com/mixpanel/mixpanel-react-native/pull/34
|
|
345
|
+
https://github.com/mixpanel/mixpanel-react-native/pull/34
|
|
316
346
|
|
|
317
347
|
#
|
|
318
348
|
|
|
319
349
|
## [v1.1.0](https://github.com/mixpanel/mixpanel-react-native/tree/v1.1.0) (2021-03-03)
|
|
350
|
+
|
|
320
351
|
- Add Typescript support
|
|
321
352
|
- https://github.com/mixpanel/mixpanel-react-native/pull/31. thanks @sroy3 !
|
|
322
353
|
|
|
323
354
|
#
|
|
324
355
|
|
|
325
356
|
## [v1.0.2](https://github.com/mixpanel/mixpanel-react-native/tree/v1.0.2) (2021-01-27)
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
357
|
+
|
|
358
|
+
- Fix dynamic type not being able to convert properly in android that causes some group apis to fail
|
|
359
|
+
PR: https://github.com/mixpanel/mixpanel-react-native/pull/23
|
|
360
|
+
This is to address issue: https://github.com/mixpanel/mixpanel-react-native/issues/21
|
|
329
361
|
|
|
330
362
|
#
|
|
331
363
|
|
|
332
364
|
## [v1.0.0](https://github.com/mixpanel/mixpanel-react-native/tree/v1.0.0) (2020-12-08)
|
|
333
|
-
|
|
334
|
-
|
|
365
|
+
|
|
366
|
+
- This is our first release! :tada::tada::tada:
|
|
367
|
+
Report issues or give us any feedback is appreciated!
|
|
335
368
|
- integration guide: https://developer.mixpanel.com/docs/react-native
|
|
336
369
|
- full API reference: https://mixpanel.github.io/mixpanel-react-native
|
|
337
370
|
|
|
338
371
|
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
package/README.md
CHANGED
|
@@ -100,7 +100,13 @@ const SampleApp = () => {
|
|
|
100
100
|
export default SampleApp;
|
|
101
101
|
|
|
102
102
|
```
|
|
103
|
-
###
|
|
103
|
+
### Expo and React Native for Web support
|
|
104
|
+
Starting from version 3.0.0, we have introduced support for Expo, React Native for Web, and other platforms utilizing React Native that do not support iOS and Android directly. To enable this feature, initialize Mixpanel with an additional parameter, `useNative`, set to false(```const mixpanel = new Mixpanel(
|
|
105
|
+
"YOUR_MIXPANEL_TOKEN",
|
|
106
|
+
trackAutomaticEvents,
|
|
107
|
+
useNative
|
|
108
|
+
);```). This will activate JavaScript mode. Please note that this functionality is currently in beta testing. For further details and installation guidelines, refer to the release notes available at Mixpanel React Native [v3.0.0-beta.1](https://github.com/mixpanel/mixpanel-react-native/releases/tag/v3.0.0-beta.1).
|
|
109
|
+
|
|
104
110
|
👋 👋 Tell us about the Mixpanel developer experience! [https://www.mixpanel.com/devnps](https://www.mixpanel.com/devnps) 👍 👎
|
|
105
111
|
|
|
106
112
|
|