mixpanel-react-native 1.3.10 → 1.4.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 +47 -50
- package/MixpanelReactNative.podspec +1 -1
- package/Samples/SimpleMixpanel/android/.project +2 -2
- package/__tests__/index.test.js +2 -2
- package/__tests__/jest_setup.js +1 -0
- package/android/build.gradle +1 -1
- 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/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,15 @@
|
|
|
1
1
|
#
|
|
2
2
|
|
|
3
|
+
## [v1.4.0](https://github.com/mixpanel/mixpanel-react-native/tree/v1.4.0) (2022-05-06)
|
|
4
|
+
|
|
5
|
+
### Enhancements
|
|
6
|
+
|
|
7
|
+
- Bump to latest ios and android sdk versions and remove android people identify\(deprecated\) [\#137](https://github.com/mixpanel/mixpanel-react-native/pull/137)
|
|
8
|
+
- Allow disable flush on background [\#135](https://github.com/mixpanel/mixpanel-react-native/pull/135)
|
|
9
|
+
- Adds a new API `getDeviceId` for React Native [\#134](https://github.com/mixpanel/mixpanel-react-native/pull/134)
|
|
10
|
+
|
|
11
|
+
#
|
|
12
|
+
|
|
3
13
|
## [v1.3.10](https://github.com/mixpanel/mixpanel-react-native/tree/v1.3.10) (2022-03-26)
|
|
4
14
|
|
|
5
15
|
### Enhancements
|
|
@@ -43,17 +53,6 @@
|
|
|
43
53
|
|
|
44
54
|
## [v1.3.5](https://github.com/mixpanel/mixpanel-react-native/tree/v1.3.5) (2022-01-04)
|
|
45
55
|
|
|
46
|
-
**Closed issues:**
|
|
47
|
-
|
|
48
|
-
- 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)
|
|
49
|
-
- Cannot get users properties? [\#113](https://github.com/mixpanel/mixpanel-react-native/issues/113)
|
|
50
|
-
- Users shows undefined Email of tracked user [\#112](https://github.com/mixpanel/mixpanel-react-native/issues/112)
|
|
51
|
-
- FirstAppOpen event not triggered from iOS [\#111](https://github.com/mixpanel/mixpanel-react-native/issues/111)
|
|
52
|
-
- Set user properties [\#107](https://github.com/mixpanel/mixpanel-react-native/issues/107)
|
|
53
|
-
- Events missing on web dashboard. [\#106](https://github.com/mixpanel/mixpanel-react-native/issues/106)
|
|
54
|
-
- Feature Request: functionality to get promise on mixpanel.track\(\) [\#105](https://github.com/mixpanel/mixpanel-react-native/issues/105)
|
|
55
|
-
- "TS2554: Expected 1 arguments, but got 0." error when implementing Samples/ContextAPIMixpanel/Analytics.js [\#86](https://github.com/mixpanel/mixpanel-react-native/issues/86)
|
|
56
|
-
|
|
57
56
|
**Merged pull requests:**
|
|
58
57
|
|
|
59
58
|
- nested dictionary should be a valid type in iOS [\#119](https://github.com/mixpanel/mixpanel-react-native/pull/119)
|
|
@@ -65,14 +64,6 @@
|
|
|
65
64
|
|
|
66
65
|
## [v1.3.4](https://github.com/mixpanel/mixpanel-react-native/tree/v1.3.4) (2021-09-25)
|
|
67
66
|
|
|
68
|
-
**Closed issues:**
|
|
69
|
-
|
|
70
|
-
- ANDROID\_NDK\_HOME error when building Android with version 1.3.3 [\#101](https://github.com/mixpanel/mixpanel-react-native/issues/101)
|
|
71
|
-
- \[Android\] Build fails after Maven migration [\#94](https://github.com/mixpanel/mixpanel-react-native/issues/94)
|
|
72
|
-
- \[Android\] Mixpanel not working after upgrading React Native to 0.65.0 [\#93](https://github.com/mixpanel/mixpanel-react-native/issues/93)
|
|
73
|
-
- Mixpanel.library is always displayed react-native [\#92](https://github.com/mixpanel/mixpanel-react-native/issues/92)
|
|
74
|
-
- App Session events don't seem to be logged after v1.2.4 [\#91](https://github.com/mixpanel/mixpanel-react-native/issues/91)
|
|
75
|
-
|
|
76
67
|
**Merged pull requests:**
|
|
77
68
|
|
|
78
69
|
- Bump native SDK dependencies [\#102](https://github.com/mixpanel/mixpanel-react-native/pull/102)
|
|
@@ -86,13 +77,6 @@
|
|
|
86
77
|
- Enable automatic events in iOS [\#99](https://github.com/mixpanel/mixpanel-react-native/pull/99)
|
|
87
78
|
- replace JCenter with Maven [\#95](https://github.com/mixpanel/mixpanel-react-native/pull/95)
|
|
88
79
|
|
|
89
|
-
**Closed issues:**
|
|
90
|
-
|
|
91
|
-
- library not found for -lMixpanelReactNative for iOS [\#96](https://github.com/mixpanel/mixpanel-react-native/issues/96)
|
|
92
|
-
- mixpanel.register not supported in react-native library [\#90](https://github.com/mixpanel/mixpanel-react-native/issues/90)
|
|
93
|
-
- Mixpanel.addPushDeviceToken ? [\#89](https://github.com/mixpanel/mixpanel-react-native/issues/89)
|
|
94
|
-
- Are the types correct on the latest version? [\#83](https://github.com/mixpanel/mixpanel-react-native/issues/83)
|
|
95
|
-
|
|
96
80
|
**Merged pull requests:**
|
|
97
81
|
|
|
98
82
|
- Bump tmpl from 1.0.4 to 1.0.5 in /Samples/ContextAPIMixpanel [\#100](https://github.com/mixpanel/mixpanel-react-native/pull/100)
|
|
@@ -110,15 +94,6 @@
|
|
|
110
94
|
|
|
111
95
|
- Add constructor method type definition [\#85](https://github.com/mixpanel/mixpanel-react-native/pull/85)
|
|
112
96
|
|
|
113
|
-
**Closed issues:**
|
|
114
|
-
|
|
115
|
-
- Failed resolution of: Lcom/google/firebase/iid/FirebaseInstanceId [\#75](https://github.com/mixpanel/mixpanel-react-native/issues/75)
|
|
116
|
-
- It only track on Android in iOS nothing at all [\#72](https://github.com/mixpanel/mixpanel-react-native/issues/72)
|
|
117
|
-
- Mixpanel React Native is null [\#71](https://github.com/mixpanel/mixpanel-react-native/issues/71)
|
|
118
|
-
- Are the documented initializations correct? [\#70](https://github.com/mixpanel/mixpanel-react-native/issues/70)
|
|
119
|
-
- Getting "MixpanelReactNative is null" on fresh install [\#46](https://github.com/mixpanel/mixpanel-react-native/issues/46)
|
|
120
|
-
- Example using ContextAPI and functional components [\#17](https://github.com/mixpanel/mixpanel-react-native/issues/17)
|
|
121
|
-
|
|
122
97
|
#
|
|
123
98
|
|
|
124
99
|
## [v1.3.1](https://github.com/mixpanel/mixpanel-react-native/tree/v1.3.1) (2021-07-29)
|
|
@@ -127,10 +102,6 @@
|
|
|
127
102
|
|
|
128
103
|
- Fix the inconsistency typescript definition of init [\#78](https://github.com/mixpanel/mixpanel-react-native/pull/78)
|
|
129
104
|
|
|
130
|
-
**Closed issues:**
|
|
131
|
-
|
|
132
|
-
- confusion re documentation [\#77](https://github.com/mixpanel/mixpanel-react-native/issues/77)
|
|
133
|
-
|
|
134
105
|
**Merged pull requests:**
|
|
135
106
|
|
|
136
107
|
- Add more sample apps for integrating Mixpanel including using Context API [\#79](https://github.com/mixpanel/mixpanel-react-native/pull/79)
|
|
@@ -139,11 +110,6 @@
|
|
|
139
110
|
|
|
140
111
|
## [v1.3.0](https://github.com/mixpanel/mixpanel-react-native/tree/v1.3.0) (2021-07-28)
|
|
141
112
|
|
|
142
|
-
**Closed issues:**
|
|
143
|
-
|
|
144
|
-
- Xcode 12.5.1 linking issue [\#68](https://github.com/mixpanel/mixpanel-react-native/issues/68)
|
|
145
|
-
- It only track on iOS in Android nothing at all [\#56](https://github.com/mixpanel/mixpanel-react-native/issues/56)
|
|
146
|
-
|
|
147
113
|
**Merged pull requests:**
|
|
148
114
|
|
|
149
115
|
- Deprecate the class method init\(\) and improve the example [\#76](https://github.com/mixpanel/mixpanel-react-native/pull/76)
|
|
@@ -152,12 +118,6 @@
|
|
|
152
118
|
|
|
153
119
|
## [v1.2.4](https://github.com/mixpanel/mixpanel-react-native/tree/v1.2.4) (2021-06-24)
|
|
154
120
|
|
|
155
|
-
**Closed issues:**
|
|
156
|
-
|
|
157
|
-
- A lot of "undefined symbol" errors happening with the latest version [\#64](https://github.com/mixpanel/mixpanel-react-native/issues/64)
|
|
158
|
-
- Tracking and Identifying Oh My! [\#60](https://github.com/mixpanel/mixpanel-react-native/issues/60)
|
|
159
|
-
- why is firebase-messaging listed as a dependency? [\#55](https://github.com/mixpanel/mixpanel-react-native/issues/55)
|
|
160
|
-
|
|
161
121
|
**Merged pull requests:**
|
|
162
122
|
|
|
163
123
|
- Polish README [\#67](https://github.com/mixpanel/mixpanel-react-native/pull/67)
|
|
@@ -167,18 +127,55 @@
|
|
|
167
127
|
- Add a CHANGELOG placeholder [\#62](https://github.com/mixpanel/mixpanel-react-native/pull/62)
|
|
168
128
|
- Add github workflow for auto release [\#61](https://github.com/mixpanel/mixpanel-react-native/pull/61)
|
|
169
129
|
|
|
130
|
+
#
|
|
170
131
|
|
|
132
|
+
## [v1.2.3](https://github.com/mixpanel/mixpanel-react-native/tree/v1.2.3) (2021-05-20)
|
|
171
133
|
|
|
134
|
+
- Bump Mixpanel Andriod dependency to 5.9.1 (Migrate to Airship 12.x for the integration)
|
|
135
|
+
https://github.com/mixpanel/mixpanel-react-native/pull/59
|
|
172
136
|
|
|
137
|
+
#
|
|
173
138
|
|
|
139
|
+
## [v1.2.2](https://github.com/mixpanel/mixpanel-react-native/tree/v1.2.2) (2021-05-08)
|
|
174
140
|
|
|
141
|
+
- Fix Mixpanel type conversion for ios
|
|
142
|
+
https://github.com/mixpanel/mixpanel-react-native/pull/48
|
|
143
|
+
- Fix iOS compile error
|
|
144
|
+
https://github.com/mixpanel/mixpanel-react-native/pull/53
|
|
175
145
|
|
|
146
|
+
#
|
|
176
147
|
|
|
148
|
+
## [v1.2.0](https://github.com/mixpanel/mixpanel-react-native/tree/v1.2.0) (2021-05-03)
|
|
177
149
|
|
|
150
|
+
- Add new settings APIs: setUseIpAddressForGeolocation, setLoggingEnabled(add android), setServerURL(add android)
|
|
151
|
+
https://github.com/mixpanel/mixpanel-react-native/pull/44
|
|
178
152
|
|
|
153
|
+
#
|
|
179
154
|
|
|
155
|
+
## [v1.1.1](https://github.com/mixpanel/mixpanel-react-native/tree/v1.1.1) (2021-03-17)
|
|
156
|
+
- Fix the issue of passing boolean value as int in iOS
|
|
157
|
+
https://github.com/mixpanel/mixpanel-react-native/pull/34
|
|
180
158
|
|
|
159
|
+
#
|
|
160
|
+
|
|
161
|
+
## [v1.1.0](https://github.com/mixpanel/mixpanel-react-native/tree/v1.1.0) (2021-03-03)
|
|
162
|
+
- Add Typescript support
|
|
163
|
+
- https://github.com/mixpanel/mixpanel-react-native/pull/31. thanks @sroy3 !
|
|
164
|
+
|
|
165
|
+
#
|
|
166
|
+
|
|
167
|
+
## [v1.0.2](https://github.com/mixpanel/mixpanel-react-native/tree/v1.0.2) (2021-01-27)
|
|
168
|
+
- Fix dynamic type not being able to convert properly in android that causes some group apis to fail
|
|
169
|
+
PR: https://github.com/mixpanel/mixpanel-react-native/pull/23
|
|
170
|
+
This is to address issue: https://github.com/mixpanel/mixpanel-react-native/issues/21
|
|
171
|
+
|
|
172
|
+
#
|
|
181
173
|
|
|
174
|
+
## [v1.0.0](https://github.com/mixpanel/mixpanel-react-native/tree/v1.0.0) (2020-12-08)
|
|
175
|
+
- This is our first release! :tada::tada::tada:
|
|
176
|
+
Report issues or give us any feedback is appreciated!
|
|
177
|
+
- integration guide: https://developer.mixpanel.com/docs/react-native
|
|
178
|
+
- full API reference: https://mixpanel.github.io/mixpanel-react-native
|
|
182
179
|
|
|
183
180
|
|
|
184
181
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
<?xml version="1.0" encoding="UTF-8"?>
|
|
2
2
|
<projectDescription>
|
|
3
|
-
<name>
|
|
3
|
+
<name>SimpleMixpanel</name>
|
|
4
4
|
<comment>Project android created by Buildship.</comment>
|
|
5
5
|
<projects>
|
|
6
6
|
</projects>
|
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
</natures>
|
|
17
17
|
<filteredResources>
|
|
18
18
|
<filter>
|
|
19
|
-
<id>
|
|
19
|
+
<id>0</id>
|
|
20
20
|
<name></name>
|
|
21
21
|
<type>30</type>
|
|
22
22
|
<matcher>
|
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.0", "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.0", "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
|
@@ -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);
|
package/docs/Mixpanel.html
CHANGED
|
@@ -445,7 +445,7 @@ Initializes Mixpanel and return an instance of Mixpanel the given project token.
|
|
|
445
445
|
|
|
446
446
|
<dt class="tag-source">Source:</dt>
|
|
447
447
|
<dd class="tag-source"><ul class="dummy"><li>
|
|
448
|
-
<a href="index.js.html">index.js</a>, <a href="index.js.html#
|
|
448
|
+
<a href="index.js.html">index.js</a>, <a href="index.js.html#line304">line 304</a>
|
|
449
449
|
</li></ul></dd>
|
|
450
450
|
|
|
451
451
|
|
|
@@ -612,7 +612,7 @@ People.identify() if you wish the new alias to be used for Events and People.
|
|
|
612
612
|
|
|
613
613
|
<dt class="tag-source">Source:</dt>
|
|
614
614
|
<dd class="tag-source"><ul class="dummy"><li>
|
|
615
|
-
<a href="index.js.html">index.js</a>, <a href="index.js.html#
|
|
615
|
+
<a href="index.js.html">index.js</a>, <a href="index.js.html#line205">line 205</a>
|
|
616
616
|
</li></ul></dd>
|
|
617
617
|
|
|
618
618
|
|
|
@@ -705,7 +705,7 @@ superProperties registered before the clearSuperProperties method was called.
|
|
|
705
705
|
|
|
706
706
|
<dt class="tag-source">Source:</dt>
|
|
707
707
|
<dd class="tag-source"><ul class="dummy"><li>
|
|
708
|
-
<a href="index.js.html">index.js</a>, <a href="index.js.html#
|
|
708
|
+
<a href="index.js.html">index.js</a>, <a href="index.js.html#line412">line 412</a>
|
|
709
709
|
</li></ul></dd>
|
|
710
710
|
|
|
711
711
|
|
|
@@ -867,7 +867,7 @@ to Group Analytics using the same group value will create and store new values.<
|
|
|
867
867
|
|
|
868
868
|
<dt class="tag-source">Source:</dt>
|
|
869
869
|
<dd class="tag-source"><ul class="dummy"><li>
|
|
870
|
-
<a href="index.js.html">index.js</a>, <a href="index.js.html#
|
|
870
|
+
<a href="index.js.html">index.js</a>, <a href="index.js.html#line332">line 332</a>
|
|
871
871
|
</li></ul></dd>
|
|
872
872
|
|
|
873
873
|
|
|
@@ -1004,7 +1004,7 @@ to Group Analytics using the same group value will create and store new values.<
|
|
|
1004
1004
|
|
|
1005
1005
|
<dt class="tag-source">Source:</dt>
|
|
1006
1006
|
<dd class="tag-source"><ul class="dummy"><li>
|
|
1007
|
-
<a href="index.js.html">index.js</a>, <a href="index.js.html#
|
|
1007
|
+
<a href="index.js.html">index.js</a>, <a href="index.js.html#line437">line 437</a>
|
|
1008
1008
|
</li></ul></dd>
|
|
1009
1009
|
|
|
1010
1010
|
|
|
@@ -1120,7 +1120,103 @@ send all remaining messages to the server.
|
|
|
1120
1120
|
|
|
1121
1121
|
<dt class="tag-source">Source:</dt>
|
|
1122
1122
|
<dd class="tag-source"><ul class="dummy"><li>
|
|
1123
|
-
<a href="index.js.html">index.js</a>, <a href="index.js.html#
|
|
1123
|
+
<a href="index.js.html">index.js</a>, <a href="index.js.html#line497">line 497</a>
|
|
1124
|
+
</li></ul></dd>
|
|
1125
|
+
|
|
1126
|
+
|
|
1127
|
+
|
|
1128
|
+
|
|
1129
|
+
|
|
1130
|
+
|
|
1131
|
+
|
|
1132
|
+
</dl>
|
|
1133
|
+
|
|
1134
|
+
|
|
1135
|
+
|
|
1136
|
+
|
|
1137
|
+
|
|
1138
|
+
|
|
1139
|
+
|
|
1140
|
+
|
|
1141
|
+
|
|
1142
|
+
|
|
1143
|
+
|
|
1144
|
+
|
|
1145
|
+
|
|
1146
|
+
|
|
1147
|
+
|
|
1148
|
+
|
|
1149
|
+
|
|
1150
|
+
|
|
1151
|
+
|
|
1152
|
+
|
|
1153
|
+
|
|
1154
|
+
|
|
1155
|
+
|
|
1156
|
+
|
|
1157
|
+
|
|
1158
|
+
|
|
1159
|
+
<h4 class="name" id="getDeviceId"><span class="type-signature"></span>getDeviceId<span class="signature">()</span><span class="type-signature"> → {Promise.<string>}</span></h4>
|
|
1160
|
+
|
|
1161
|
+
|
|
1162
|
+
|
|
1163
|
+
|
|
1164
|
+
|
|
1165
|
+
|
|
1166
|
+
<div class="description">
|
|
1167
|
+
Returns the current device id of the device.
|
|
1168
|
+
This id automatically generated by the library and regenerated when logout or reset is called.
|
|
1169
|
+
|
|
1170
|
+
example of usage:
|
|
1171
|
+
<pre>
|
|
1172
|
+
<code>
|
|
1173
|
+
const deviceId = await mixpanel.getDeviceId();
|
|
1174
|
+
</code>
|
|
1175
|
+
</pre>
|
|
1176
|
+
</div>
|
|
1177
|
+
|
|
1178
|
+
|
|
1179
|
+
|
|
1180
|
+
|
|
1181
|
+
|
|
1182
|
+
|
|
1183
|
+
|
|
1184
|
+
|
|
1185
|
+
|
|
1186
|
+
|
|
1187
|
+
|
|
1188
|
+
|
|
1189
|
+
|
|
1190
|
+
<dl class="details">
|
|
1191
|
+
|
|
1192
|
+
|
|
1193
|
+
|
|
1194
|
+
|
|
1195
|
+
|
|
1196
|
+
|
|
1197
|
+
|
|
1198
|
+
|
|
1199
|
+
|
|
1200
|
+
|
|
1201
|
+
|
|
1202
|
+
|
|
1203
|
+
|
|
1204
|
+
|
|
1205
|
+
|
|
1206
|
+
|
|
1207
|
+
|
|
1208
|
+
|
|
1209
|
+
|
|
1210
|
+
|
|
1211
|
+
|
|
1212
|
+
|
|
1213
|
+
|
|
1214
|
+
|
|
1215
|
+
|
|
1216
|
+
|
|
1217
|
+
<dt class="tag-source">Source:</dt>
|
|
1218
|
+
<dd class="tag-source"><ul class="dummy"><li>
|
|
1219
|
+
<a href="index.js.html">index.js</a>, <a href="index.js.html#line484">line 484</a>
|
|
1124
1220
|
</li></ul></dd>
|
|
1125
1221
|
|
|
1126
1222
|
|
|
@@ -1145,6 +1241,28 @@ send all remaining messages to the server.
|
|
|
1145
1241
|
|
|
1146
1242
|
|
|
1147
1243
|
|
|
1244
|
+
<h5>Returns:</h5>
|
|
1245
|
+
|
|
1246
|
+
|
|
1247
|
+
<div class="param-desc">
|
|
1248
|
+
A Promise to the device id
|
|
1249
|
+
</div>
|
|
1250
|
+
|
|
1251
|
+
|
|
1252
|
+
|
|
1253
|
+
<dl>
|
|
1254
|
+
<dt>
|
|
1255
|
+
Type
|
|
1256
|
+
</dt>
|
|
1257
|
+
<dd>
|
|
1258
|
+
|
|
1259
|
+
<span class="param-type">Promise.<string></span>
|
|
1260
|
+
|
|
1261
|
+
|
|
1262
|
+
</dd>
|
|
1263
|
+
</dl>
|
|
1264
|
+
|
|
1265
|
+
|
|
1148
1266
|
|
|
1149
1267
|
|
|
1150
1268
|
|
|
@@ -1216,7 +1334,7 @@ const distinctId = await mixpanel.getDistinctId();
|
|
|
1216
1334
|
|
|
1217
1335
|
<dt class="tag-source">Source:</dt>
|
|
1218
1336
|
<dd class="tag-source"><ul class="dummy"><li>
|
|
1219
|
-
<a href="index.js.html">index.js</a>, <a href="index.js.html#
|
|
1337
|
+
<a href="index.js.html">index.js</a>, <a href="index.js.html#line466">line 466</a>
|
|
1220
1338
|
</li></ul></dd>
|
|
1221
1339
|
|
|
1222
1340
|
|
|
@@ -1399,7 +1517,7 @@ Group Analytics properties.
|
|
|
1399
1517
|
|
|
1400
1518
|
<dt class="tag-source">Source:</dt>
|
|
1401
1519
|
<dd class="tag-source"><ul class="dummy"><li>
|
|
1402
|
-
<a href="index.js.html">index.js</a>, <a href="index.js.html#
|
|
1520
|
+
<a href="index.js.html">index.js</a>, <a href="index.js.html#line294">line 294</a>
|
|
1403
1521
|
</li></ul></dd>
|
|
1404
1522
|
|
|
1405
1523
|
|
|
@@ -1499,7 +1617,7 @@ People Analytics properties.
|
|
|
1499
1617
|
|
|
1500
1618
|
<dt class="tag-source">Source:</dt>
|
|
1501
1619
|
<dd class="tag-source"><ul class="dummy"><li>
|
|
1502
|
-
<a href="index.js.html">index.js</a>, <a href="index.js.html#
|
|
1620
|
+
<a href="index.js.html">index.js</a>, <a href="index.js.html#line244">line 244</a>
|
|
1503
1621
|
</li></ul></dd>
|
|
1504
1622
|
|
|
1505
1623
|
|
|
@@ -1613,7 +1731,7 @@ and persist beyond the lifetime of your application.
|
|
|
1613
1731
|
|
|
1614
1732
|
<dt class="tag-source">Source:</dt>
|
|
1615
1733
|
<dd class="tag-source"><ul class="dummy"><li>
|
|
1616
|
-
<a href="index.js.html">index.js</a>, <a href="index.js.html#
|
|
1734
|
+
<a href="index.js.html">index.js</a>, <a href="index.js.html#line400">line 400</a>
|
|
1617
1735
|
</li></ul></dd>
|
|
1618
1736
|
|
|
1619
1737
|
|
|
@@ -1723,7 +1841,7 @@ and persist beyond the lifetime of your application.
|
|
|
1723
1841
|
|
|
1724
1842
|
<dt class="tag-source">Source:</dt>
|
|
1725
1843
|
<dd class="tag-source"><ul class="dummy"><li>
|
|
1726
|
-
<a href="index.js.html">index.js</a>, <a href="index.js.html#
|
|
1844
|
+
<a href="index.js.html">index.js</a>, <a href="index.js.html#line142">line 142</a>
|
|
1727
1845
|
</li></ul></dd>
|
|
1728
1846
|
|
|
1729
1847
|
|
|
@@ -1894,7 +2012,7 @@ your application.
|
|
|
1894
2012
|
|
|
1895
2013
|
<dt class="tag-source">Source:</dt>
|
|
1896
2014
|
<dd class="tag-source"><ul class="dummy"><li>
|
|
1897
|
-
<a href="index.js.html">index.js</a>, <a href="index.js.html#
|
|
2015
|
+
<a href="index.js.html">index.js</a>, <a href="index.js.html#line185">line 185</a>
|
|
1898
2016
|
</li></ul></dd>
|
|
1899
2017
|
|
|
1900
2018
|
|
|
@@ -2144,7 +2262,7 @@ This method will internally track an opt-in event to your project.
|
|
|
2144
2262
|
|
|
2145
2263
|
<dt class="tag-source">Source:</dt>
|
|
2146
2264
|
<dd class="tag-source"><ul class="dummy"><li>
|
|
2147
|
-
<a href="index.js.html">index.js</a>, <a href="index.js.html#
|
|
2265
|
+
<a href="index.js.html">index.js</a>, <a href="index.js.html#line152">line 152</a>
|
|
2148
2266
|
</li></ul></dd>
|
|
2149
2267
|
|
|
2150
2268
|
|
|
@@ -2236,7 +2354,7 @@ This method will also remove any user-related information from the device.
|
|
|
2236
2354
|
|
|
2237
2355
|
<dt class="tag-source">Source:</dt>
|
|
2238
2356
|
<dd class="tag-source"><ul class="dummy"><li>
|
|
2239
|
-
<a href="index.js.html">index.js</a>, <a href="index.js.html#
|
|
2357
|
+
<a href="index.js.html">index.js</a>, <a href="index.js.html#line163">line 163</a>
|
|
2240
2358
|
</li></ul></dd>
|
|
2241
2359
|
|
|
2242
2360
|
|
|
@@ -2383,7 +2501,7 @@ to remove a superProperty, call unregisterSuperProperty() or clearSuperPropertie
|
|
|
2383
2501
|
|
|
2384
2502
|
<dt class="tag-source">Source:</dt>
|
|
2385
2503
|
<dd class="tag-source"><ul class="dummy"><li>
|
|
2386
|
-
<a href="index.js.html">index.js</a>, <a href="index.js.html#
|
|
2504
|
+
<a href="index.js.html">index.js</a>, <a href="index.js.html#line354">line 354</a>
|
|
2387
2505
|
</li></ul></dd>
|
|
2388
2506
|
|
|
2389
2507
|
|
|
@@ -2523,7 +2641,7 @@ same names has already been registered.
|
|
|
2523
2641
|
|
|
2524
2642
|
<dt class="tag-source">Source:</dt>
|
|
2525
2643
|
<dd class="tag-source"><ul class="dummy"><li>
|
|
2526
|
-
<a href="index.js.html">index.js</a>, <a href="index.js.html#
|
|
2644
|
+
<a href="index.js.html">index.js</a>, <a href="index.js.html#line369">line 369</a>
|
|
2527
2645
|
</li></ul></dd>
|
|
2528
2646
|
|
|
2529
2647
|
|
|
@@ -2683,7 +2801,7 @@ same names has already been registered.
|
|
|
2683
2801
|
|
|
2684
2802
|
<dt class="tag-source">Source:</dt>
|
|
2685
2803
|
<dd class="tag-source"><ul class="dummy"><li>
|
|
2686
|
-
<a href="index.js.html">index.js</a>, <a href="index.js.html#
|
|
2804
|
+
<a href="index.js.html">index.js</a>, <a href="index.js.html#line317">line 317</a>
|
|
2687
2805
|
</li></ul></dd>
|
|
2688
2806
|
|
|
2689
2807
|
|
|
@@ -2772,7 +2890,145 @@ same names has already been registered.
|
|
|
2772
2890
|
|
|
2773
2891
|
<dt class="tag-source">Source:</dt>
|
|
2774
2892
|
<dd class="tag-source"><ul class="dummy"><li>
|
|
2775
|
-
<a href="index.js.html">index.js</a>, <a href="index.js.html#
|
|
2893
|
+
<a href="index.js.html">index.js</a>, <a href="index.js.html#line448">line 448</a>
|
|
2894
|
+
</li></ul></dd>
|
|
2895
|
+
|
|
2896
|
+
|
|
2897
|
+
|
|
2898
|
+
|
|
2899
|
+
|
|
2900
|
+
|
|
2901
|
+
|
|
2902
|
+
</dl>
|
|
2903
|
+
|
|
2904
|
+
|
|
2905
|
+
|
|
2906
|
+
|
|
2907
|
+
|
|
2908
|
+
|
|
2909
|
+
|
|
2910
|
+
|
|
2911
|
+
|
|
2912
|
+
|
|
2913
|
+
|
|
2914
|
+
|
|
2915
|
+
|
|
2916
|
+
|
|
2917
|
+
|
|
2918
|
+
|
|
2919
|
+
|
|
2920
|
+
|
|
2921
|
+
|
|
2922
|
+
|
|
2923
|
+
|
|
2924
|
+
|
|
2925
|
+
|
|
2926
|
+
|
|
2927
|
+
|
|
2928
|
+
|
|
2929
|
+
<h4 class="name" id="setFlushOnBackground"><span class="type-signature"></span>setFlushOnBackground<span class="signature">(flushOnBackground)</span><span class="type-signature"></span></h4>
|
|
2930
|
+
|
|
2931
|
+
|
|
2932
|
+
|
|
2933
|
+
|
|
2934
|
+
|
|
2935
|
+
|
|
2936
|
+
<div class="description">
|
|
2937
|
+
This allows enabling or disabling whether or not Mixpanel flushes events
|
|
2938
|
+
when the app enters the background on iOS. This is set to true by default.
|
|
2939
|
+
</div>
|
|
2940
|
+
|
|
2941
|
+
|
|
2942
|
+
|
|
2943
|
+
|
|
2944
|
+
|
|
2945
|
+
|
|
2946
|
+
|
|
2947
|
+
|
|
2948
|
+
|
|
2949
|
+
<h5>Parameters:</h5>
|
|
2950
|
+
|
|
2951
|
+
|
|
2952
|
+
<table class="params">
|
|
2953
|
+
<thead>
|
|
2954
|
+
<tr>
|
|
2955
|
+
|
|
2956
|
+
<th>Name</th>
|
|
2957
|
+
|
|
2958
|
+
|
|
2959
|
+
<th>Type</th>
|
|
2960
|
+
|
|
2961
|
+
|
|
2962
|
+
|
|
2963
|
+
|
|
2964
|
+
|
|
2965
|
+
<th class="last">Description</th>
|
|
2966
|
+
</tr>
|
|
2967
|
+
</thead>
|
|
2968
|
+
|
|
2969
|
+
<tbody>
|
|
2970
|
+
|
|
2971
|
+
|
|
2972
|
+
<tr>
|
|
2973
|
+
|
|
2974
|
+
<td class="name"><code>flushOnBackground</code></td>
|
|
2975
|
+
|
|
2976
|
+
|
|
2977
|
+
<td class="type">
|
|
2978
|
+
|
|
2979
|
+
|
|
2980
|
+
<span class="param-type">boolean</span>
|
|
2981
|
+
|
|
2982
|
+
|
|
2983
|
+
|
|
2984
|
+
</td>
|
|
2985
|
+
|
|
2986
|
+
|
|
2987
|
+
|
|
2988
|
+
|
|
2989
|
+
|
|
2990
|
+
<td class="description last">whether to enable logging</td>
|
|
2991
|
+
</tr>
|
|
2992
|
+
|
|
2993
|
+
|
|
2994
|
+
</tbody>
|
|
2995
|
+
</table>
|
|
2996
|
+
|
|
2997
|
+
|
|
2998
|
+
|
|
2999
|
+
|
|
3000
|
+
|
|
3001
|
+
|
|
3002
|
+
<dl class="details">
|
|
3003
|
+
|
|
3004
|
+
|
|
3005
|
+
|
|
3006
|
+
|
|
3007
|
+
|
|
3008
|
+
|
|
3009
|
+
|
|
3010
|
+
|
|
3011
|
+
|
|
3012
|
+
|
|
3013
|
+
|
|
3014
|
+
|
|
3015
|
+
|
|
3016
|
+
|
|
3017
|
+
|
|
3018
|
+
|
|
3019
|
+
|
|
3020
|
+
|
|
3021
|
+
|
|
3022
|
+
|
|
3023
|
+
|
|
3024
|
+
|
|
3025
|
+
|
|
3026
|
+
|
|
3027
|
+
|
|
3028
|
+
|
|
3029
|
+
<dt class="tag-source">Source:</dt>
|
|
3030
|
+
<dd class="tag-source"><ul class="dummy"><li>
|
|
3031
|
+
<a href="index.js.html">index.js</a>, <a href="index.js.html#line116">line 116</a>
|
|
2776
3032
|
</li></ul></dd>
|
|
2777
3033
|
|
|
2778
3034
|
|
|
@@ -2932,7 +3188,7 @@ same names has already been registered.
|
|
|
2932
3188
|
|
|
2933
3189
|
<dt class="tag-source">Source:</dt>
|
|
2934
3190
|
<dd class="tag-source"><ul class="dummy"><li>
|
|
2935
|
-
<a href="index.js.html">index.js</a>, <a href="index.js.html#
|
|
3191
|
+
<a href="index.js.html">index.js</a>, <a href="index.js.html#line278">line 278</a>
|
|
2936
3192
|
</li></ul></dd>
|
|
2937
3193
|
|
|
2938
3194
|
|
|
@@ -3350,7 +3606,7 @@ Defaults to true.</td>
|
|
|
3350
3606
|
|
|
3351
3607
|
<dt class="tag-source">Source:</dt>
|
|
3352
3608
|
<dd class="tag-source"><ul class="dummy"><li>
|
|
3353
|
-
<a href="index.js.html">index.js</a>, <a href="index.js.html#
|
|
3609
|
+
<a href="index.js.html">index.js</a>, <a href="index.js.html#line133">line 133</a>
|
|
3354
3610
|
</li></ul></dd>
|
|
3355
3611
|
|
|
3356
3612
|
|
|
@@ -3489,7 +3745,7 @@ property, representing the number of seconds between your calls.
|
|
|
3489
3745
|
|
|
3490
3746
|
<dt class="tag-source">Source:</dt>
|
|
3491
3747
|
<dd class="tag-source"><ul class="dummy"><li>
|
|
3492
|
-
<a href="index.js.html">index.js</a>, <a href="index.js.html#
|
|
3748
|
+
<a href="index.js.html">index.js</a>, <a href="index.js.html#line423">line 423</a>
|
|
3493
3749
|
</li></ul></dd>
|
|
3494
3750
|
|
|
3495
3751
|
|
|
@@ -3655,7 +3911,7 @@ that event.
|
|
|
3655
3911
|
|
|
3656
3912
|
<dt class="tag-source">Source:</dt>
|
|
3657
3913
|
<dd class="tag-source"><ul class="dummy"><li>
|
|
3658
|
-
<a href="index.js.html">index.js</a>, <a href="index.js.html#
|
|
3914
|
+
<a href="index.js.html">index.js</a>, <a href="index.js.html#line227">line 227</a>
|
|
3659
3915
|
</li></ul></dd>
|
|
3660
3916
|
|
|
3661
3917
|
|
|
@@ -3844,7 +4100,7 @@ that event. Group key/value pairs are upserted into the property map before trac
|
|
|
3844
4100
|
|
|
3845
4101
|
<dt class="tag-source">Source:</dt>
|
|
3846
4102
|
<dd class="tag-source"><ul class="dummy"><li>
|
|
3847
|
-
<a href="index.js.html">index.js</a>, <a href="index.js.html#
|
|
4103
|
+
<a href="index.js.html">index.js</a>, <a href="index.js.html#line262">line 262</a>
|
|
3848
4104
|
</li></ul></dd>
|
|
3849
4105
|
|
|
3850
4106
|
|
|
@@ -3985,7 +4241,7 @@ To clear all superProperties, use clearSuperProperties()
|
|
|
3985
4241
|
|
|
3986
4242
|
<dt class="tag-source">Source:</dt>
|
|
3987
4243
|
<dd class="tag-source"><ul class="dummy"><li>
|
|
3988
|
-
<a href="index.js.html">index.js</a>, <a href="index.js.html#
|
|
4244
|
+
<a href="index.js.html">index.js</a>, <a href="index.js.html#line385">line 385</a>
|
|
3989
4245
|
</li></ul></dd>
|
|
3990
4246
|
|
|
3991
4247
|
|
|
@@ -4037,7 +4293,7 @@ To clear all superProperties, use clearSuperProperties()
|
|
|
4037
4293
|
<br class="clear">
|
|
4038
4294
|
|
|
4039
4295
|
<footer>
|
|
4040
|
-
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.6</a> on Fri
|
|
4296
|
+
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.6</a> on Fri May 06 2022 10:59:40 GMT-0700 (Pacific Daylight Time)
|
|
4041
4297
|
</footer>
|
|
4042
4298
|
|
|
4043
4299
|
<script> prettyPrint(); </script>
|
package/docs/MixpanelGroup.html
CHANGED
|
@@ -95,7 +95,7 @@
|
|
|
95
95
|
|
|
96
96
|
<dt class="tag-source">Source:</dt>
|
|
97
97
|
<dd class="tag-source"><ul class="dummy"><li>
|
|
98
|
-
<a href="index.js.html">index.js</a>, <a href="index.js.html#
|
|
98
|
+
<a href="index.js.html">index.js</a>, <a href="index.js.html#line714">line 714</a>
|
|
99
99
|
</li></ul></dd>
|
|
100
100
|
|
|
101
101
|
|
|
@@ -284,7 +284,7 @@ If the property exists and is not list-valued, the remove will be ignored.
|
|
|
284
284
|
|
|
285
285
|
<dt class="tag-source">Source:</dt>
|
|
286
286
|
<dd class="tag-source"><ul class="dummy"><li>
|
|
287
|
-
<a href="index.js.html">index.js</a>, <a href="index.js.html#
|
|
287
|
+
<a href="index.js.html">index.js</a>, <a href="index.js.html#line785">line 785</a>
|
|
288
288
|
</li></ul></dd>
|
|
289
289
|
|
|
290
290
|
|
|
@@ -446,7 +446,7 @@ possibly overwriting an existing property with the same name.
|
|
|
446
446
|
|
|
447
447
|
<dt class="tag-source">Source:</dt>
|
|
448
448
|
<dd class="tag-source"><ul class="dummy"><li>
|
|
449
|
-
<a href="index.js.html">index.js</a>, <a href="index.js.html#
|
|
449
|
+
<a href="index.js.html">index.js</a>, <a href="index.js.html#line733">line 733</a>
|
|
450
450
|
</li></ul></dd>
|
|
451
451
|
|
|
452
452
|
|
|
@@ -606,7 +606,7 @@ possibly overwriting an existing property with the same name.
|
|
|
606
606
|
|
|
607
607
|
<dt class="tag-source">Source:</dt>
|
|
608
608
|
<dd class="tag-source"><ul class="dummy"><li>
|
|
609
|
-
<a href="index.js.html">index.js</a>, <a href="index.js.html#
|
|
609
|
+
<a href="index.js.html">index.js</a>, <a href="index.js.html#line752">line 752</a>
|
|
610
610
|
</li></ul></dd>
|
|
611
611
|
|
|
612
612
|
|
|
@@ -768,7 +768,7 @@ If the property exists and is not list-valued, the union will be ignored.
|
|
|
768
768
|
|
|
769
769
|
<dt class="tag-source">Source:</dt>
|
|
770
770
|
<dd class="tag-source"><ul class="dummy"><li>
|
|
771
|
-
<a href="index.js.html">index.js</a>, <a href="index.js.html#
|
|
771
|
+
<a href="index.js.html">index.js</a>, <a href="index.js.html#line801">line 801</a>
|
|
772
772
|
</li></ul></dd>
|
|
773
773
|
|
|
774
774
|
|
|
@@ -905,7 +905,7 @@ If the property exists and is not list-valued, the union will be ignored.
|
|
|
905
905
|
|
|
906
906
|
<dt class="tag-source">Source:</dt>
|
|
907
907
|
<dd class="tag-source"><ul class="dummy"><li>
|
|
908
|
-
<a href="index.js.html">index.js</a>, <a href="index.js.html#
|
|
908
|
+
<a href="index.js.html">index.js</a>, <a href="index.js.html#line770">line 770</a>
|
|
909
909
|
</li></ul></dd>
|
|
910
910
|
|
|
911
911
|
|
|
@@ -957,7 +957,7 @@ If the property exists and is not list-valued, the union will be ignored.
|
|
|
957
957
|
<br class="clear">
|
|
958
958
|
|
|
959
959
|
<footer>
|
|
960
|
-
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.6</a> on Fri
|
|
960
|
+
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.6</a> on Fri May 06 2022 10:59:40 GMT-0700 (Pacific Daylight Time)
|
|
961
961
|
</footer>
|
|
962
962
|
|
|
963
963
|
<script> prettyPrint(); </script>
|
package/docs/People.html
CHANGED
|
@@ -100,7 +100,7 @@ call to identify using a different id.</div>
|
|
|
100
100
|
|
|
101
101
|
<dt class="tag-source">Source:</dt>
|
|
102
102
|
<dd class="tag-source"><ul class="dummy"><li>
|
|
103
|
-
<a href="index.js.html">index.js</a>, <a href="index.js.html#
|
|
103
|
+
<a href="index.js.html">index.js</a>, <a href="index.js.html#line513">line 513</a>
|
|
104
104
|
</li></ul></dd>
|
|
105
105
|
|
|
106
106
|
|
|
@@ -289,7 +289,7 @@ currently have a list value, the append will be ignored.
|
|
|
289
289
|
|
|
290
290
|
<dt class="tag-source">Source:</dt>
|
|
291
291
|
<dd class="tag-source"><ul class="dummy"><li>
|
|
292
|
-
<a href="index.js.html">index.js</a>, <a href="index.js.html#
|
|
292
|
+
<a href="index.js.html">index.js</a>, <a href="index.js.html#line604">line 604</a>
|
|
293
293
|
</li></ul></dd>
|
|
294
294
|
|
|
295
295
|
|
|
@@ -377,7 +377,7 @@ currently have a list value, the append will be ignored.
|
|
|
377
377
|
|
|
378
378
|
<dt class="tag-source">Source:</dt>
|
|
379
379
|
<dd class="tag-source"><ul class="dummy"><li>
|
|
380
|
-
<a href="index.js.html">index.js</a>, <a href="index.js.html#
|
|
380
|
+
<a href="index.js.html">index.js</a>, <a href="index.js.html#line694">line 694</a>
|
|
381
381
|
</li></ul></dd>
|
|
382
382
|
|
|
383
383
|
|
|
@@ -468,7 +468,7 @@ to People Analytics using the same distinct id will create and store new values.
|
|
|
468
468
|
|
|
469
469
|
<dt class="tag-source">Source:</dt>
|
|
470
470
|
<dd class="tag-source"><ul class="dummy"><li>
|
|
471
|
-
<a href="index.js.html">index.js</a>, <a href="index.js.html#
|
|
471
|
+
<a href="index.js.html">index.js</a>, <a href="index.js.html#line704">line 704</a>
|
|
472
472
|
</li></ul></dd>
|
|
473
473
|
|
|
474
474
|
|
|
@@ -630,7 +630,7 @@ provide a negative number for the value.
|
|
|
630
630
|
|
|
631
631
|
<dt class="tag-source">Source:</dt>
|
|
632
632
|
<dd class="tag-source"><ul class="dummy"><li>
|
|
633
|
-
<a href="index.js.html">index.js</a>, <a href="index.js.html#
|
|
633
|
+
<a href="index.js.html">index.js</a>, <a href="index.js.html#line572">line 572</a>
|
|
634
634
|
</li></ul></dd>
|
|
635
635
|
|
|
636
636
|
|
|
@@ -792,7 +792,7 @@ If the property exists and is not list-valued, the remove will be ignored.
|
|
|
792
792
|
|
|
793
793
|
<dt class="tag-source">Source:</dt>
|
|
794
794
|
<dd class="tag-source"><ul class="dummy"><li>
|
|
795
|
-
<a href="index.js.html">index.js</a>, <a href="index.js.html#
|
|
795
|
+
<a href="index.js.html">index.js</a>, <a href="index.js.html#line648">line 648</a>
|
|
796
796
|
</li></ul></dd>
|
|
797
797
|
|
|
798
798
|
|
|
@@ -954,7 +954,7 @@ possibly overwriting an existing property with the same name.
|
|
|
954
954
|
|
|
955
955
|
<dt class="tag-source">Source:</dt>
|
|
956
956
|
<dd class="tag-source"><ul class="dummy"><li>
|
|
957
|
-
<a href="index.js.html">index.js</a>, <a href="index.js.html#
|
|
957
|
+
<a href="index.js.html">index.js</a>, <a href="index.js.html#line530">line 530</a>
|
|
958
958
|
</li></ul></dd>
|
|
959
959
|
|
|
960
960
|
|
|
@@ -1114,7 +1114,7 @@ possibly overwriting an existing property with the same name.
|
|
|
1114
1114
|
|
|
1115
1115
|
<dt class="tag-source">Source:</dt>
|
|
1116
1116
|
<dd class="tag-source"><ul class="dummy"><li>
|
|
1117
|
-
<a href="index.js.html">index.js</a>, <a href="index.js.html#
|
|
1117
|
+
<a href="index.js.html">index.js</a>, <a href="index.js.html#line549">line 549</a>
|
|
1118
1118
|
</li></ul></dd>
|
|
1119
1119
|
|
|
1120
1120
|
|
|
@@ -1274,7 +1274,7 @@ possibly overwriting an existing property with the same name.
|
|
|
1274
1274
|
|
|
1275
1275
|
<dt class="tag-source">Source:</dt>
|
|
1276
1276
|
<dd class="tag-source"><ul class="dummy"><li>
|
|
1277
|
-
<a href="index.js.html">index.js</a>, <a href="index.js.html#
|
|
1277
|
+
<a href="index.js.html">index.js</a>, <a href="index.js.html#line680">line 680</a>
|
|
1278
1278
|
</li></ul></dd>
|
|
1279
1279
|
|
|
1280
1280
|
|
|
@@ -1436,7 +1436,7 @@ If the property exists and is not list-valued, the union will be ignored.
|
|
|
1436
1436
|
|
|
1437
1437
|
<dt class="tag-source">Source:</dt>
|
|
1438
1438
|
<dd class="tag-source"><ul class="dummy"><li>
|
|
1439
|
-
<a href="index.js.html">index.js</a>, <a href="index.js.html#
|
|
1439
|
+
<a href="index.js.html">index.js</a>, <a href="index.js.html#line627">line 627</a>
|
|
1440
1440
|
</li></ul></dd>
|
|
1441
1441
|
|
|
1442
1442
|
|
|
@@ -1573,7 +1573,7 @@ If the property exists and is not list-valued, the union will be ignored.
|
|
|
1573
1573
|
|
|
1574
1574
|
<dt class="tag-source">Source:</dt>
|
|
1575
1575
|
<dd class="tag-source"><ul class="dummy"><li>
|
|
1576
|
-
<a href="index.js.html">index.js</a>, <a href="index.js.html#
|
|
1576
|
+
<a href="index.js.html">index.js</a>, <a href="index.js.html#line667">line 667</a>
|
|
1577
1577
|
</li></ul></dd>
|
|
1578
1578
|
|
|
1579
1579
|
|
|
@@ -1625,7 +1625,7 @@ If the property exists and is not list-valued, the union will be ignored.
|
|
|
1625
1625
|
<br class="clear">
|
|
1626
1626
|
|
|
1627
1627
|
<footer>
|
|
1628
|
-
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.6</a> on Fri
|
|
1628
|
+
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.6</a> on Fri May 06 2022 10:59:40 GMT-0700 (Pacific Daylight Time)
|
|
1629
1629
|
</footer>
|
|
1630
1630
|
|
|
1631
1631
|
<script> prettyPrint(); </script>
|
package/docs/index.html
CHANGED
|
@@ -175,7 +175,7 @@ Please refer to our <a href="https://mixpanel.com/legal/app-store-privacy-detai
|
|
|
175
175
|
<br class="clear">
|
|
176
176
|
|
|
177
177
|
<footer>
|
|
178
|
-
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.6</a> on Fri
|
|
178
|
+
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.6</a> on Fri May 06 2022 10:59:40 GMT-0700 (Pacific Daylight Time)
|
|
179
179
|
</footer>
|
|
180
180
|
|
|
181
181
|
<script> prettyPrint(); </script>
|
package/docs/index.js.html
CHANGED
|
@@ -134,6 +134,21 @@ export class Mixpanel {
|
|
|
134
134
|
MixpanelReactNative.setLoggingEnabled(this.token, loggingEnabled);
|
|
135
135
|
}
|
|
136
136
|
|
|
137
|
+
/**
|
|
138
|
+
* This allows enabling or disabling whether or not Mixpanel flushes events
|
|
139
|
+
* when the app enters the background on iOS. This is set to true by default.
|
|
140
|
+
*
|
|
141
|
+
* @param {boolean} flushOnBackground whether to enable logging
|
|
142
|
+
*
|
|
143
|
+
*/
|
|
144
|
+
setFlushOnBackground(flushOnBackground) {
|
|
145
|
+
if (Platform.OS === 'ios') {
|
|
146
|
+
MixpanelReactNative.setFlushOnBackground(this.token, flushOnBackground);
|
|
147
|
+
} else {
|
|
148
|
+
console.warn('Mixpanel setFlushOnBackground was called and ignored because this method only works on iOS.')
|
|
149
|
+
}
|
|
150
|
+
}
|
|
151
|
+
|
|
137
152
|
/**
|
|
138
153
|
* This controls whether to automatically send the client IP Address as part of event tracking.
|
|
139
154
|
* With an IP address, geo-location is possible down to neighborhoods within a city,
|
|
@@ -480,6 +495,24 @@ export class Mixpanel {
|
|
|
480
495
|
return MixpanelReactNative.getDistinctId(this.token);
|
|
481
496
|
}
|
|
482
497
|
|
|
498
|
+
/**
|
|
499
|
+
* Returns the current device id of the device.
|
|
500
|
+
* This id automatically generated by the library and regenerated when logout or reset is called.
|
|
501
|
+
*
|
|
502
|
+
* example of usage:
|
|
503
|
+
* <pre>
|
|
504
|
+
* <code>
|
|
505
|
+
* const deviceId = await mixpanel.getDeviceId();
|
|
506
|
+
* </code>
|
|
507
|
+
* </pre>
|
|
508
|
+
*
|
|
509
|
+
* @return {Promise<string>} A Promise to the device id
|
|
510
|
+
*
|
|
511
|
+
*/
|
|
512
|
+
getDeviceId() {
|
|
513
|
+
return MixpanelReactNative.getDeviceId(this.token);
|
|
514
|
+
}
|
|
515
|
+
|
|
483
516
|
/**
|
|
484
517
|
* Push all queued Mixpanel events and People Analytics changes to Mixpanel servers.
|
|
485
518
|
*
|
|
@@ -889,7 +922,7 @@ class ObjectHelper {
|
|
|
889
922
|
<br class="clear">
|
|
890
923
|
|
|
891
924
|
<footer>
|
|
892
|
-
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.6</a> on Fri
|
|
925
|
+
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.6</a> on Fri May 06 2022 10:59:40 GMT-0700 (Pacific Daylight Time)
|
|
893
926
|
</footer>
|
|
894
927
|
|
|
895
928
|
<script> prettyPrint(); </script>
|
package/index.d.ts
CHANGED
|
@@ -7,6 +7,8 @@ export class Mixpanel {
|
|
|
7
7
|
init(optOutTrackingDefault?: boolean, superProperties?: MixpanelProperties): Promise<void>;
|
|
8
8
|
setServerURL(serverURL: string): void;
|
|
9
9
|
setLoggingEnabled(loggingEnabled: boolean): void;
|
|
10
|
+
setFlushOnBackground(flushOnBackground: boolean): void;
|
|
11
|
+
|
|
10
12
|
setUseIpAddressForGeolocation(useIpAddressForGeolocation: boolean): void;
|
|
11
13
|
hasOptedOutTracking(): Promise<boolean>;
|
|
12
14
|
optInTracking(): void;
|
|
@@ -30,6 +32,7 @@ export class Mixpanel {
|
|
|
30
32
|
eventElapsedTime(eventName: string): Promise<number>;
|
|
31
33
|
reset(): void;
|
|
32
34
|
getDistinctId(): Promise<string>;
|
|
35
|
+
getDeviceId(): Promise<string>;
|
|
33
36
|
flush(): void;
|
|
34
37
|
}
|
|
35
38
|
|
package/index.js
CHANGED
|
@@ -106,6 +106,21 @@ export class Mixpanel {
|
|
|
106
106
|
MixpanelReactNative.setLoggingEnabled(this.token, loggingEnabled);
|
|
107
107
|
}
|
|
108
108
|
|
|
109
|
+
/**
|
|
110
|
+
* This allows enabling or disabling whether or not Mixpanel flushes events
|
|
111
|
+
* when the app enters the background on iOS. This is set to true by default.
|
|
112
|
+
*
|
|
113
|
+
* @param {boolean} flushOnBackground whether to enable logging
|
|
114
|
+
*
|
|
115
|
+
*/
|
|
116
|
+
setFlushOnBackground(flushOnBackground) {
|
|
117
|
+
if (Platform.OS === 'ios') {
|
|
118
|
+
MixpanelReactNative.setFlushOnBackground(this.token, flushOnBackground);
|
|
119
|
+
} else {
|
|
120
|
+
console.warn('Mixpanel setFlushOnBackground was called and ignored because this method only works on iOS.')
|
|
121
|
+
}
|
|
122
|
+
}
|
|
123
|
+
|
|
109
124
|
/**
|
|
110
125
|
* This controls whether to automatically send the client IP Address as part of event tracking.
|
|
111
126
|
* With an IP address, geo-location is possible down to neighborhoods within a city,
|
|
@@ -452,6 +467,24 @@ export class Mixpanel {
|
|
|
452
467
|
return MixpanelReactNative.getDistinctId(this.token);
|
|
453
468
|
}
|
|
454
469
|
|
|
470
|
+
/**
|
|
471
|
+
* Returns the current device id of the device.
|
|
472
|
+
* This id automatically generated by the library and regenerated when logout or reset is called.
|
|
473
|
+
*
|
|
474
|
+
* example of usage:
|
|
475
|
+
* <pre>
|
|
476
|
+
* <code>
|
|
477
|
+
* const deviceId = await mixpanel.getDeviceId();
|
|
478
|
+
* </code>
|
|
479
|
+
* </pre>
|
|
480
|
+
*
|
|
481
|
+
* @return {Promise<string>} A Promise to the device id
|
|
482
|
+
*
|
|
483
|
+
*/
|
|
484
|
+
getDeviceId() {
|
|
485
|
+
return MixpanelReactNative.getDeviceId(this.token);
|
|
486
|
+
}
|
|
487
|
+
|
|
455
488
|
/**
|
|
456
489
|
* Push all queued Mixpanel events and People Analytics changes to Mixpanel servers.
|
|
457
490
|
*
|
|
@@ -12,6 +12,8 @@ RCT_EXTERN_METHOD(setServerURL:(NSString *)token serverURL:(NSString *)serverURL
|
|
|
12
12
|
|
|
13
13
|
RCT_EXTERN_METHOD(setLoggingEnabled:(NSString *)token loggingEnabled:(BOOL)loggingEnabled resolver:(RCTPromiseResolveBlock)resolve rejecter:(RCTPromiseRejectBlock)reject)
|
|
14
14
|
|
|
15
|
+
RCT_EXTERN_METHOD(setFlushOnBackground:(NSString *)token flushOnBackground:(BOOL)flushOnBackground resolver:(RCTPromiseResolveBlock)resolve rejecter:(RCTPromiseRejectBlock)reject)
|
|
16
|
+
|
|
15
17
|
RCT_EXTERN_METHOD(setUseIpAddressForGeolocation:(NSString *)token useIpAddressForGeolocation:(BOOL)useIpAddressForGeolocation resolver:(RCTPromiseResolveBlock)resolve rejecter:(RCTPromiseRejectBlock)reject)
|
|
16
18
|
|
|
17
19
|
// MARK: - Opting Users Out of Tracking
|
|
@@ -44,6 +46,8 @@ RCT_EXTERN_METHOD(reset:(NSString *)token resolver:(RCTPromiseResolveBlock)resol
|
|
|
44
46
|
|
|
45
47
|
RCT_EXTERN_METHOD(getDistinctId:(NSString *)token resolver:(RCTPromiseResolveBlock)resolve rejecter:(RCTPromiseRejectBlock)reject)
|
|
46
48
|
|
|
49
|
+
RCT_EXTERN_METHOD(getDeviceId:(NSString *)token resolver:(RCTPromiseResolveBlock)resolve rejecter:(RCTPromiseRejectBlock)reject)
|
|
50
|
+
|
|
47
51
|
// MARK: - Super Properties
|
|
48
52
|
|
|
49
53
|
RCT_EXTERN_METHOD(registerSuperProperties:(NSString *)token properties:(NSDictionary *)properties resolver:(RCTPromiseResolveBlock)resolve rejecter:(RCTPromiseRejectBlock)reject)
|
|
@@ -44,6 +44,16 @@ open class MixpanelReactNative: NSObject {
|
|
|
44
44
|
resolve(nil)
|
|
45
45
|
}
|
|
46
46
|
|
|
47
|
+
@objc
|
|
48
|
+
func setFlushOnBackground(_ token: String,
|
|
49
|
+
flushOnBackground: Bool,
|
|
50
|
+
resolver resolve: RCTPromiseResolveBlock,
|
|
51
|
+
rejecter reject: RCTPromiseRejectBlock) -> Void {
|
|
52
|
+
let instance = MixpanelReactNative.getMixpanelInstance(token)
|
|
53
|
+
instance?.flushOnBackground = flushOnBackground
|
|
54
|
+
resolve(nil)
|
|
55
|
+
}
|
|
56
|
+
|
|
47
57
|
@objc
|
|
48
58
|
func setUseIpAddressForGeolocation(_ token: String,
|
|
49
59
|
useIpAddressForGeolocation: Bool,
|
|
@@ -155,6 +165,13 @@ open class MixpanelReactNative: NSObject {
|
|
|
155
165
|
let instance = MixpanelReactNative.getMixpanelInstance(token)
|
|
156
166
|
resolve(instance?.distinctId)
|
|
157
167
|
}
|
|
168
|
+
|
|
169
|
+
@objc
|
|
170
|
+
func getDeviceId(_ token: String, resolver resolve: RCTPromiseResolveBlock,
|
|
171
|
+
rejecter reject: RCTPromiseRejectBlock) -> Void {
|
|
172
|
+
let instance = MixpanelReactNative.getMixpanelInstance(token)
|
|
173
|
+
resolve(instance?.anonymousId)
|
|
174
|
+
}
|
|
158
175
|
|
|
159
176
|
// MARK: - Super Properties
|
|
160
177
|
|