mixpanel-react-native 1.4.2 β 2.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +33 -0
- package/{LICENSE β LICENSE.md} +1 -12
- package/MixpanelReactNative.podspec +1 -1
- package/README.md +6 -3
- package/Samples/ContextAPIMixpanel/Analytics.js +2 -1
- package/Samples/MixpanelDemo/Analytics.js +2 -2
- package/Samples/MixpanelDemo/app.json +2 -1
- package/Samples/SimpleMixpanel/App.js +2 -1
- package/__tests__/index.test.js +42 -42
- package/android/build.gradle +1 -1
- package/android/src/main/java/com/mixpanel/reactnative/MixpanelReactNativeModule.java +84 -84
- package/docs/Mixpanel.html +60 -37
- package/docs/MixpanelGroup.html +7 -7
- package/docs/People.html +12 -12
- package/docs/index.html +7 -4
- package/docs/index.js.html +13 -8
- package/index.d.ts +2 -2
- package/index.js +12 -7
- package/ios/MixpanelReactNative.m +1 -1
- package/ios/MixpanelReactNative.swift +3 -6
- package/package.json +1 -1
package/docs/Mixpanel.html
CHANGED
|
@@ -156,7 +156,7 @@
|
|
|
156
156
|
|
|
157
157
|
|
|
158
158
|
|
|
159
|
-
<h4 class="name" id=".init"><span class="type-signature">(async, static) </span>init<span class="signature">(token, Optional)</span><span class="type-signature"></span></h4>
|
|
159
|
+
<h4 class="name" id=".init"><span class="type-signature">(async, static) </span>init<span class="signature">(token, trackAutomaticEvents, Optional)</span><span class="type-signature"></span></h4>
|
|
160
160
|
|
|
161
161
|
|
|
162
162
|
|
|
@@ -217,6 +217,29 @@
|
|
|
217
217
|
|
|
218
218
|
|
|
219
219
|
|
|
220
|
+
<tr>
|
|
221
|
+
|
|
222
|
+
<td class="name"><code>trackAutomaticEvents</code></td>
|
|
223
|
+
|
|
224
|
+
|
|
225
|
+
<td class="type">
|
|
226
|
+
|
|
227
|
+
|
|
228
|
+
<span class="param-type">boolean</span>
|
|
229
|
+
|
|
230
|
+
|
|
231
|
+
|
|
232
|
+
</td>
|
|
233
|
+
|
|
234
|
+
|
|
235
|
+
|
|
236
|
+
|
|
237
|
+
|
|
238
|
+
<td class="description last">Whether or not to automatically track common mobile events</td>
|
|
239
|
+
</tr>
|
|
240
|
+
|
|
241
|
+
|
|
242
|
+
|
|
220
243
|
<tr>
|
|
221
244
|
|
|
222
245
|
<td class="name"><code>Optional</code></td>
|
|
@@ -285,7 +308,7 @@ Initializes Mixpanel and return an instance of Mixpanel the given project token.
|
|
|
285
308
|
|
|
286
309
|
<dt class="tag-source">Source:</dt>
|
|
287
310
|
<dd class="tag-source"><ul class="dummy"><li>
|
|
288
|
-
<a href="index.js.html">index.js</a>, <a href="index.js.html#
|
|
311
|
+
<a href="index.js.html">index.js</a>, <a href="index.js.html#line84">line 84</a>
|
|
289
312
|
</li></ul></dd>
|
|
290
313
|
|
|
291
314
|
|
|
@@ -445,7 +468,7 @@ Initializes Mixpanel and return an instance of Mixpanel the given project token.
|
|
|
445
468
|
|
|
446
469
|
<dt class="tag-source">Source:</dt>
|
|
447
470
|
<dd class="tag-source"><ul class="dummy"><li>
|
|
448
|
-
<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#line309">line 309</a>
|
|
449
472
|
</li></ul></dd>
|
|
450
473
|
|
|
451
474
|
|
|
@@ -612,7 +635,7 @@ People.identify() if you wish the new alias to be used for Events and People.
|
|
|
612
635
|
|
|
613
636
|
<dt class="tag-source">Source:</dt>
|
|
614
637
|
<dd class="tag-source"><ul class="dummy"><li>
|
|
615
|
-
<a href="index.js.html">index.js</a>, <a href="index.js.html#
|
|
638
|
+
<a href="index.js.html">index.js</a>, <a href="index.js.html#line210">line 210</a>
|
|
616
639
|
</li></ul></dd>
|
|
617
640
|
|
|
618
641
|
|
|
@@ -705,7 +728,7 @@ superProperties registered before the clearSuperProperties method was called.
|
|
|
705
728
|
|
|
706
729
|
<dt class="tag-source">Source:</dt>
|
|
707
730
|
<dd class="tag-source"><ul class="dummy"><li>
|
|
708
|
-
<a href="index.js.html">index.js</a>, <a href="index.js.html#
|
|
731
|
+
<a href="index.js.html">index.js</a>, <a href="index.js.html#line417">line 417</a>
|
|
709
732
|
</li></ul></dd>
|
|
710
733
|
|
|
711
734
|
|
|
@@ -867,7 +890,7 @@ to Group Analytics using the same group value will create and store new values.<
|
|
|
867
890
|
|
|
868
891
|
<dt class="tag-source">Source:</dt>
|
|
869
892
|
<dd class="tag-source"><ul class="dummy"><li>
|
|
870
|
-
<a href="index.js.html">index.js</a>, <a href="index.js.html#
|
|
893
|
+
<a href="index.js.html">index.js</a>, <a href="index.js.html#line337">line 337</a>
|
|
871
894
|
</li></ul></dd>
|
|
872
895
|
|
|
873
896
|
|
|
@@ -1004,7 +1027,7 @@ to Group Analytics using the same group value will create and store new values.<
|
|
|
1004
1027
|
|
|
1005
1028
|
<dt class="tag-source">Source:</dt>
|
|
1006
1029
|
<dd class="tag-source"><ul class="dummy"><li>
|
|
1007
|
-
<a href="index.js.html">index.js</a>, <a href="index.js.html#
|
|
1030
|
+
<a href="index.js.html">index.js</a>, <a href="index.js.html#line442">line 442</a>
|
|
1008
1031
|
</li></ul></dd>
|
|
1009
1032
|
|
|
1010
1033
|
|
|
@@ -1120,7 +1143,7 @@ send all remaining messages to the server.
|
|
|
1120
1143
|
|
|
1121
1144
|
<dt class="tag-source">Source:</dt>
|
|
1122
1145
|
<dd class="tag-source"><ul class="dummy"><li>
|
|
1123
|
-
<a href="index.js.html">index.js</a>, <a href="index.js.html#
|
|
1146
|
+
<a href="index.js.html">index.js</a>, <a href="index.js.html#line502">line 502</a>
|
|
1124
1147
|
</li></ul></dd>
|
|
1125
1148
|
|
|
1126
1149
|
|
|
@@ -1216,7 +1239,7 @@ const deviceId = await mixpanel.getDeviceId();
|
|
|
1216
1239
|
|
|
1217
1240
|
<dt class="tag-source">Source:</dt>
|
|
1218
1241
|
<dd class="tag-source"><ul class="dummy"><li>
|
|
1219
|
-
<a href="index.js.html">index.js</a>, <a href="index.js.html#
|
|
1242
|
+
<a href="index.js.html">index.js</a>, <a href="index.js.html#line489">line 489</a>
|
|
1220
1243
|
</li></ul></dd>
|
|
1221
1244
|
|
|
1222
1245
|
|
|
@@ -1334,7 +1357,7 @@ const distinctId = await mixpanel.getDistinctId();
|
|
|
1334
1357
|
|
|
1335
1358
|
<dt class="tag-source">Source:</dt>
|
|
1336
1359
|
<dd class="tag-source"><ul class="dummy"><li>
|
|
1337
|
-
<a href="index.js.html">index.js</a>, <a href="index.js.html#
|
|
1360
|
+
<a href="index.js.html">index.js</a>, <a href="index.js.html#line471">line 471</a>
|
|
1338
1361
|
</li></ul></dd>
|
|
1339
1362
|
|
|
1340
1363
|
|
|
@@ -1517,7 +1540,7 @@ Group Analytics properties.
|
|
|
1517
1540
|
|
|
1518
1541
|
<dt class="tag-source">Source:</dt>
|
|
1519
1542
|
<dd class="tag-source"><ul class="dummy"><li>
|
|
1520
|
-
<a href="index.js.html">index.js</a>, <a href="index.js.html#
|
|
1543
|
+
<a href="index.js.html">index.js</a>, <a href="index.js.html#line299">line 299</a>
|
|
1521
1544
|
</li></ul></dd>
|
|
1522
1545
|
|
|
1523
1546
|
|
|
@@ -1617,7 +1640,7 @@ People Analytics properties.
|
|
|
1617
1640
|
|
|
1618
1641
|
<dt class="tag-source">Source:</dt>
|
|
1619
1642
|
<dd class="tag-source"><ul class="dummy"><li>
|
|
1620
|
-
<a href="index.js.html">index.js</a>, <a href="index.js.html#
|
|
1643
|
+
<a href="index.js.html">index.js</a>, <a href="index.js.html#line249">line 249</a>
|
|
1621
1644
|
</li></ul></dd>
|
|
1622
1645
|
|
|
1623
1646
|
|
|
@@ -1731,7 +1754,7 @@ and persist beyond the lifetime of your application.
|
|
|
1731
1754
|
|
|
1732
1755
|
<dt class="tag-source">Source:</dt>
|
|
1733
1756
|
<dd class="tag-source"><ul class="dummy"><li>
|
|
1734
|
-
<a href="index.js.html">index.js</a>, <a href="index.js.html#
|
|
1757
|
+
<a href="index.js.html">index.js</a>, <a href="index.js.html#line405">line 405</a>
|
|
1735
1758
|
</li></ul></dd>
|
|
1736
1759
|
|
|
1737
1760
|
|
|
@@ -1841,7 +1864,7 @@ and persist beyond the lifetime of your application.
|
|
|
1841
1864
|
|
|
1842
1865
|
<dt class="tag-source">Source:</dt>
|
|
1843
1866
|
<dd class="tag-source"><ul class="dummy"><li>
|
|
1844
|
-
<a href="index.js.html">index.js</a>, <a href="index.js.html#
|
|
1867
|
+
<a href="index.js.html">index.js</a>, <a href="index.js.html#line147">line 147</a>
|
|
1845
1868
|
</li></ul></dd>
|
|
1846
1869
|
|
|
1847
1870
|
|
|
@@ -2012,7 +2035,7 @@ your application.
|
|
|
2012
2035
|
|
|
2013
2036
|
<dt class="tag-source">Source:</dt>
|
|
2014
2037
|
<dd class="tag-source"><ul class="dummy"><li>
|
|
2015
|
-
<a href="index.js.html">index.js</a>, <a href="index.js.html#
|
|
2038
|
+
<a href="index.js.html">index.js</a>, <a href="index.js.html#line190">line 190</a>
|
|
2016
2039
|
</li></ul></dd>
|
|
2017
2040
|
|
|
2018
2041
|
|
|
@@ -2048,7 +2071,7 @@ your application.
|
|
|
2048
2071
|
|
|
2049
2072
|
|
|
2050
2073
|
|
|
2051
|
-
<h4 class="name" id="init"><span class="type-signature">(async) </span>init<span class="signature">(
|
|
2074
|
+
<h4 class="name" id="init"><span class="type-signature">(async) </span>init<span class="signature">(optOutTrackingDefault, superProperties)</span><span class="type-signature"></span></h4>
|
|
2052
2075
|
|
|
2053
2076
|
|
|
2054
2077
|
|
|
@@ -2092,7 +2115,7 @@ your application.
|
|
|
2092
2115
|
|
|
2093
2116
|
<tr>
|
|
2094
2117
|
|
|
2095
|
-
<td class="name"><code>
|
|
2118
|
+
<td class="name"><code>optOutTrackingDefault</code></td>
|
|
2096
2119
|
|
|
2097
2120
|
|
|
2098
2121
|
<td class="type">
|
|
@@ -2108,14 +2131,14 @@ your application.
|
|
|
2108
2131
|
|
|
2109
2132
|
|
|
2110
2133
|
|
|
2111
|
-
<td class="description last">Whether or not Mixpanel can start tracking by default. See optOutTracking()</td>
|
|
2134
|
+
<td class="description last">Optional Whether or not Mixpanel can start tracking by default. See optOutTracking()</td>
|
|
2112
2135
|
</tr>
|
|
2113
2136
|
|
|
2114
2137
|
|
|
2115
2138
|
|
|
2116
2139
|
<tr>
|
|
2117
2140
|
|
|
2118
|
-
<td class="name"><code>
|
|
2141
|
+
<td class="name"><code>superProperties</code></td>
|
|
2119
2142
|
|
|
2120
2143
|
|
|
2121
2144
|
<td class="type">
|
|
@@ -2131,7 +2154,7 @@ your application.
|
|
|
2131
2154
|
|
|
2132
2155
|
|
|
2133
2156
|
|
|
2134
|
-
<td class="description last">A Map containing the key value pairs of the super properties to register</td>
|
|
2157
|
+
<td class="description last">Optional A Map containing the key value pairs of the super properties to register</td>
|
|
2135
2158
|
</tr>
|
|
2136
2159
|
|
|
2137
2160
|
|
|
@@ -2172,7 +2195,7 @@ your application.
|
|
|
2172
2195
|
|
|
2173
2196
|
<dt class="tag-source">Source:</dt>
|
|
2174
2197
|
<dd class="tag-source"><ul class="dummy"><li>
|
|
2175
|
-
<a href="index.js.html">index.js</a>, <a href="index.js.html#
|
|
2198
|
+
<a href="index.js.html">index.js</a>, <a href="index.js.html#line64">line 64</a>
|
|
2176
2199
|
</li></ul></dd>
|
|
2177
2200
|
|
|
2178
2201
|
|
|
@@ -2262,7 +2285,7 @@ This method will internally track an opt-in event to your project.
|
|
|
2262
2285
|
|
|
2263
2286
|
<dt class="tag-source">Source:</dt>
|
|
2264
2287
|
<dd class="tag-source"><ul class="dummy"><li>
|
|
2265
|
-
<a href="index.js.html">index.js</a>, <a href="index.js.html#
|
|
2288
|
+
<a href="index.js.html">index.js</a>, <a href="index.js.html#line157">line 157</a>
|
|
2266
2289
|
</li></ul></dd>
|
|
2267
2290
|
|
|
2268
2291
|
|
|
@@ -2354,7 +2377,7 @@ This method will also remove any user-related information from the device.
|
|
|
2354
2377
|
|
|
2355
2378
|
<dt class="tag-source">Source:</dt>
|
|
2356
2379
|
<dd class="tag-source"><ul class="dummy"><li>
|
|
2357
|
-
<a href="index.js.html">index.js</a>, <a href="index.js.html#
|
|
2380
|
+
<a href="index.js.html">index.js</a>, <a href="index.js.html#line168">line 168</a>
|
|
2358
2381
|
</li></ul></dd>
|
|
2359
2382
|
|
|
2360
2383
|
|
|
@@ -2501,7 +2524,7 @@ to remove a superProperty, call unregisterSuperProperty() or clearSuperPropertie
|
|
|
2501
2524
|
|
|
2502
2525
|
<dt class="tag-source">Source:</dt>
|
|
2503
2526
|
<dd class="tag-source"><ul class="dummy"><li>
|
|
2504
|
-
<a href="index.js.html">index.js</a>, <a href="index.js.html#
|
|
2527
|
+
<a href="index.js.html">index.js</a>, <a href="index.js.html#line359">line 359</a>
|
|
2505
2528
|
</li></ul></dd>
|
|
2506
2529
|
|
|
2507
2530
|
|
|
@@ -2641,7 +2664,7 @@ same names has already been registered.
|
|
|
2641
2664
|
|
|
2642
2665
|
<dt class="tag-source">Source:</dt>
|
|
2643
2666
|
<dd class="tag-source"><ul class="dummy"><li>
|
|
2644
|
-
<a href="index.js.html">index.js</a>, <a href="index.js.html#
|
|
2667
|
+
<a href="index.js.html">index.js</a>, <a href="index.js.html#line374">line 374</a>
|
|
2645
2668
|
</li></ul></dd>
|
|
2646
2669
|
|
|
2647
2670
|
|
|
@@ -2801,7 +2824,7 @@ same names has already been registered.
|
|
|
2801
2824
|
|
|
2802
2825
|
<dt class="tag-source">Source:</dt>
|
|
2803
2826
|
<dd class="tag-source"><ul class="dummy"><li>
|
|
2804
|
-
<a href="index.js.html">index.js</a>, <a href="index.js.html#
|
|
2827
|
+
<a href="index.js.html">index.js</a>, <a href="index.js.html#line322">line 322</a>
|
|
2805
2828
|
</li></ul></dd>
|
|
2806
2829
|
|
|
2807
2830
|
|
|
@@ -2890,7 +2913,7 @@ same names has already been registered.
|
|
|
2890
2913
|
|
|
2891
2914
|
<dt class="tag-source">Source:</dt>
|
|
2892
2915
|
<dd class="tag-source"><ul class="dummy"><li>
|
|
2893
|
-
<a href="index.js.html">index.js</a>, <a href="index.js.html#
|
|
2916
|
+
<a href="index.js.html">index.js</a>, <a href="index.js.html#line453">line 453</a>
|
|
2894
2917
|
</li></ul></dd>
|
|
2895
2918
|
|
|
2896
2919
|
|
|
@@ -3028,7 +3051,7 @@ when the app enters the background on iOS. This is set to true by default.
|
|
|
3028
3051
|
|
|
3029
3052
|
<dt class="tag-source">Source:</dt>
|
|
3030
3053
|
<dd class="tag-source"><ul class="dummy"><li>
|
|
3031
|
-
<a href="index.js.html">index.js</a>, <a href="index.js.html#
|
|
3054
|
+
<a href="index.js.html">index.js</a>, <a href="index.js.html#line121">line 121</a>
|
|
3032
3055
|
</li></ul></dd>
|
|
3033
3056
|
|
|
3034
3057
|
|
|
@@ -3188,7 +3211,7 @@ when the app enters the background on iOS. This is set to true by default.
|
|
|
3188
3211
|
|
|
3189
3212
|
<dt class="tag-source">Source:</dt>
|
|
3190
3213
|
<dd class="tag-source"><ul class="dummy"><li>
|
|
3191
|
-
<a href="index.js.html">index.js</a>, <a href="index.js.html#
|
|
3214
|
+
<a href="index.js.html">index.js</a>, <a href="index.js.html#line283">line 283</a>
|
|
3192
3215
|
</li></ul></dd>
|
|
3193
3216
|
|
|
3194
3217
|
|
|
@@ -3327,7 +3350,7 @@ you are running into issues with the SDK that you want to debug
|
|
|
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#line110">line 110</a>
|
|
3331
3354
|
</li></ul></dd>
|
|
3332
3355
|
|
|
3333
3356
|
|
|
@@ -3466,7 +3489,7 @@ To route data to Mixpanel's EU servers, set to https://api-eu.mixpanel.com
|
|
|
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#line98">line 98</a>
|
|
3470
3493
|
</li></ul></dd>
|
|
3471
3494
|
|
|
3472
3495
|
|
|
@@ -3606,7 +3629,7 @@ Defaults to true.</td>
|
|
|
3606
3629
|
|
|
3607
3630
|
<dt class="tag-source">Source:</dt>
|
|
3608
3631
|
<dd class="tag-source"><ul class="dummy"><li>
|
|
3609
|
-
<a href="index.js.html">index.js</a>, <a href="index.js.html#
|
|
3632
|
+
<a href="index.js.html">index.js</a>, <a href="index.js.html#line138">line 138</a>
|
|
3610
3633
|
</li></ul></dd>
|
|
3611
3634
|
|
|
3612
3635
|
|
|
@@ -3745,7 +3768,7 @@ property, representing the number of seconds between your calls.
|
|
|
3745
3768
|
|
|
3746
3769
|
<dt class="tag-source">Source:</dt>
|
|
3747
3770
|
<dd class="tag-source"><ul class="dummy"><li>
|
|
3748
|
-
<a href="index.js.html">index.js</a>, <a href="index.js.html#
|
|
3771
|
+
<a href="index.js.html">index.js</a>, <a href="index.js.html#line428">line 428</a>
|
|
3749
3772
|
</li></ul></dd>
|
|
3750
3773
|
|
|
3751
3774
|
|
|
@@ -3911,7 +3934,7 @@ that event.
|
|
|
3911
3934
|
|
|
3912
3935
|
<dt class="tag-source">Source:</dt>
|
|
3913
3936
|
<dd class="tag-source"><ul class="dummy"><li>
|
|
3914
|
-
<a href="index.js.html">index.js</a>, <a href="index.js.html#
|
|
3937
|
+
<a href="index.js.html">index.js</a>, <a href="index.js.html#line232">line 232</a>
|
|
3915
3938
|
</li></ul></dd>
|
|
3916
3939
|
|
|
3917
3940
|
|
|
@@ -4100,7 +4123,7 @@ that event. Group key/value pairs are upserted into the property map before trac
|
|
|
4100
4123
|
|
|
4101
4124
|
<dt class="tag-source">Source:</dt>
|
|
4102
4125
|
<dd class="tag-source"><ul class="dummy"><li>
|
|
4103
|
-
<a href="index.js.html">index.js</a>, <a href="index.js.html#
|
|
4126
|
+
<a href="index.js.html">index.js</a>, <a href="index.js.html#line267">line 267</a>
|
|
4104
4127
|
</li></ul></dd>
|
|
4105
4128
|
|
|
4106
4129
|
|
|
@@ -4241,7 +4264,7 @@ To clear all superProperties, use clearSuperProperties()
|
|
|
4241
4264
|
|
|
4242
4265
|
<dt class="tag-source">Source:</dt>
|
|
4243
4266
|
<dd class="tag-source"><ul class="dummy"><li>
|
|
4244
|
-
<a href="index.js.html">index.js</a>, <a href="index.js.html#
|
|
4267
|
+
<a href="index.js.html">index.js</a>, <a href="index.js.html#line390">line 390</a>
|
|
4245
4268
|
</li></ul></dd>
|
|
4246
4269
|
|
|
4247
4270
|
|
|
@@ -4293,7 +4316,7 @@ To clear all superProperties, use clearSuperProperties()
|
|
|
4293
4316
|
<br class="clear">
|
|
4294
4317
|
|
|
4295
4318
|
<footer>
|
|
4296
|
-
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.10</a> on
|
|
4319
|
+
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.10</a> on Mon Sep 12 2022 12:35:41 GMT-0700 (Pacific Daylight Time)
|
|
4297
4320
|
</footer>
|
|
4298
4321
|
|
|
4299
4322
|
<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#line719">line 719</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#line790">line 790</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#line738">line 738</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#line757">line 757</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#line806">line 806</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#line775">line 775</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.10</a> on
|
|
960
|
+
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.10</a> on Mon Sep 12 2022 12:35:41 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#line518">line 518</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#line609">line 609</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#line699">line 699</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#line709">line 709</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#line577">line 577</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#line653">line 653</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#line535">line 535</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#line554">line 554</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#line685">line 685</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#line632">line 632</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#line672">line 672</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.10</a> on
|
|
1628
|
+
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.10</a> on Mon Sep 12 2022 12:35:41 GMT-0700 (Pacific Daylight Time)
|
|
1629
1629
|
</footer>
|
|
1630
1630
|
|
|
1631
1631
|
<script> prettyPrint(); </script>
|
package/docs/index.html
CHANGED
|
@@ -96,7 +96,8 @@ We'd also love for you to come and work with us! Check out <strong><a href="http
|
|
|
96
96
|
<p>To start tracking with the library you must first initialize with your project token. You can get your project token from <a href="https://mixpanel.com/settings/project">project settings</a>.</p>
|
|
97
97
|
<pre class="prettyprint source lang-js"><code>import { Mixpanel } from 'mixpanel-react-native';
|
|
98
98
|
|
|
99
|
-
const
|
|
99
|
+
const trackAutomaticEvents = true;
|
|
100
|
+
const mixpanel = new Mixpanel("Your Project Token", trackAutomaticEvents);
|
|
100
101
|
mixpanel.init();
|
|
101
102
|
|
|
102
103
|
</code></pre>
|
|
@@ -110,7 +111,7 @@ mixpanel.track('Plan Selected', {'Plan': 'Premium'});
|
|
|
110
111
|
</code></pre>
|
|
111
112
|
<p>In addition to event data, you can also send <a href="https://developer.mixpanel.com/docs/react-native#storing-user-profiles">user profile data</a>. We recommend this after completing the quickstart guide.</p>
|
|
112
113
|
<h3>4. Check for Success</h3>
|
|
113
|
-
<p><a href="http://mixpanel.com/report/
|
|
114
|
+
<p><a href="http://mixpanel.com/report/events">Open up Events in Mixpanel</a> to view incoming events.
|
|
114
115
|
Once data hits our API, it generally takes ~60 seconds for it to be processed, stored, and queryable in your project.
|
|
115
116
|
<a name="i-want-to-know-more"></a></p>
|
|
116
117
|
<h3>Complete Code Example</h3>
|
|
@@ -119,7 +120,8 @@ import React from 'react';
|
|
|
119
120
|
import { Button, SafeAreaView } from "react-native";
|
|
120
121
|
import { Mixpanel } from 'mixpanel-react-native';
|
|
121
122
|
|
|
122
|
-
const
|
|
123
|
+
const trackAutomaticEvents = true;
|
|
124
|
+
const mixpanel = new Mixpanel("Your Project Token", trackAutomaticEvents);
|
|
123
125
|
mixpanel.init();
|
|
124
126
|
|
|
125
127
|
const SampleApp = () => {
|
|
@@ -136,6 +138,7 @@ const SampleApp = () => {
|
|
|
136
138
|
export default SampleApp;
|
|
137
139
|
|
|
138
140
|
</code></pre>
|
|
141
|
+
<p>π π Tell us about the Mixpanel developer experience! <a href="https://www.mixpanel.com/devnps">https://www.mixpanel.com/devnps</a> π π</p>
|
|
139
142
|
<h2>FAQ</h2>
|
|
140
143
|
<p><strong>I want to stop tracking an event/event property in Mixpanel. Is that possible?</strong><br>
|
|
141
144
|
Yes, in Lexicon, you can intercept and drop incoming events or properties. Mixpanel wonβt store any new data for the event or property you select to drop. <a href="https://help.mixpanel.com/hc/en-us/articles/360001307806#dropping-events-and-properties">See this article for more information</a>.</p>
|
|
@@ -175,7 +178,7 @@ Please refer to our <a href="https://mixpanel.com/legal/app-store-privacy-detai
|
|
|
175
178
|
<br class="clear">
|
|
176
179
|
|
|
177
180
|
<footer>
|
|
178
|
-
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.10</a> on
|
|
181
|
+
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.10</a> on Mon Sep 12 2022 12:35:41 GMT-0700 (Pacific Daylight Time)
|
|
179
182
|
</footer>
|
|
180
183
|
|
|
181
184
|
<script> prettyPrint(); </script>
|
package/docs/index.js.html
CHANGED
|
@@ -70,24 +70,28 @@ const DEFAULT_OPT_OUT = false;
|
|
|
70
70
|
*/
|
|
71
71
|
export class Mixpanel {
|
|
72
72
|
|
|
73
|
-
constructor(token) {
|
|
73
|
+
constructor(token, trackAutomaticEvents) {
|
|
74
74
|
if (!StringHelper.isValid(token)) {
|
|
75
75
|
StringHelper.raiseError(PARAMS.TOKEN);
|
|
76
76
|
}
|
|
77
|
+
if (trackAutomaticEvents == null) {
|
|
78
|
+
throw new Error(`trackAutomaticEvents is undefined`);
|
|
79
|
+
}
|
|
77
80
|
this.token = token;
|
|
81
|
+
this.trackAutomaticEvents = trackAutomaticEvents;
|
|
78
82
|
this.people = new People(this.token);
|
|
79
83
|
}
|
|
80
84
|
|
|
81
85
|
/**
|
|
82
86
|
* Initializes Mixpanel
|
|
83
87
|
*
|
|
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
|
|
88
|
+
* @param {boolean} optOutTrackingDefault Optional Whether or not Mixpanel can start tracking by default. See optOutTracking()
|
|
89
|
+
* @param {object} superProperties Optional A Map containing the key value pairs of the super properties to register
|
|
86
90
|
*
|
|
87
91
|
*/
|
|
88
92
|
async init(optOutTrackingDefault = DEFAULT_OPT_OUT, superProperties = {}) {
|
|
89
93
|
let metadata = Helper.getMetaData();
|
|
90
|
-
await MixpanelReactNative.initialize(this.token, optOutTrackingDefault, {...metadata, ...superProperties});
|
|
94
|
+
await MixpanelReactNative.initialize(this.token, this.trackAutomaticEvents, optOutTrackingDefault, {...metadata, ...superProperties});
|
|
91
95
|
}
|
|
92
96
|
|
|
93
97
|
/**
|
|
@@ -101,13 +105,14 @@ export class Mixpanel {
|
|
|
101
105
|
* Initializes Mixpanel and return an instance of Mixpanel the given project token.
|
|
102
106
|
*
|
|
103
107
|
* @param {string} token your project token.
|
|
108
|
+
* @param {boolean} trackAutomaticEvents Whether or not to automatically track common mobile events
|
|
104
109
|
* @param {boolean} Optional Whether or not Mixpanel can start tracking by default. See optOutTracking()
|
|
105
110
|
*
|
|
106
111
|
*/
|
|
107
|
-
static async init(token, optOutTrackingDefault = DEFAULT_OPT_OUT) {
|
|
112
|
+
static async init(token, trackAutomaticEvents, optOutTrackingDefault = DEFAULT_OPT_OUT) {
|
|
108
113
|
let metadata = Helper.getMetaData();
|
|
109
|
-
await MixpanelReactNative.initialize(token, optOutTrackingDefault, metadata);
|
|
110
|
-
return new Mixpanel(token);
|
|
114
|
+
await MixpanelReactNative.initialize(token, trackAutomaticEvents, optOutTrackingDefault, metadata);
|
|
115
|
+
return new Mixpanel(token, trackAutomaticEvents);
|
|
111
116
|
}
|
|
112
117
|
|
|
113
118
|
/**
|
|
@@ -922,7 +927,7 @@ class ObjectHelper {
|
|
|
922
927
|
<br class="clear">
|
|
923
928
|
|
|
924
929
|
<footer>
|
|
925
|
-
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.10</a> on
|
|
930
|
+
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.10</a> on Mon Sep 12 2022 12:35:41 GMT-0700 (Pacific Daylight Time)
|
|
926
931
|
</footer>
|
|
927
932
|
|
|
928
933
|
<script> prettyPrint(); </script>
|
package/index.d.ts
CHANGED
|
@@ -2,8 +2,8 @@ type MixpanelType = any;
|
|
|
2
2
|
type MixpanelProperties = { [key: string]: MixpanelType };
|
|
3
3
|
|
|
4
4
|
export class Mixpanel {
|
|
5
|
-
constructor(token: string);
|
|
6
|
-
static init(token: string, optOutTrackingDefault?: boolean): Promise<Mixpanel>;
|
|
5
|
+
constructor(token: string, trackAutomaticEvents: boolean);
|
|
6
|
+
static init(token: string, trackAutomaticEvents: boolean, optOutTrackingDefault?: boolean): Promise<Mixpanel>;
|
|
7
7
|
init(optOutTrackingDefault?: boolean, superProperties?: MixpanelProperties): Promise<void>;
|
|
8
8
|
setServerURL(serverURL: string): void;
|
|
9
9
|
setLoggingEnabled(loggingEnabled: boolean): void;
|