mixpanel-react-native 1.3.9 → 1.4.1
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 +77 -50
- package/MixpanelReactNative.podspec +1 -1
- package/Samples/ContextAPIMixpanel/package.json +1 -1
- package/__tests__/index.test.js +2 -2
- package/__tests__/jest_setup.js +1 -0
- package/android/build.gradle +4 -4
- package/android/src/main/java/com/mixpanel/reactnative/MixpanelReactNativeModule.java +8 -1
- package/docs/Mixpanel.html +281 -25
- package/docs/MixpanelGroup.html +7 -7
- package/docs/People.html +12 -12
- package/docs/index.html +1 -1
- package/docs/index.js.html +34 -1
- package/index.d.ts +3 -0
- package/index.js +33 -0
- package/ios/MixpanelReactNative.m +4 -0
- package/ios/MixpanelReactNative.swift +17 -0
- package/package.json +1 -1
- package/release.py +4 -6
- package/Samples/ContextAPIMixpanel/yarn.lock +0 -6770
- package/Samples/MixpanelDemo/yarn.lock +0 -6945
- package/Samples/SimpleMixpanel/yarn.lock +0 -6829
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,39 @@
|
|
|
1
1
|
#
|
|
2
2
|
|
|
3
|
+
## [v1.4.1](https://github.com/mixpanel/mixpanel-react-native/tree/v1.4.1) (2022-05-09)
|
|
4
|
+
|
|
5
|
+
### Fixes
|
|
6
|
+
|
|
7
|
+
- bump android version to 6.2.1 [\#138](https://github.com/mixpanel/mixpanel-react-native/pull/138)
|
|
8
|
+
|
|
9
|
+
#
|
|
10
|
+
|
|
11
|
+
## [v1.4.0](https://github.com/mixpanel/mixpanel-react-native/tree/v1.4.0) (2022-05-06)
|
|
12
|
+
|
|
13
|
+
### Enhancements
|
|
14
|
+
|
|
15
|
+
- Bump to latest ios and android sdk versions and remove android people identify\(deprecated\) [\#137](https://github.com/mixpanel/mixpanel-react-native/pull/137)
|
|
16
|
+
- Allow disable flush on background [\#135](https://github.com/mixpanel/mixpanel-react-native/pull/135)
|
|
17
|
+
- Adds a new API `getDeviceId` for React Native [\#134](https://github.com/mixpanel/mixpanel-react-native/pull/134)
|
|
18
|
+
|
|
19
|
+
#
|
|
20
|
+
|
|
21
|
+
## [v1.3.10](https://github.com/mixpanel/mixpanel-react-native/tree/v1.3.10) (2022-03-26)
|
|
22
|
+
|
|
23
|
+
### Enhancements
|
|
24
|
+
|
|
25
|
+
- upgrade android targetSdkVersion to 30 [\#131](https://github.com/mixpanel/mixpanel-react-native/pull/131)
|
|
26
|
+
|
|
27
|
+
#
|
|
28
|
+
|
|
29
|
+
## [v1.3.9](https://github.com/mixpanel/mixpanel-react-native/tree/v1.3.9) (2022-03-02)
|
|
30
|
+
|
|
31
|
+
**Merged pull requests:**
|
|
32
|
+
|
|
33
|
+
- bump mixpanel-swift to 3.1.5 [\#129](https://github.com/mixpanel/mixpanel-react-native/pull/129)
|
|
34
|
+
|
|
35
|
+
#
|
|
36
|
+
|
|
3
37
|
## [v1.3.8](https://github.com/mixpanel/mixpanel-react-native/tree/v1.3.8) (2022-02-25)
|
|
4
38
|
|
|
5
39
|
### Enhancements
|
|
@@ -27,17 +61,6 @@
|
|
|
27
61
|
|
|
28
62
|
## [v1.3.5](https://github.com/mixpanel/mixpanel-react-native/tree/v1.3.5) (2022-01-04)
|
|
29
63
|
|
|
30
|
-
**Closed issues:**
|
|
31
|
-
|
|
32
|
-
- iOS app crashes when `optOutTrackingDefault` is set - `Assertion failed: You have to call initialize\(token:\) before calling the main instance, or define a new main instance if removing the main one` [\#114](https://github.com/mixpanel/mixpanel-react-native/issues/114)
|
|
33
|
-
- Cannot get users properties? [\#113](https://github.com/mixpanel/mixpanel-react-native/issues/113)
|
|
34
|
-
- Users shows undefined Email of tracked user [\#112](https://github.com/mixpanel/mixpanel-react-native/issues/112)
|
|
35
|
-
- FirstAppOpen event not triggered from iOS [\#111](https://github.com/mixpanel/mixpanel-react-native/issues/111)
|
|
36
|
-
- Set user properties [\#107](https://github.com/mixpanel/mixpanel-react-native/issues/107)
|
|
37
|
-
- Events missing on web dashboard. [\#106](https://github.com/mixpanel/mixpanel-react-native/issues/106)
|
|
38
|
-
- Feature Request: functionality to get promise on mixpanel.track\(\) [\#105](https://github.com/mixpanel/mixpanel-react-native/issues/105)
|
|
39
|
-
- "TS2554: Expected 1 arguments, but got 0." error when implementing Samples/ContextAPIMixpanel/Analytics.js [\#86](https://github.com/mixpanel/mixpanel-react-native/issues/86)
|
|
40
|
-
|
|
41
64
|
**Merged pull requests:**
|
|
42
65
|
|
|
43
66
|
- nested dictionary should be a valid type in iOS [\#119](https://github.com/mixpanel/mixpanel-react-native/pull/119)
|
|
@@ -49,14 +72,6 @@
|
|
|
49
72
|
|
|
50
73
|
## [v1.3.4](https://github.com/mixpanel/mixpanel-react-native/tree/v1.3.4) (2021-09-25)
|
|
51
74
|
|
|
52
|
-
**Closed issues:**
|
|
53
|
-
|
|
54
|
-
- ANDROID\_NDK\_HOME error when building Android with version 1.3.3 [\#101](https://github.com/mixpanel/mixpanel-react-native/issues/101)
|
|
55
|
-
- \[Android\] Build fails after Maven migration [\#94](https://github.com/mixpanel/mixpanel-react-native/issues/94)
|
|
56
|
-
- \[Android\] Mixpanel not working after upgrading React Native to 0.65.0 [\#93](https://github.com/mixpanel/mixpanel-react-native/issues/93)
|
|
57
|
-
- Mixpanel.library is always displayed react-native [\#92](https://github.com/mixpanel/mixpanel-react-native/issues/92)
|
|
58
|
-
- App Session events don't seem to be logged after v1.2.4 [\#91](https://github.com/mixpanel/mixpanel-react-native/issues/91)
|
|
59
|
-
|
|
60
75
|
**Merged pull requests:**
|
|
61
76
|
|
|
62
77
|
- Bump native SDK dependencies [\#102](https://github.com/mixpanel/mixpanel-react-native/pull/102)
|
|
@@ -70,13 +85,6 @@
|
|
|
70
85
|
- Enable automatic events in iOS [\#99](https://github.com/mixpanel/mixpanel-react-native/pull/99)
|
|
71
86
|
- replace JCenter with Maven [\#95](https://github.com/mixpanel/mixpanel-react-native/pull/95)
|
|
72
87
|
|
|
73
|
-
**Closed issues:**
|
|
74
|
-
|
|
75
|
-
- library not found for -lMixpanelReactNative for iOS [\#96](https://github.com/mixpanel/mixpanel-react-native/issues/96)
|
|
76
|
-
- mixpanel.register not supported in react-native library [\#90](https://github.com/mixpanel/mixpanel-react-native/issues/90)
|
|
77
|
-
- Mixpanel.addPushDeviceToken ? [\#89](https://github.com/mixpanel/mixpanel-react-native/issues/89)
|
|
78
|
-
- Are the types correct on the latest version? [\#83](https://github.com/mixpanel/mixpanel-react-native/issues/83)
|
|
79
|
-
|
|
80
88
|
**Merged pull requests:**
|
|
81
89
|
|
|
82
90
|
- Bump tmpl from 1.0.4 to 1.0.5 in /Samples/ContextAPIMixpanel [\#100](https://github.com/mixpanel/mixpanel-react-native/pull/100)
|
|
@@ -94,15 +102,6 @@
|
|
|
94
102
|
|
|
95
103
|
- Add constructor method type definition [\#85](https://github.com/mixpanel/mixpanel-react-native/pull/85)
|
|
96
104
|
|
|
97
|
-
**Closed issues:**
|
|
98
|
-
|
|
99
|
-
- Failed resolution of: Lcom/google/firebase/iid/FirebaseInstanceId [\#75](https://github.com/mixpanel/mixpanel-react-native/issues/75)
|
|
100
|
-
- It only track on Android in iOS nothing at all [\#72](https://github.com/mixpanel/mixpanel-react-native/issues/72)
|
|
101
|
-
- Mixpanel React Native is null [\#71](https://github.com/mixpanel/mixpanel-react-native/issues/71)
|
|
102
|
-
- Are the documented initializations correct? [\#70](https://github.com/mixpanel/mixpanel-react-native/issues/70)
|
|
103
|
-
- Getting "MixpanelReactNative is null" on fresh install [\#46](https://github.com/mixpanel/mixpanel-react-native/issues/46)
|
|
104
|
-
- Example using ContextAPI and functional components [\#17](https://github.com/mixpanel/mixpanel-react-native/issues/17)
|
|
105
|
-
|
|
106
105
|
#
|
|
107
106
|
|
|
108
107
|
## [v1.3.1](https://github.com/mixpanel/mixpanel-react-native/tree/v1.3.1) (2021-07-29)
|
|
@@ -111,10 +110,6 @@
|
|
|
111
110
|
|
|
112
111
|
- Fix the inconsistency typescript definition of init [\#78](https://github.com/mixpanel/mixpanel-react-native/pull/78)
|
|
113
112
|
|
|
114
|
-
**Closed issues:**
|
|
115
|
-
|
|
116
|
-
- confusion re documentation [\#77](https://github.com/mixpanel/mixpanel-react-native/issues/77)
|
|
117
|
-
|
|
118
113
|
**Merged pull requests:**
|
|
119
114
|
|
|
120
115
|
- Add more sample apps for integrating Mixpanel including using Context API [\#79](https://github.com/mixpanel/mixpanel-react-native/pull/79)
|
|
@@ -123,11 +118,6 @@
|
|
|
123
118
|
|
|
124
119
|
## [v1.3.0](https://github.com/mixpanel/mixpanel-react-native/tree/v1.3.0) (2021-07-28)
|
|
125
120
|
|
|
126
|
-
**Closed issues:**
|
|
127
|
-
|
|
128
|
-
- Xcode 12.5.1 linking issue [\#68](https://github.com/mixpanel/mixpanel-react-native/issues/68)
|
|
129
|
-
- It only track on iOS in Android nothing at all [\#56](https://github.com/mixpanel/mixpanel-react-native/issues/56)
|
|
130
|
-
|
|
131
121
|
**Merged pull requests:**
|
|
132
122
|
|
|
133
123
|
- Deprecate the class method init\(\) and improve the example [\#76](https://github.com/mixpanel/mixpanel-react-native/pull/76)
|
|
@@ -136,12 +126,6 @@
|
|
|
136
126
|
|
|
137
127
|
## [v1.2.4](https://github.com/mixpanel/mixpanel-react-native/tree/v1.2.4) (2021-06-24)
|
|
138
128
|
|
|
139
|
-
**Closed issues:**
|
|
140
|
-
|
|
141
|
-
- A lot of "undefined symbol" errors happening with the latest version [\#64](https://github.com/mixpanel/mixpanel-react-native/issues/64)
|
|
142
|
-
- Tracking and Identifying Oh My! [\#60](https://github.com/mixpanel/mixpanel-react-native/issues/60)
|
|
143
|
-
- why is firebase-messaging listed as a dependency? [\#55](https://github.com/mixpanel/mixpanel-react-native/issues/55)
|
|
144
|
-
|
|
145
129
|
**Merged pull requests:**
|
|
146
130
|
|
|
147
131
|
- Polish README [\#67](https://github.com/mixpanel/mixpanel-react-native/pull/67)
|
|
@@ -151,12 +135,55 @@
|
|
|
151
135
|
- Add a CHANGELOG placeholder [\#62](https://github.com/mixpanel/mixpanel-react-native/pull/62)
|
|
152
136
|
- Add github workflow for auto release [\#61](https://github.com/mixpanel/mixpanel-react-native/pull/61)
|
|
153
137
|
|
|
138
|
+
#
|
|
154
139
|
|
|
140
|
+
## [v1.2.3](https://github.com/mixpanel/mixpanel-react-native/tree/v1.2.3) (2021-05-20)
|
|
155
141
|
|
|
142
|
+
- Bump Mixpanel Andriod dependency to 5.9.1 (Migrate to Airship 12.x for the integration)
|
|
143
|
+
https://github.com/mixpanel/mixpanel-react-native/pull/59
|
|
156
144
|
|
|
145
|
+
#
|
|
146
|
+
|
|
147
|
+
## [v1.2.2](https://github.com/mixpanel/mixpanel-react-native/tree/v1.2.2) (2021-05-08)
|
|
157
148
|
|
|
149
|
+
- Fix Mixpanel type conversion for ios
|
|
150
|
+
https://github.com/mixpanel/mixpanel-react-native/pull/48
|
|
151
|
+
- Fix iOS compile error
|
|
152
|
+
https://github.com/mixpanel/mixpanel-react-native/pull/53
|
|
158
153
|
|
|
154
|
+
#
|
|
155
|
+
|
|
156
|
+
## [v1.2.0](https://github.com/mixpanel/mixpanel-react-native/tree/v1.2.0) (2021-05-03)
|
|
157
|
+
|
|
158
|
+
- Add new settings APIs: setUseIpAddressForGeolocation, setLoggingEnabled(add android), setServerURL(add android)
|
|
159
|
+
https://github.com/mixpanel/mixpanel-react-native/pull/44
|
|
160
|
+
|
|
161
|
+
#
|
|
162
|
+
|
|
163
|
+
## [v1.1.1](https://github.com/mixpanel/mixpanel-react-native/tree/v1.1.1) (2021-03-17)
|
|
164
|
+
- Fix the issue of passing boolean value as int in iOS
|
|
165
|
+
https://github.com/mixpanel/mixpanel-react-native/pull/34
|
|
166
|
+
|
|
167
|
+
#
|
|
168
|
+
|
|
169
|
+
## [v1.1.0](https://github.com/mixpanel/mixpanel-react-native/tree/v1.1.0) (2021-03-03)
|
|
170
|
+
- Add Typescript support
|
|
171
|
+
- https://github.com/mixpanel/mixpanel-react-native/pull/31. thanks @sroy3 !
|
|
172
|
+
|
|
173
|
+
#
|
|
174
|
+
|
|
175
|
+
## [v1.0.2](https://github.com/mixpanel/mixpanel-react-native/tree/v1.0.2) (2021-01-27)
|
|
176
|
+
- Fix dynamic type not being able to convert properly in android that causes some group apis to fail
|
|
177
|
+
PR: https://github.com/mixpanel/mixpanel-react-native/pull/23
|
|
178
|
+
This is to address issue: https://github.com/mixpanel/mixpanel-react-native/issues/21
|
|
179
|
+
|
|
180
|
+
#
|
|
159
181
|
|
|
182
|
+
## [v1.0.0](https://github.com/mixpanel/mixpanel-react-native/tree/v1.0.0) (2020-12-08)
|
|
183
|
+
- This is our first release! :tada::tada::tada:
|
|
184
|
+
Report issues or give us any feedback is appreciated!
|
|
185
|
+
- integration guide: https://developer.mixpanel.com/docs/react-native
|
|
186
|
+
- full API reference: https://mixpanel.github.io/mixpanel-react-native
|
|
160
187
|
|
|
161
188
|
|
|
162
189
|
|
package/__tests__/index.test.js
CHANGED
|
@@ -9,13 +9,13 @@ import { NativeModules } from 'react-native';
|
|
|
9
9
|
|
|
10
10
|
test(`it calls MixpanelReactNative initialize`, async () => {
|
|
11
11
|
const mixpanel = await Mixpanel.init("token");
|
|
12
|
-
expect(NativeModules.MixpanelReactNative.initialize).toBeCalledWith("token", false, {"$lib_version": "1.
|
|
12
|
+
expect(NativeModules.MixpanelReactNative.initialize).toBeCalledWith("token", false, {"$lib_version": "1.4.1", "mp_lib": "react-native"});
|
|
13
13
|
});
|
|
14
14
|
|
|
15
15
|
test(`it calls MixpanelReactNative initialize with optOut and superProperties`, async () => {
|
|
16
16
|
const mixpanel = new Mixpanel("token");
|
|
17
17
|
mixpanel.init(true, {"super": "property"})
|
|
18
|
-
expect(NativeModules.MixpanelReactNative.initialize).toBeCalledWith("token", true, {"$lib_version": "1.
|
|
18
|
+
expect(NativeModules.MixpanelReactNative.initialize).toBeCalledWith("token", true, {"$lib_version": "1.4.1", "mp_lib": "react-native", "super": "property"});
|
|
19
19
|
});
|
|
20
20
|
|
|
21
21
|
test(`it calls MixpanelReactNative setServerURL`, async () => {
|
package/__tests__/jest_setup.js
CHANGED
|
@@ -20,6 +20,7 @@ jest.doMock('react-native', () => {
|
|
|
20
20
|
initialize: jest.fn(),
|
|
21
21
|
setServerURL: jest.fn(),
|
|
22
22
|
setLoggingEnabled: jest.fn(),
|
|
23
|
+
setFlushOnBackground: jest.fn(),
|
|
23
24
|
setUseIpAddressForGeolocation: jest.fn(),
|
|
24
25
|
hasOptedOutTracking: jest.fn(),
|
|
25
26
|
optInTracking: jest.fn(),
|
package/android/build.gradle
CHANGED
|
@@ -11,11 +11,11 @@ buildscript {
|
|
|
11
11
|
apply plugin: 'com.android.library'
|
|
12
12
|
|
|
13
13
|
android {
|
|
14
|
-
compileSdkVersion
|
|
15
|
-
buildToolsVersion "
|
|
14
|
+
compileSdkVersion 30
|
|
15
|
+
buildToolsVersion "30.0.3"
|
|
16
16
|
defaultConfig {
|
|
17
17
|
minSdkVersion 21
|
|
18
|
-
targetSdkVersion
|
|
18
|
+
targetSdkVersion 30
|
|
19
19
|
versionCode 1
|
|
20
20
|
versionName "1.0"
|
|
21
21
|
}
|
|
@@ -34,5 +34,5 @@ repositories {
|
|
|
34
34
|
|
|
35
35
|
dependencies {
|
|
36
36
|
implementation 'com.facebook.react:react-native:+'
|
|
37
|
-
implementation 'com.mixpanel.android:mixpanel-android:6.
|
|
37
|
+
implementation 'com.mixpanel.android:mixpanel-android:6.2.1'
|
|
38
38
|
}
|
|
@@ -98,7 +98,6 @@ public class MixpanelReactNativeModule extends ReactContextBaseJavaModule {
|
|
|
98
98
|
MixpanelAPI instance = MixpanelAPI.getInstance(this.mReactContext, token);
|
|
99
99
|
synchronized (instance) {
|
|
100
100
|
instance.identify(distinctId);
|
|
101
|
-
instance.getPeople().identify(distinctId);
|
|
102
101
|
promise.resolve(null);
|
|
103
102
|
}
|
|
104
103
|
}
|
|
@@ -111,6 +110,14 @@ public class MixpanelReactNativeModule extends ReactContextBaseJavaModule {
|
|
|
111
110
|
}
|
|
112
111
|
}
|
|
113
112
|
|
|
113
|
+
@ReactMethod
|
|
114
|
+
public void getDeviceId(final String token, Promise promise) {
|
|
115
|
+
MixpanelAPI instance = MixpanelAPI.getInstance(this.mReactContext, token);
|
|
116
|
+
synchronized (instance) {
|
|
117
|
+
promise.resolve(instance.getAnonymousId());
|
|
118
|
+
}
|
|
119
|
+
}
|
|
120
|
+
|
|
114
121
|
@ReactMethod
|
|
115
122
|
public void track(final String token, final String eventName, ReadableMap properties, Promise promise) throws JSONException {
|
|
116
123
|
MixpanelAPI instance = MixpanelAPI.getInstance(this.mReactContext, token);
|