mixpanel-react-native 3.0.0-beta.1 → 3.0.0
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 +60 -57
- package/MixpanelReactNative.podspec +3 -3
- 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/package.json +1 -1
- package/__tests__/persistent.test.js +0 -161
- package/logs/.b11bf985d66a037ca5688a574653f3bf76a28dfa-audit.json +0 -49
- package/logs/.c366df74eeb671df60a57a2075ae40a3dae2af25-audit.json +0 -49
package/CHANGELOG.md
CHANGED
|
@@ -1,9 +1,39 @@
|
|
|
1
1
|
#
|
|
2
2
|
|
|
3
|
+
## [v3.0.0](https://github.com/mixpanel/mixpanel-react-native/tree/v3.0.0) (2024-04-09)
|
|
4
|
+
|
|
5
|
+
This is the official release for Expo and React Native Web support. For more details, please refer to the release notes for versions [3.0.0-beta.2](https://github.com/mixpanel/mixpanel-react-native/blob/master/CHANGELOG.md#v300-beta2-2024-03-06) and [3.0.0-beta.1](https://github.com/mixpanel/mixpanel-react-native/blob/master/CHANGELOG.md#v300-beta1-2024-02-29).
|
|
6
|
+
|
|
7
|
+
### Enhancements
|
|
8
|
+
|
|
9
|
+
- bump ios version to 4.2.4 [\#228](https://github.com/mixpanel/mixpanel-react-native/pull/228)
|
|
10
|
+
|
|
11
|
+
#
|
|
12
|
+
|
|
13
|
+
## [v3.0.0-beta.2](https://github.com/mixpanel/mixpanel-react-native/tree/v3.0.0-beta.2) (2024-03-06)
|
|
14
|
+
|
|
15
|
+
### Enhancements
|
|
16
|
+
- Add support to use custom storage instead of @react-native-async-storage/async-storage.(https://github.com/mixpanel/mixpanel-react-native/pull/225)
|
|
17
|
+
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:
|
|
18
|
+
|
|
19
|
+
```
|
|
20
|
+
const MyAsyncStorage = require("@my-org/<library-path>/AsyncStorage"); // or your own storage class
|
|
21
|
+
const trackAutomaticEvents = false;
|
|
22
|
+
const useNative = false;
|
|
23
|
+
const mixpanel = new Mixpanel('YOUR_TOKEN', trackAutomaticEvents, useNative, MyAsyncStorage);
|
|
24
|
+
mixpanel.init();
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
### Fixes
|
|
28
|
+
- Make `optOutTracking` and `optInTracking` consistent with the native SDK.(https://github.com/mixpanel/mixpanel-react-native/pull/225)
|
|
29
|
+
|
|
30
|
+
#
|
|
31
|
+
|
|
3
32
|
## [v3.0.0-beta.1](https://github.com/mixpanel/mixpanel-react-native/tree/v3.0.0-beta.1) (2024-02-29)
|
|
4
33
|
|
|
5
34
|
### Expo and React Native Web support
|
|
6
|
-
|
|
35
|
+
|
|
36
|
+
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
37
|
|
|
8
38
|
```
|
|
9
39
|
const trackAutomaticEvents = false;
|
|
@@ -16,14 +46,21 @@ This version(PR [\#223](https://github.com/mixpanel/mixpanel-react-native/pull/2
|
|
|
16
46
|
mixpanel.init();
|
|
17
47
|
```
|
|
18
48
|
|
|
19
|
-
|
|
20
49
|
To try the Expo sample app, navigate to `Samples/MixpanelExpo`, run `npm install`, and then execute `npm run ios` or `npm run android`
|
|
21
50
|
|
|
22
51
|
Known limitations and differences compared to the native mode (iOS/Android):
|
|
52
|
+
|
|
23
53
|
- Automatic Events are currently not supported in this mode. Setting 'trackAutomaticEvents' to 'true' will have no effect.
|
|
24
54
|
- Certain Mixpanel Properties are unavailable in Javascript mode, including detailed information about the device and screen.
|
|
25
55
|
- 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
56
|
|
|
57
|
+
#
|
|
58
|
+
|
|
59
|
+
## [v2.4.1](https://github.com/mixpanel/mixpanel-react-native/tree/v2.4.1) (2024-03-01)
|
|
60
|
+
|
|
61
|
+
### Fixes
|
|
62
|
+
|
|
63
|
+
- Fix mp_lib(Mixpanel Library) not being set as `react-native`
|
|
27
64
|
|
|
28
65
|
#
|
|
29
66
|
|
|
@@ -98,8 +135,8 @@ Known limitations and differences compared to the native mode (iOS/Android):
|
|
|
98
135
|
## [v2.2.0](https://github.com/mixpanel/mixpanel-react-native/tree/v2.2.0) (2023-03-06)
|
|
99
136
|
|
|
100
137
|
### 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
138
|
|
|
139
|
+
- 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
140
|
|
|
104
141
|
### Enhancements
|
|
105
142
|
|
|
@@ -125,7 +162,8 @@ Known limitations and differences compared to the native mode (iOS/Android):
|
|
|
125
162
|
|
|
126
163
|
## [v2.0.0](https://github.com/mixpanel/mixpanel-react-native/tree/v2.0.0) (2022-09-09)
|
|
127
164
|
|
|
128
|
-
### BREAKING CHANGE:
|
|
165
|
+
### BREAKING CHANGE:
|
|
166
|
+
|
|
129
167
|
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
168
|
|
|
131
169
|
### Enhancements
|
|
@@ -138,7 +176,7 @@ This major release removes all remaining calls to Mixpanel's `/decide` API endpo
|
|
|
138
176
|
|
|
139
177
|
### Enhancements
|
|
140
178
|
|
|
141
|
-
-
|
|
179
|
+
- bump versions to get millisecond precision for event time property [\#146](https://github.com/mixpanel/mixpanel-react-native/pull/146)
|
|
142
180
|
|
|
143
181
|
#
|
|
144
182
|
|
|
@@ -164,7 +202,7 @@ This major release removes all remaining calls to Mixpanel's `/decide` API endpo
|
|
|
164
202
|
|
|
165
203
|
- 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
204
|
- Allow disable flush on background [\#135](https://github.com/mixpanel/mixpanel-react-native/pull/135)
|
|
167
|
-
- Adds
|
|
205
|
+
- Adds a new API `getDeviceId` for React Native [\#134](https://github.com/mixpanel/mixpanel-react-native/pull/134)
|
|
168
206
|
|
|
169
207
|
#
|
|
170
208
|
|
|
@@ -201,11 +239,12 @@ This major release removes all remaining calls to Mixpanel's `/decide` API endpo
|
|
|
201
239
|
#
|
|
202
240
|
|
|
203
241
|
## [v1.3.6](https://github.com/mixpanel/mixpanel-react-native/tree/v1.3.6) (2022-01-13)
|
|
242
|
+
|
|
204
243
|
### 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
244
|
|
|
206
245
|
### Fixes
|
|
207
246
|
|
|
208
|
-
- Fix common mobile events not showing
|
|
247
|
+
- 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
248
|
|
|
210
249
|
#
|
|
211
250
|
|
|
@@ -290,91 +329,55 @@ This major release removes all remaining calls to Mixpanel's `/decide` API endpo
|
|
|
290
329
|
## [v1.2.3](https://github.com/mixpanel/mixpanel-react-native/tree/v1.2.3) (2021-05-20)
|
|
291
330
|
|
|
292
331
|
- 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
|
|
332
|
+
https://github.com/mixpanel/mixpanel-react-native/pull/59
|
|
294
333
|
|
|
295
334
|
#
|
|
296
335
|
|
|
297
336
|
## [v1.2.2](https://github.com/mixpanel/mixpanel-react-native/tree/v1.2.2) (2021-05-08)
|
|
298
337
|
|
|
299
338
|
- Fix Mixpanel type conversion for ios
|
|
300
|
-
https://github.com/mixpanel/mixpanel-react-native/pull/48
|
|
339
|
+
https://github.com/mixpanel/mixpanel-react-native/pull/48
|
|
301
340
|
- Fix iOS compile error
|
|
302
|
-
https://github.com/mixpanel/mixpanel-react-native/pull/53
|
|
341
|
+
https://github.com/mixpanel/mixpanel-react-native/pull/53
|
|
303
342
|
|
|
304
343
|
#
|
|
305
344
|
|
|
306
345
|
## [v1.2.0](https://github.com/mixpanel/mixpanel-react-native/tree/v1.2.0) (2021-05-03)
|
|
307
346
|
|
|
308
347
|
- Add new settings APIs: setUseIpAddressForGeolocation, setLoggingEnabled(add android), setServerURL(add android)
|
|
309
|
-
https://github.com/mixpanel/mixpanel-react-native/pull/44
|
|
348
|
+
https://github.com/mixpanel/mixpanel-react-native/pull/44
|
|
310
349
|
|
|
311
350
|
#
|
|
312
351
|
|
|
313
352
|
## [v1.1.1](https://github.com/mixpanel/mixpanel-react-native/tree/v1.1.1) (2021-03-17)
|
|
353
|
+
|
|
314
354
|
- Fix the issue of passing boolean value as int in iOS
|
|
315
|
-
https://github.com/mixpanel/mixpanel-react-native/pull/34
|
|
355
|
+
https://github.com/mixpanel/mixpanel-react-native/pull/34
|
|
316
356
|
|
|
317
357
|
#
|
|
318
358
|
|
|
319
359
|
## [v1.1.0](https://github.com/mixpanel/mixpanel-react-native/tree/v1.1.0) (2021-03-03)
|
|
360
|
+
|
|
320
361
|
- Add Typescript support
|
|
321
362
|
- https://github.com/mixpanel/mixpanel-react-native/pull/31. thanks @sroy3 !
|
|
322
363
|
|
|
323
364
|
#
|
|
324
365
|
|
|
325
366
|
## [v1.0.2](https://github.com/mixpanel/mixpanel-react-native/tree/v1.0.2) (2021-01-27)
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
367
|
+
|
|
368
|
+
- Fix dynamic type not being able to convert properly in android that causes some group apis to fail
|
|
369
|
+
PR: https://github.com/mixpanel/mixpanel-react-native/pull/23
|
|
370
|
+
This is to address issue: https://github.com/mixpanel/mixpanel-react-native/issues/21
|
|
329
371
|
|
|
330
372
|
#
|
|
331
373
|
|
|
332
374
|
## [v1.0.0](https://github.com/mixpanel/mixpanel-react-native/tree/v1.0.0) (2020-12-08)
|
|
333
|
-
|
|
334
|
-
|
|
375
|
+
|
|
376
|
+
- This is our first release! :tada::tada::tada:
|
|
377
|
+
Report issues or give us any feedback is appreciated!
|
|
335
378
|
- integration guide: https://developer.mixpanel.com/docs/react-native
|
|
336
379
|
- full API reference: https://mixpanel.github.io/mixpanel-react-native
|
|
337
380
|
|
|
338
381
|
|
|
339
382
|
|
|
340
383
|
|
|
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
|
-
|
|
@@ -16,8 +16,8 @@ Pod::Spec.new do |s|
|
|
|
16
16
|
s.source_files = "ios/*.{swift,h,m}"
|
|
17
17
|
s.requires_arc = true
|
|
18
18
|
s.preserve_paths = 'LICENSE', 'README.md', 'package.json', 'index.js'
|
|
19
|
-
s.pod_target_xcconfig = { 'DEFINES_MODULE' => 'YES' }
|
|
20
|
-
|
|
19
|
+
s.pod_target_xcconfig = { 'DEFINES_MODULE' => 'YES' }
|
|
20
|
+
|
|
21
21
|
s.dependency "React-Core"
|
|
22
|
-
s.dependency "Mixpanel-swift", '4.2.
|
|
22
|
+
s.dependency "Mixpanel-swift", '4.2.4'
|
|
23
23
|
end
|
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
|
|