mixpanel-react-native 1.3.6 → 1.3.9
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 +21 -0
- package/LICENSE +1 -1
- package/MixpanelReactNative.podspec +1 -1
- package/Samples/ContextAPIMixpanel/yarn.lock +1 -1
- package/Samples/MixpanelDemo/yarn.lock +1 -1
- package/Samples/SimpleMixpanel/yarn.lock +1 -1
- package/__tests__/index.test.js +7 -1
- package/docs/Mixpanel.html +58 -35
- package/docs/MixpanelGroup.html +7 -7
- package/docs/People.html +12 -12
- package/docs/index.html +1 -1
- package/docs/index.js.html +24 -23
- package/index.d.ts +4 -1
- package/index.js +23 -22
- package/package.json +1 -1
- package/release.py +6 -6
- package/Samples/ContextAPIMixpanel/android/.project +0 -28
- package/Samples/MixpanelDemo/android/.project +0 -28
- package/Samples/SimpleMixpanel/android/.project +0 -28
package/CHANGELOG.md
CHANGED
|
@@ -1,6 +1,23 @@
|
|
|
1
1
|
#
|
|
2
2
|
|
|
3
|
+
## [v1.3.8](https://github.com/mixpanel/mixpanel-react-native/tree/v1.3.8) (2022-02-25)
|
|
4
|
+
|
|
5
|
+
### Enhancements
|
|
6
|
+
|
|
7
|
+
- add init super props & declare multi-prop interfaces [\#127](https://github.com/mixpanel/mixpanel-react-native/pull/127)
|
|
8
|
+
|
|
9
|
+
#
|
|
10
|
+
|
|
11
|
+
## [v1.3.7](https://github.com/mixpanel/mixpanel-react-native/tree/v1.3.7) (2022-01-26)
|
|
12
|
+
|
|
13
|
+
### Fixes
|
|
14
|
+
|
|
15
|
+
- Bump iOS SDK to v3.1.2 [\#125](https://github.com/mixpanel/mixpanel-react-native/pull/125)
|
|
16
|
+
|
|
17
|
+
#
|
|
18
|
+
|
|
3
19
|
## [v1.3.6](https://github.com/mixpanel/mixpanel-react-native/tree/v1.3.6) (2022-01-13)
|
|
20
|
+
### 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.
|
|
4
21
|
|
|
5
22
|
### Fixes
|
|
6
23
|
|
|
@@ -149,4 +166,8 @@
|
|
|
149
166
|
|
|
150
167
|
|
|
151
168
|
|
|
169
|
+
|
|
170
|
+
|
|
171
|
+
|
|
172
|
+
|
|
152
173
|
|
package/LICENSE
CHANGED
package/__tests__/index.test.js
CHANGED
|
@@ -9,7 +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.3.
|
|
12
|
+
expect(NativeModules.MixpanelReactNative.initialize).toBeCalledWith("token", false, {"$lib_version": "1.3.9", "mp_lib": "react-native"});
|
|
13
|
+
});
|
|
14
|
+
|
|
15
|
+
test(`it calls MixpanelReactNative initialize with optOut and superProperties`, async () => {
|
|
16
|
+
const mixpanel = new Mixpanel("token");
|
|
17
|
+
mixpanel.init(true, {"super": "property"})
|
|
18
|
+
expect(NativeModules.MixpanelReactNative.initialize).toBeCalledWith("token", true, {"$lib_version": "1.3.9", "mp_lib": "react-native", "super": "property"});
|
|
13
19
|
});
|
|
14
20
|
|
|
15
21
|
test(`it calls MixpanelReactNative setServerURL`, async () => {
|
package/docs/Mixpanel.html
CHANGED
|
@@ -285,7 +285,7 @@ Initializes Mixpanel and return an instance of Mixpanel the given project token.
|
|
|
285
285
|
|
|
286
286
|
<dt class="tag-source">Source:</dt>
|
|
287
287
|
<dd class="tag-source"><ul class="dummy"><li>
|
|
288
|
-
<a href="index.js.html">index.js</a>, <a href="index.js.html#
|
|
288
|
+
<a href="index.js.html">index.js</a>, <a href="index.js.html#line79">line 79</a>
|
|
289
289
|
</li></ul></dd>
|
|
290
290
|
|
|
291
291
|
|
|
@@ -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#line289">line 289</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#line190">line 190</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#line397">line 397</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#line317">line 317</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#line422">line 422</a>
|
|
1008
1008
|
</li></ul></dd>
|
|
1009
1009
|
|
|
1010
1010
|
|
|
@@ -1120,7 +1120,7 @@ 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#line464">line 464</a>
|
|
1124
1124
|
</li></ul></dd>
|
|
1125
1125
|
|
|
1126
1126
|
|
|
@@ -1164,13 +1164,13 @@ send all remaining messages to the server.
|
|
|
1164
1164
|
|
|
1165
1165
|
|
|
1166
1166
|
<div class="description">
|
|
1167
|
-
Returns the current distinct id of the user.
|
|
1167
|
+
Returns the current distinct id of the user.
|
|
1168
1168
|
This is either the id automatically generated by the library or the id that has been passed by a call to identify().
|
|
1169
1169
|
|
|
1170
|
-
example of usage:
|
|
1170
|
+
example of usage:
|
|
1171
1171
|
<pre>
|
|
1172
1172
|
<code>
|
|
1173
|
-
const distinctId = await mixpanel.getDistinctId();
|
|
1173
|
+
const distinctId = await mixpanel.getDistinctId();
|
|
1174
1174
|
</code>
|
|
1175
1175
|
</pre>
|
|
1176
1176
|
</div>
|
|
@@ -1216,7 +1216,7 @@ const distinctId = await mixpanel.getDistinctId();
|
|
|
1216
1216
|
|
|
1217
1217
|
<dt class="tag-source">Source:</dt>
|
|
1218
1218
|
<dd class="tag-source"><ul class="dummy"><li>
|
|
1219
|
-
<a href="index.js.html">index.js</a>, <a href="index.js.html#
|
|
1219
|
+
<a href="index.js.html">index.js</a>, <a href="index.js.html#line451">line 451</a>
|
|
1220
1220
|
</li></ul></dd>
|
|
1221
1221
|
|
|
1222
1222
|
|
|
@@ -1399,7 +1399,7 @@ Group Analytics properties.
|
|
|
1399
1399
|
|
|
1400
1400
|
<dt class="tag-source">Source:</dt>
|
|
1401
1401
|
<dd class="tag-source"><ul class="dummy"><li>
|
|
1402
|
-
<a href="index.js.html">index.js</a>, <a href="index.js.html#
|
|
1402
|
+
<a href="index.js.html">index.js</a>, <a href="index.js.html#line279">line 279</a>
|
|
1403
1403
|
</li></ul></dd>
|
|
1404
1404
|
|
|
1405
1405
|
|
|
@@ -1499,7 +1499,7 @@ People Analytics properties.
|
|
|
1499
1499
|
|
|
1500
1500
|
<dt class="tag-source">Source:</dt>
|
|
1501
1501
|
<dd class="tag-source"><ul class="dummy"><li>
|
|
1502
|
-
<a href="index.js.html">index.js</a>, <a href="index.js.html#
|
|
1502
|
+
<a href="index.js.html">index.js</a>, <a href="index.js.html#line229">line 229</a>
|
|
1503
1503
|
</li></ul></dd>
|
|
1504
1504
|
|
|
1505
1505
|
|
|
@@ -1613,7 +1613,7 @@ and persist beyond the lifetime of your application.
|
|
|
1613
1613
|
|
|
1614
1614
|
<dt class="tag-source">Source:</dt>
|
|
1615
1615
|
<dd class="tag-source"><ul class="dummy"><li>
|
|
1616
|
-
<a href="index.js.html">index.js</a>, <a href="index.js.html#
|
|
1616
|
+
<a href="index.js.html">index.js</a>, <a href="index.js.html#line385">line 385</a>
|
|
1617
1617
|
</li></ul></dd>
|
|
1618
1618
|
|
|
1619
1619
|
|
|
@@ -1723,7 +1723,7 @@ and persist beyond the lifetime of your application.
|
|
|
1723
1723
|
|
|
1724
1724
|
<dt class="tag-source">Source:</dt>
|
|
1725
1725
|
<dd class="tag-source"><ul class="dummy"><li>
|
|
1726
|
-
<a href="index.js.html">index.js</a>, <a href="index.js.html#
|
|
1726
|
+
<a href="index.js.html">index.js</a>, <a href="index.js.html#line127">line 127</a>
|
|
1727
1727
|
</li></ul></dd>
|
|
1728
1728
|
|
|
1729
1729
|
|
|
@@ -1894,7 +1894,7 @@ your application.
|
|
|
1894
1894
|
|
|
1895
1895
|
<dt class="tag-source">Source:</dt>
|
|
1896
1896
|
<dd class="tag-source"><ul class="dummy"><li>
|
|
1897
|
-
<a href="index.js.html">index.js</a>, <a href="index.js.html#
|
|
1897
|
+
<a href="index.js.html">index.js</a>, <a href="index.js.html#line170">line 170</a>
|
|
1898
1898
|
</li></ul></dd>
|
|
1899
1899
|
|
|
1900
1900
|
|
|
@@ -1930,7 +1930,7 @@ your application.
|
|
|
1930
1930
|
|
|
1931
1931
|
|
|
1932
1932
|
|
|
1933
|
-
<h4 class="name" id="init"><span class="type-signature">(async) </span>init<span class="signature">(Optional)</span><span class="type-signature"></span></h4>
|
|
1933
|
+
<h4 class="name" id="init"><span class="type-signature">(async) </span>init<span class="signature">(Optional, Optional)</span><span class="type-signature"></span></h4>
|
|
1934
1934
|
|
|
1935
1935
|
|
|
1936
1936
|
|
|
@@ -1994,6 +1994,29 @@ your application.
|
|
|
1994
1994
|
</tr>
|
|
1995
1995
|
|
|
1996
1996
|
|
|
1997
|
+
|
|
1998
|
+
<tr>
|
|
1999
|
+
|
|
2000
|
+
<td class="name"><code>Optional</code></td>
|
|
2001
|
+
|
|
2002
|
+
|
|
2003
|
+
<td class="type">
|
|
2004
|
+
|
|
2005
|
+
|
|
2006
|
+
<span class="param-type">object</span>
|
|
2007
|
+
|
|
2008
|
+
|
|
2009
|
+
|
|
2010
|
+
</td>
|
|
2011
|
+
|
|
2012
|
+
|
|
2013
|
+
|
|
2014
|
+
|
|
2015
|
+
|
|
2016
|
+
<td class="description last">A Map containing the key value pairs of the super properties to register</td>
|
|
2017
|
+
</tr>
|
|
2018
|
+
|
|
2019
|
+
|
|
1997
2020
|
</tbody>
|
|
1998
2021
|
</table>
|
|
1999
2022
|
|
|
@@ -2031,7 +2054,7 @@ your application.
|
|
|
2031
2054
|
|
|
2032
2055
|
<dt class="tag-source">Source:</dt>
|
|
2033
2056
|
<dd class="tag-source"><ul class="dummy"><li>
|
|
2034
|
-
<a href="index.js.html">index.js</a>, <a href="index.js.html#
|
|
2057
|
+
<a href="index.js.html">index.js</a>, <a href="index.js.html#line60">line 60</a>
|
|
2035
2058
|
</li></ul></dd>
|
|
2036
2059
|
|
|
2037
2060
|
|
|
@@ -2121,7 +2144,7 @@ This method will internally track an opt-in event to your project.
|
|
|
2121
2144
|
|
|
2122
2145
|
<dt class="tag-source">Source:</dt>
|
|
2123
2146
|
<dd class="tag-source"><ul class="dummy"><li>
|
|
2124
|
-
<a href="index.js.html">index.js</a>, <a href="index.js.html#
|
|
2147
|
+
<a href="index.js.html">index.js</a>, <a href="index.js.html#line137">line 137</a>
|
|
2125
2148
|
</li></ul></dd>
|
|
2126
2149
|
|
|
2127
2150
|
|
|
@@ -2213,7 +2236,7 @@ This method will also remove any user-related information from the device.
|
|
|
2213
2236
|
|
|
2214
2237
|
<dt class="tag-source">Source:</dt>
|
|
2215
2238
|
<dd class="tag-source"><ul class="dummy"><li>
|
|
2216
|
-
<a href="index.js.html">index.js</a>, <a href="index.js.html#
|
|
2239
|
+
<a href="index.js.html">index.js</a>, <a href="index.js.html#line148">line 148</a>
|
|
2217
2240
|
</li></ul></dd>
|
|
2218
2241
|
|
|
2219
2242
|
|
|
@@ -2360,7 +2383,7 @@ to remove a superProperty, call unregisterSuperProperty() or clearSuperPropertie
|
|
|
2360
2383
|
|
|
2361
2384
|
<dt class="tag-source">Source:</dt>
|
|
2362
2385
|
<dd class="tag-source"><ul class="dummy"><li>
|
|
2363
|
-
<a href="index.js.html">index.js</a>, <a href="index.js.html#
|
|
2386
|
+
<a href="index.js.html">index.js</a>, <a href="index.js.html#line339">line 339</a>
|
|
2364
2387
|
</li></ul></dd>
|
|
2365
2388
|
|
|
2366
2389
|
|
|
@@ -2500,7 +2523,7 @@ same names has already been registered.
|
|
|
2500
2523
|
|
|
2501
2524
|
<dt class="tag-source">Source:</dt>
|
|
2502
2525
|
<dd class="tag-source"><ul class="dummy"><li>
|
|
2503
|
-
<a href="index.js.html">index.js</a>, <a href="index.js.html#
|
|
2526
|
+
<a href="index.js.html">index.js</a>, <a href="index.js.html#line354">line 354</a>
|
|
2504
2527
|
</li></ul></dd>
|
|
2505
2528
|
|
|
2506
2529
|
|
|
@@ -2660,7 +2683,7 @@ same names has already been registered.
|
|
|
2660
2683
|
|
|
2661
2684
|
<dt class="tag-source">Source:</dt>
|
|
2662
2685
|
<dd class="tag-source"><ul class="dummy"><li>
|
|
2663
|
-
<a href="index.js.html">index.js</a>, <a href="index.js.html#
|
|
2686
|
+
<a href="index.js.html">index.js</a>, <a href="index.js.html#line302">line 302</a>
|
|
2664
2687
|
</li></ul></dd>
|
|
2665
2688
|
|
|
2666
2689
|
|
|
@@ -2749,7 +2772,7 @@ same names has already been registered.
|
|
|
2749
2772
|
|
|
2750
2773
|
<dt class="tag-source">Source:</dt>
|
|
2751
2774
|
<dd class="tag-source"><ul class="dummy"><li>
|
|
2752
|
-
<a href="index.js.html">index.js</a>, <a href="index.js.html#
|
|
2775
|
+
<a href="index.js.html">index.js</a>, <a href="index.js.html#line433">line 433</a>
|
|
2753
2776
|
</li></ul></dd>
|
|
2754
2777
|
|
|
2755
2778
|
|
|
@@ -2909,7 +2932,7 @@ same names has already been registered.
|
|
|
2909
2932
|
|
|
2910
2933
|
<dt class="tag-source">Source:</dt>
|
|
2911
2934
|
<dd class="tag-source"><ul class="dummy"><li>
|
|
2912
|
-
<a href="index.js.html">index.js</a>, <a href="index.js.html#
|
|
2935
|
+
<a href="index.js.html">index.js</a>, <a href="index.js.html#line263">line 263</a>
|
|
2913
2936
|
</li></ul></dd>
|
|
2914
2937
|
|
|
2915
2938
|
|
|
@@ -3048,7 +3071,7 @@ you are running into issues with the SDK that you want to debug
|
|
|
3048
3071
|
|
|
3049
3072
|
<dt class="tag-source">Source:</dt>
|
|
3050
3073
|
<dd class="tag-source"><ul class="dummy"><li>
|
|
3051
|
-
<a href="index.js.html">index.js</a>, <a href="index.js.html#
|
|
3074
|
+
<a href="index.js.html">index.js</a>, <a href="index.js.html#line105">line 105</a>
|
|
3052
3075
|
</li></ul></dd>
|
|
3053
3076
|
|
|
3054
3077
|
|
|
@@ -3187,7 +3210,7 @@ To route data to Mixpanel's EU servers, set to https://api-eu.mixpanel.com
|
|
|
3187
3210
|
|
|
3188
3211
|
<dt class="tag-source">Source:</dt>
|
|
3189
3212
|
<dd class="tag-source"><ul class="dummy"><li>
|
|
3190
|
-
<a href="index.js.html">index.js</a>, <a href="index.js.html#
|
|
3213
|
+
<a href="index.js.html">index.js</a>, <a href="index.js.html#line93">line 93</a>
|
|
3191
3214
|
</li></ul></dd>
|
|
3192
3215
|
|
|
3193
3216
|
|
|
@@ -3232,7 +3255,7 @@ To route data to Mixpanel's EU servers, set to https://api-eu.mixpanel.com
|
|
|
3232
3255
|
|
|
3233
3256
|
<div class="description">
|
|
3234
3257
|
This controls whether to automatically send the client IP Address as part of event tracking.
|
|
3235
|
-
With an IP address, geo-location is possible down to neighborhoods within a city,
|
|
3258
|
+
With an IP address, geo-location is possible down to neighborhoods within a city,
|
|
3236
3259
|
although the Mixpanel Dashboard will just show you city level location specificity.
|
|
3237
3260
|
</div>
|
|
3238
3261
|
|
|
@@ -3285,7 +3308,7 @@ although the Mixpanel Dashboard will just show you city level location specifici
|
|
|
3285
3308
|
|
|
3286
3309
|
|
|
3287
3310
|
|
|
3288
|
-
<td class="description last">whether to automatically send the client IP Address.
|
|
3311
|
+
<td class="description last">whether to automatically send the client IP Address.
|
|
3289
3312
|
Defaults to true.</td>
|
|
3290
3313
|
</tr>
|
|
3291
3314
|
|
|
@@ -3327,7 +3350,7 @@ Defaults to true.</td>
|
|
|
3327
3350
|
|
|
3328
3351
|
<dt class="tag-source">Source:</dt>
|
|
3329
3352
|
<dd class="tag-source"><ul class="dummy"><li>
|
|
3330
|
-
<a href="index.js.html">index.js</a>, <a href="index.js.html#
|
|
3353
|
+
<a href="index.js.html">index.js</a>, <a href="index.js.html#line118">line 118</a>
|
|
3331
3354
|
</li></ul></dd>
|
|
3332
3355
|
|
|
3333
3356
|
|
|
@@ -3466,7 +3489,7 @@ property, representing the number of seconds between your calls.
|
|
|
3466
3489
|
|
|
3467
3490
|
<dt class="tag-source">Source:</dt>
|
|
3468
3491
|
<dd class="tag-source"><ul class="dummy"><li>
|
|
3469
|
-
<a href="index.js.html">index.js</a>, <a href="index.js.html#
|
|
3492
|
+
<a href="index.js.html">index.js</a>, <a href="index.js.html#line408">line 408</a>
|
|
3470
3493
|
</li></ul></dd>
|
|
3471
3494
|
|
|
3472
3495
|
|
|
@@ -3632,7 +3655,7 @@ that event.
|
|
|
3632
3655
|
|
|
3633
3656
|
<dt class="tag-source">Source:</dt>
|
|
3634
3657
|
<dd class="tag-source"><ul class="dummy"><li>
|
|
3635
|
-
<a href="index.js.html">index.js</a>, <a href="index.js.html#
|
|
3658
|
+
<a href="index.js.html">index.js</a>, <a href="index.js.html#line212">line 212</a>
|
|
3636
3659
|
</li></ul></dd>
|
|
3637
3660
|
|
|
3638
3661
|
|
|
@@ -3821,7 +3844,7 @@ that event. Group key/value pairs are upserted into the property map before trac
|
|
|
3821
3844
|
|
|
3822
3845
|
<dt class="tag-source">Source:</dt>
|
|
3823
3846
|
<dd class="tag-source"><ul class="dummy"><li>
|
|
3824
|
-
<a href="index.js.html">index.js</a>, <a href="index.js.html#
|
|
3847
|
+
<a href="index.js.html">index.js</a>, <a href="index.js.html#line247">line 247</a>
|
|
3825
3848
|
</li></ul></dd>
|
|
3826
3849
|
|
|
3827
3850
|
|
|
@@ -3962,7 +3985,7 @@ To clear all superProperties, use clearSuperProperties()
|
|
|
3962
3985
|
|
|
3963
3986
|
<dt class="tag-source">Source:</dt>
|
|
3964
3987
|
<dd class="tag-source"><ul class="dummy"><li>
|
|
3965
|
-
<a href="index.js.html">index.js</a>, <a href="index.js.html#
|
|
3988
|
+
<a href="index.js.html">index.js</a>, <a href="index.js.html#line370">line 370</a>
|
|
3966
3989
|
</li></ul></dd>
|
|
3967
3990
|
|
|
3968
3991
|
|
|
@@ -4014,7 +4037,7 @@ To clear all superProperties, use clearSuperProperties()
|
|
|
4014
4037
|
<br class="clear">
|
|
4015
4038
|
|
|
4016
4039
|
<footer>
|
|
4017
|
-
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.6</a> on
|
|
4040
|
+
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.6</a> on Fri Feb 25 2022 13:58:49 GMT-0800 (Pacific Standard Time)
|
|
4018
4041
|
</footer>
|
|
4019
4042
|
|
|
4020
4043
|
<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#line681">line 681</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#line752">line 752</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#line700">line 700</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#line719">line 719</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#line768">line 768</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#line737">line 737</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
|
|
960
|
+
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.6</a> on Fri Feb 25 2022 13:58:49 GMT-0800 (Pacific Standard 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#line480">line 480</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#line571">line 571</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#line661">line 661</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#line671">line 671</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#line539">line 539</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#line615">line 615</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#line497">line 497</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#line516">line 516</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#line647">line 647</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#line594">line 594</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#line634">line 634</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
|
|
1628
|
+
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.6</a> on Fri Feb 25 2022 13:58:49 GMT-0800 (Pacific Standard 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
|
|
178
|
+
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.6</a> on Fri Feb 25 2022 13:58:49 GMT-0800 (Pacific Standard Time)
|
|
179
179
|
</footer>
|
|
180
180
|
|
|
181
181
|
<script> prettyPrint(); </script>
|
package/docs/index.js.html
CHANGED
|
@@ -82,11 +82,12 @@ export class Mixpanel {
|
|
|
82
82
|
* Initializes Mixpanel
|
|
83
83
|
*
|
|
84
84
|
* @param {boolean} Optional Whether or not Mixpanel can start tracking by default. See optOutTracking()
|
|
85
|
+
* @param {object} Optional A Map containing the key value pairs of the super properties to register
|
|
85
86
|
*
|
|
86
87
|
*/
|
|
87
|
-
async init(optOutTrackingDefault = DEFAULT_OPT_OUT) {
|
|
88
|
+
async init(optOutTrackingDefault = DEFAULT_OPT_OUT, superProperties = {}) {
|
|
88
89
|
let metadata = Helper.getMetaData();
|
|
89
|
-
await MixpanelReactNative.initialize(this.token, optOutTrackingDefault, metadata);
|
|
90
|
+
await MixpanelReactNative.initialize(this.token, optOutTrackingDefault, {...metadata, ...superProperties});
|
|
90
91
|
}
|
|
91
92
|
|
|
92
93
|
/**
|
|
@@ -96,12 +97,12 @@ export class Mixpanel {
|
|
|
96
97
|
* const mixpanel = new Mixpanel('your project token');
|
|
97
98
|
* mixpanel.init();
|
|
98
99
|
* </code></pre>
|
|
99
|
-
*
|
|
100
|
+
*
|
|
100
101
|
* Initializes Mixpanel and return an instance of Mixpanel the given project token.
|
|
101
102
|
*
|
|
102
103
|
* @param {string} token your project token.
|
|
103
104
|
* @param {boolean} Optional Whether or not Mixpanel can start tracking by default. See optOutTracking()
|
|
104
|
-
*
|
|
105
|
+
*
|
|
105
106
|
*/
|
|
106
107
|
static async init(token, optOutTrackingDefault = DEFAULT_OPT_OUT) {
|
|
107
108
|
let metadata = Helper.getMetaData();
|
|
@@ -115,7 +116,7 @@ export class Mixpanel {
|
|
|
115
116
|
* To route data to Mixpanel's EU servers, set to https://api-eu.mixpanel.com
|
|
116
117
|
*
|
|
117
118
|
* @param {string} serverURL the base URL used for Mixpanel API requests
|
|
118
|
-
*
|
|
119
|
+
*
|
|
119
120
|
*/
|
|
120
121
|
setServerURL(serverURL) {
|
|
121
122
|
MixpanelReactNative.setServerURL(this.token, serverURL);
|
|
@@ -124,10 +125,10 @@ export class Mixpanel {
|
|
|
124
125
|
/**
|
|
125
126
|
* This allows enabling or disabling of all Mixpanel logs at run time.
|
|
126
127
|
* All logging is disabled by default. Usually, this is only required if
|
|
127
|
-
* you are running into issues with the SDK that you want to debug
|
|
128
|
-
*
|
|
128
|
+
* you are running into issues with the SDK that you want to debug
|
|
129
|
+
*
|
|
129
130
|
* @param {boolean} loggingEnabled whether to enable logging
|
|
130
|
-
*
|
|
131
|
+
*
|
|
131
132
|
*/
|
|
132
133
|
setLoggingEnabled(loggingEnabled) {
|
|
133
134
|
MixpanelReactNative.setLoggingEnabled(this.token, loggingEnabled);
|
|
@@ -135,12 +136,12 @@ export class Mixpanel {
|
|
|
135
136
|
|
|
136
137
|
/**
|
|
137
138
|
* This controls whether to automatically send the client IP Address as part of event tracking.
|
|
138
|
-
* With an IP address, geo-location is possible down to neighborhoods within a city,
|
|
139
|
+
* With an IP address, geo-location is possible down to neighborhoods within a city,
|
|
139
140
|
* although the Mixpanel Dashboard will just show you city level location specificity.
|
|
140
|
-
*
|
|
141
|
-
* @param {boolean} useIpAddressForGeolocation whether to automatically send the client IP Address.
|
|
141
|
+
*
|
|
142
|
+
* @param {boolean} useIpAddressForGeolocation whether to automatically send the client IP Address.
|
|
142
143
|
* Defaults to true.
|
|
143
|
-
*
|
|
144
|
+
*
|
|
144
145
|
*/
|
|
145
146
|
setUseIpAddressForGeolocation(useIpAddressForGeolocation) {
|
|
146
147
|
MixpanelReactNative.setUseIpAddressForGeolocation(this.token, useIpAddressForGeolocation);
|
|
@@ -154,7 +155,7 @@ export class Mixpanel {
|
|
|
154
155
|
hasOptedOutTracking() {
|
|
155
156
|
return MixpanelReactNative.hasOptedOutTracking(this.token);
|
|
156
157
|
}
|
|
157
|
-
|
|
158
|
+
|
|
158
159
|
/**
|
|
159
160
|
* Use this method to opt-in an already opted-out user from tracking. People updates and track
|
|
160
161
|
* calls will be sent to Mixpanel after using this method.
|
|
@@ -204,10 +205,10 @@ export class Mixpanel {
|
|
|
204
205
|
/**
|
|
205
206
|
* The alias method creates an alias which Mixpanel will use to remap one id to another.
|
|
206
207
|
* Multiple aliases can point to the same identifier.
|
|
207
|
-
*
|
|
208
|
+
*
|
|
208
209
|
* `mixpane.alias("New ID", mixpane.distinctId)`
|
|
209
210
|
* `mixpane.alias("Newer ID", mixpane.distinctId)`
|
|
210
|
-
*
|
|
211
|
+
*
|
|
211
212
|
* <p>This call does not identify the user after. You must still call both identify() and
|
|
212
213
|
* People.identify() if you wish the new alias to be used for Events and People.
|
|
213
214
|
*
|
|
@@ -270,7 +271,7 @@ export class Mixpanel {
|
|
|
270
271
|
* Pass null if no extra properties exist.
|
|
271
272
|
* @param {object} groups A Map containing the group key value pairs for this event.
|
|
272
273
|
*
|
|
273
|
-
*/
|
|
274
|
+
*/
|
|
274
275
|
trackWithGroups(eventName, properties, groups) {
|
|
275
276
|
if (!StringHelper.isValid(eventName)) {
|
|
276
277
|
StringHelper.raiseError(PARAMS.EVENT_NAME);
|
|
@@ -462,13 +463,13 @@ export class Mixpanel {
|
|
|
462
463
|
}
|
|
463
464
|
|
|
464
465
|
/**
|
|
465
|
-
* Returns the current distinct id of the user.
|
|
466
|
+
* Returns the current distinct id of the user.
|
|
466
467
|
* This is either the id automatically generated by the library or the id that has been passed by a call to identify().
|
|
467
|
-
*
|
|
468
|
-
* example of usage:
|
|
468
|
+
*
|
|
469
|
+
* example of usage:
|
|
469
470
|
* <pre>
|
|
470
471
|
* <code>
|
|
471
|
-
* const distinctId = await mixpanel.getDistinctId();
|
|
472
|
+
* const distinctId = await mixpanel.getDistinctId();
|
|
472
473
|
* </code>
|
|
473
474
|
* </pre>
|
|
474
475
|
*
|
|
@@ -758,7 +759,7 @@ export class MixpanelGroup {
|
|
|
758
759
|
|
|
759
760
|
/**
|
|
760
761
|
* Permanently removes the property with the given name from the group's profile
|
|
761
|
-
*
|
|
762
|
+
*
|
|
762
763
|
* @param {string} prop name of a property to unset
|
|
763
764
|
*/
|
|
764
765
|
unset(prop) {
|
|
@@ -772,7 +773,7 @@ export class MixpanelGroup {
|
|
|
772
773
|
* Remove value from a list-valued property only if it is already present in the list.
|
|
773
774
|
* If the property does not currently exist, the remove will be ignored.
|
|
774
775
|
* If the property exists and is not list-valued, the remove will be ignored.
|
|
775
|
-
*
|
|
776
|
+
*
|
|
776
777
|
* @param {string} name the Group Analytics list-valued property that should have a value removed
|
|
777
778
|
* @param {any} value the value that will be removed from the list
|
|
778
779
|
*/
|
|
@@ -888,7 +889,7 @@ class ObjectHelper {
|
|
|
888
889
|
<br class="clear">
|
|
889
890
|
|
|
890
891
|
<footer>
|
|
891
|
-
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.6</a> on
|
|
892
|
+
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.6</a> on Fri Feb 25 2022 13:58:49 GMT-0800 (Pacific Standard Time)
|
|
892
893
|
</footer>
|
|
893
894
|
|
|
894
895
|
<script> prettyPrint(); </script>
|
package/index.d.ts
CHANGED
|
@@ -4,7 +4,7 @@ type MixpanelProperties = { [key: string]: MixpanelType };
|
|
|
4
4
|
export class Mixpanel {
|
|
5
5
|
constructor(token: string);
|
|
6
6
|
static init(token: string, optOutTrackingDefault?: boolean): Promise<Mixpanel>;
|
|
7
|
-
init(optOutTrackingDefault?: boolean): Promise<void>;
|
|
7
|
+
init(optOutTrackingDefault?: boolean, superProperties?: MixpanelProperties): Promise<void>;
|
|
8
8
|
setServerURL(serverURL: string): void;
|
|
9
9
|
setLoggingEnabled(loggingEnabled: boolean): void;
|
|
10
10
|
setUseIpAddressForGeolocation(useIpAddressForGeolocation: boolean): void;
|
|
@@ -36,8 +36,11 @@ export class Mixpanel {
|
|
|
36
36
|
export class People {
|
|
37
37
|
constructor(token: string);
|
|
38
38
|
set(prop: string, to: MixpanelType): void;
|
|
39
|
+
set(properties: MixpanelProperties): void;
|
|
39
40
|
setOnce(prop: string, to: MixpanelType): void;
|
|
41
|
+
setOnce(properties: MixpanelProperties): void;
|
|
40
42
|
increment(prop: string, by: number): void;
|
|
43
|
+
increment(properties: MixpanelProperties): void;
|
|
41
44
|
append(name: string, value: MixpanelType): void;
|
|
42
45
|
union(name: string, value: Array<MixpanelType>): void;
|
|
43
46
|
remove(name: string, value: MixpanelType): void;
|
package/index.js
CHANGED
|
@@ -54,11 +54,12 @@ export class Mixpanel {
|
|
|
54
54
|
* Initializes Mixpanel
|
|
55
55
|
*
|
|
56
56
|
* @param {boolean} Optional Whether or not Mixpanel can start tracking by default. See optOutTracking()
|
|
57
|
+
* @param {object} Optional A Map containing the key value pairs of the super properties to register
|
|
57
58
|
*
|
|
58
59
|
*/
|
|
59
|
-
async init(optOutTrackingDefault = DEFAULT_OPT_OUT) {
|
|
60
|
+
async init(optOutTrackingDefault = DEFAULT_OPT_OUT, superProperties = {}) {
|
|
60
61
|
let metadata = Helper.getMetaData();
|
|
61
|
-
await MixpanelReactNative.initialize(this.token, optOutTrackingDefault, metadata);
|
|
62
|
+
await MixpanelReactNative.initialize(this.token, optOutTrackingDefault, {...metadata, ...superProperties});
|
|
62
63
|
}
|
|
63
64
|
|
|
64
65
|
/**
|
|
@@ -68,12 +69,12 @@ export class Mixpanel {
|
|
|
68
69
|
* const mixpanel = new Mixpanel('your project token');
|
|
69
70
|
* mixpanel.init();
|
|
70
71
|
* </code></pre>
|
|
71
|
-
*
|
|
72
|
+
*
|
|
72
73
|
* Initializes Mixpanel and return an instance of Mixpanel the given project token.
|
|
73
74
|
*
|
|
74
75
|
* @param {string} token your project token.
|
|
75
76
|
* @param {boolean} Optional Whether or not Mixpanel can start tracking by default. See optOutTracking()
|
|
76
|
-
*
|
|
77
|
+
*
|
|
77
78
|
*/
|
|
78
79
|
static async init(token, optOutTrackingDefault = DEFAULT_OPT_OUT) {
|
|
79
80
|
let metadata = Helper.getMetaData();
|
|
@@ -87,7 +88,7 @@ export class Mixpanel {
|
|
|
87
88
|
* To route data to Mixpanel's EU servers, set to https://api-eu.mixpanel.com
|
|
88
89
|
*
|
|
89
90
|
* @param {string} serverURL the base URL used for Mixpanel API requests
|
|
90
|
-
*
|
|
91
|
+
*
|
|
91
92
|
*/
|
|
92
93
|
setServerURL(serverURL) {
|
|
93
94
|
MixpanelReactNative.setServerURL(this.token, serverURL);
|
|
@@ -96,10 +97,10 @@ export class Mixpanel {
|
|
|
96
97
|
/**
|
|
97
98
|
* This allows enabling or disabling of all Mixpanel logs at run time.
|
|
98
99
|
* All logging is disabled by default. Usually, this is only required if
|
|
99
|
-
* you are running into issues with the SDK that you want to debug
|
|
100
|
-
*
|
|
100
|
+
* you are running into issues with the SDK that you want to debug
|
|
101
|
+
*
|
|
101
102
|
* @param {boolean} loggingEnabled whether to enable logging
|
|
102
|
-
*
|
|
103
|
+
*
|
|
103
104
|
*/
|
|
104
105
|
setLoggingEnabled(loggingEnabled) {
|
|
105
106
|
MixpanelReactNative.setLoggingEnabled(this.token, loggingEnabled);
|
|
@@ -107,12 +108,12 @@ export class Mixpanel {
|
|
|
107
108
|
|
|
108
109
|
/**
|
|
109
110
|
* This controls whether to automatically send the client IP Address as part of event tracking.
|
|
110
|
-
* With an IP address, geo-location is possible down to neighborhoods within a city,
|
|
111
|
+
* With an IP address, geo-location is possible down to neighborhoods within a city,
|
|
111
112
|
* although the Mixpanel Dashboard will just show you city level location specificity.
|
|
112
|
-
*
|
|
113
|
-
* @param {boolean} useIpAddressForGeolocation whether to automatically send the client IP Address.
|
|
113
|
+
*
|
|
114
|
+
* @param {boolean} useIpAddressForGeolocation whether to automatically send the client IP Address.
|
|
114
115
|
* Defaults to true.
|
|
115
|
-
*
|
|
116
|
+
*
|
|
116
117
|
*/
|
|
117
118
|
setUseIpAddressForGeolocation(useIpAddressForGeolocation) {
|
|
118
119
|
MixpanelReactNative.setUseIpAddressForGeolocation(this.token, useIpAddressForGeolocation);
|
|
@@ -126,7 +127,7 @@ export class Mixpanel {
|
|
|
126
127
|
hasOptedOutTracking() {
|
|
127
128
|
return MixpanelReactNative.hasOptedOutTracking(this.token);
|
|
128
129
|
}
|
|
129
|
-
|
|
130
|
+
|
|
130
131
|
/**
|
|
131
132
|
* Use this method to opt-in an already opted-out user from tracking. People updates and track
|
|
132
133
|
* calls will be sent to Mixpanel after using this method.
|
|
@@ -176,10 +177,10 @@ export class Mixpanel {
|
|
|
176
177
|
/**
|
|
177
178
|
* The alias method creates an alias which Mixpanel will use to remap one id to another.
|
|
178
179
|
* Multiple aliases can point to the same identifier.
|
|
179
|
-
*
|
|
180
|
+
*
|
|
180
181
|
* `mixpane.alias("New ID", mixpane.distinctId)`
|
|
181
182
|
* `mixpane.alias("Newer ID", mixpane.distinctId)`
|
|
182
|
-
*
|
|
183
|
+
*
|
|
183
184
|
* <p>This call does not identify the user after. You must still call both identify() and
|
|
184
185
|
* People.identify() if you wish the new alias to be used for Events and People.
|
|
185
186
|
*
|
|
@@ -242,7 +243,7 @@ export class Mixpanel {
|
|
|
242
243
|
* Pass null if no extra properties exist.
|
|
243
244
|
* @param {object} groups A Map containing the group key value pairs for this event.
|
|
244
245
|
*
|
|
245
|
-
*/
|
|
246
|
+
*/
|
|
246
247
|
trackWithGroups(eventName, properties, groups) {
|
|
247
248
|
if (!StringHelper.isValid(eventName)) {
|
|
248
249
|
StringHelper.raiseError(PARAMS.EVENT_NAME);
|
|
@@ -434,13 +435,13 @@ export class Mixpanel {
|
|
|
434
435
|
}
|
|
435
436
|
|
|
436
437
|
/**
|
|
437
|
-
* Returns the current distinct id of the user.
|
|
438
|
+
* Returns the current distinct id of the user.
|
|
438
439
|
* This is either the id automatically generated by the library or the id that has been passed by a call to identify().
|
|
439
|
-
*
|
|
440
|
-
* example of usage:
|
|
440
|
+
*
|
|
441
|
+
* example of usage:
|
|
441
442
|
* <pre>
|
|
442
443
|
* <code>
|
|
443
|
-
* const distinctId = await mixpanel.getDistinctId();
|
|
444
|
+
* const distinctId = await mixpanel.getDistinctId();
|
|
444
445
|
* </code>
|
|
445
446
|
* </pre>
|
|
446
447
|
*
|
|
@@ -730,7 +731,7 @@ export class MixpanelGroup {
|
|
|
730
731
|
|
|
731
732
|
/**
|
|
732
733
|
* Permanently removes the property with the given name from the group's profile
|
|
733
|
-
*
|
|
734
|
+
*
|
|
734
735
|
* @param {string} prop name of a property to unset
|
|
735
736
|
*/
|
|
736
737
|
unset(prop) {
|
|
@@ -744,7 +745,7 @@ export class MixpanelGroup {
|
|
|
744
745
|
* Remove value from a list-valued property only if it is already present in the list.
|
|
745
746
|
* If the property does not currently exist, the remove will be ignored.
|
|
746
747
|
* If the property exists and is not list-valued, the remove will be ignored.
|
|
747
|
-
*
|
|
748
|
+
*
|
|
748
749
|
* @param {string} name the Group Analytics list-valued property that should have a value removed
|
|
749
750
|
* @param {any} value the value that will be removed from the list
|
|
750
751
|
*/
|
package/package.json
CHANGED
package/release.py
CHANGED
|
@@ -11,14 +11,14 @@ args = parser.parse_args()
|
|
|
11
11
|
def bump_version():
|
|
12
12
|
replace_version('package.json', "\"version\": \"" + args.old + "\"", "\"version\": \"" + args.new + "\"")
|
|
13
13
|
replace_version('__tests__/index.test.js', "\"$lib_version\": \"" + args.old + "\"", "\"$lib_version\": \"" + args.new + "\"")
|
|
14
|
-
subprocess.call('cd Samples/MixpanelDemo;yarn upgrade mixpanel-react-native --latest', shell=True)
|
|
15
|
-
subprocess.call('cd Samples/SimpleMixpanel;yarn upgrade mixpanel-react-native --latest', shell=True)
|
|
16
|
-
subprocess.call('cd Samples/ContextAPIMixpanel;yarn upgrade mixpanel-react-native --latest', shell=True)
|
|
14
|
+
#subprocess.call('cd Samples/MixpanelDemo;yarn upgrade mixpanel-react-native --latest', shell=True)
|
|
15
|
+
#subprocess.call('cd Samples/SimpleMixpanel;yarn upgrade mixpanel-react-native --latest', shell=True)
|
|
16
|
+
#subprocess.call('cd Samples/ContextAPIMixpanel;yarn upgrade mixpanel-react-native --latest', shell=True)
|
|
17
17
|
subprocess.call('git add package.json', shell=True)
|
|
18
18
|
subprocess.call('git add __tests__/index.test.js', shell=True)
|
|
19
|
-
subprocess.call('git add Samples/MixpanelDemo/yarn.lock', shell=True)
|
|
20
|
-
subprocess.call('git add Samples/SimpleMixpanel/yarn.lock', shell=True)
|
|
21
|
-
subprocess.call('git add Samples/ContextAPIMixpanel/yarn.lock', shell=True)
|
|
19
|
+
#subprocess.call('git add Samples/MixpanelDemo/yarn.lock', shell=True)
|
|
20
|
+
#subprocess.call('git add Samples/SimpleMixpanel/yarn.lock', shell=True)
|
|
21
|
+
#subprocess.call('git add Samples/ContextAPIMixpanel/yarn.lock', shell=True)
|
|
22
22
|
subprocess.call('git commit -m "Version {}"'.format(args.new), shell=True)
|
|
23
23
|
subprocess.call('git push', shell=True)
|
|
24
24
|
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
<?xml version="1.0" encoding="UTF-8"?>
|
|
2
|
-
<projectDescription>
|
|
3
|
-
<name>android_</name>
|
|
4
|
-
<comment>Project android_ created by Buildship.</comment>
|
|
5
|
-
<projects>
|
|
6
|
-
</projects>
|
|
7
|
-
<buildSpec>
|
|
8
|
-
<buildCommand>
|
|
9
|
-
<name>org.eclipse.buildship.core.gradleprojectbuilder</name>
|
|
10
|
-
<arguments>
|
|
11
|
-
</arguments>
|
|
12
|
-
</buildCommand>
|
|
13
|
-
</buildSpec>
|
|
14
|
-
<natures>
|
|
15
|
-
<nature>org.eclipse.buildship.core.gradleprojectnature</nature>
|
|
16
|
-
</natures>
|
|
17
|
-
<filteredResources>
|
|
18
|
-
<filter>
|
|
19
|
-
<id>1632526110612</id>
|
|
20
|
-
<name></name>
|
|
21
|
-
<type>30</type>
|
|
22
|
-
<matcher>
|
|
23
|
-
<id>org.eclipse.core.resources.regexFilterMatcher</id>
|
|
24
|
-
<arguments>node_modules|.git|__CREATED_BY_JAVA_LANGUAGE_SERVER__</arguments>
|
|
25
|
-
</matcher>
|
|
26
|
-
</filter>
|
|
27
|
-
</filteredResources>
|
|
28
|
-
</projectDescription>
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
<?xml version="1.0" encoding="UTF-8"?>
|
|
2
|
-
<projectDescription>
|
|
3
|
-
<name>android__</name>
|
|
4
|
-
<comment>Project android__ created by Buildship.</comment>
|
|
5
|
-
<projects>
|
|
6
|
-
</projects>
|
|
7
|
-
<buildSpec>
|
|
8
|
-
<buildCommand>
|
|
9
|
-
<name>org.eclipse.buildship.core.gradleprojectbuilder</name>
|
|
10
|
-
<arguments>
|
|
11
|
-
</arguments>
|
|
12
|
-
</buildCommand>
|
|
13
|
-
</buildSpec>
|
|
14
|
-
<natures>
|
|
15
|
-
<nature>org.eclipse.buildship.core.gradleprojectnature</nature>
|
|
16
|
-
</natures>
|
|
17
|
-
<filteredResources>
|
|
18
|
-
<filter>
|
|
19
|
-
<id>1632526110615</id>
|
|
20
|
-
<name></name>
|
|
21
|
-
<type>30</type>
|
|
22
|
-
<matcher>
|
|
23
|
-
<id>org.eclipse.core.resources.regexFilterMatcher</id>
|
|
24
|
-
<arguments>node_modules|.git|__CREATED_BY_JAVA_LANGUAGE_SERVER__</arguments>
|
|
25
|
-
</matcher>
|
|
26
|
-
</filter>
|
|
27
|
-
</filteredResources>
|
|
28
|
-
</projectDescription>
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
<?xml version="1.0" encoding="UTF-8"?>
|
|
2
|
-
<projectDescription>
|
|
3
|
-
<name>android</name>
|
|
4
|
-
<comment>Project android created by Buildship.</comment>
|
|
5
|
-
<projects>
|
|
6
|
-
</projects>
|
|
7
|
-
<buildSpec>
|
|
8
|
-
<buildCommand>
|
|
9
|
-
<name>org.eclipse.buildship.core.gradleprojectbuilder</name>
|
|
10
|
-
<arguments>
|
|
11
|
-
</arguments>
|
|
12
|
-
</buildCommand>
|
|
13
|
-
</buildSpec>
|
|
14
|
-
<natures>
|
|
15
|
-
<nature>org.eclipse.buildship.core.gradleprojectnature</nature>
|
|
16
|
-
</natures>
|
|
17
|
-
<filteredResources>
|
|
18
|
-
<filter>
|
|
19
|
-
<id>1632526110607</id>
|
|
20
|
-
<name></name>
|
|
21
|
-
<type>30</type>
|
|
22
|
-
<matcher>
|
|
23
|
-
<id>org.eclipse.core.resources.regexFilterMatcher</id>
|
|
24
|
-
<arguments>node_modules|.git|__CREATED_BY_JAVA_LANGUAGE_SERVER__</arguments>
|
|
25
|
-
</matcher>
|
|
26
|
-
</filter>
|
|
27
|
-
</filteredResources>
|
|
28
|
-
</projectDescription>
|