mixpanel-react-native 2.0.1 → 2.2.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 +24 -0
- package/MixpanelReactNative.podspec +3 -3
- package/Samples/ContextAPIMixpanel/android/.project +28 -0
- package/Samples/ContextAPIMixpanel/ios/ContextAPIMixpanel.xcodeproj/project.pbxproj +2 -0
- package/Samples/ContextAPIMixpanel/ios/Podfile +1 -1
- package/Samples/ContextAPIMixpanel/package.json +1 -1
- package/Samples/MixpanelDemo/android/.project +28 -0
- package/Samples/MixpanelDemo/ios/MixpanelDemo.xcodeproj/project.pbxproj +2 -0
- package/Samples/MixpanelDemo/ios/Podfile +1 -1
- package/Samples/MixpanelDemo/package.json +1 -1
- package/Samples/SimpleMixpanel/android/.project +28 -0
- package/Samples/SimpleMixpanel/ios/Podfile +1 -1
- package/Samples/SimpleMixpanel/ios/SimpleMixpanel.xcodeproj/project.pbxproj +4 -2
- package/Samples/SimpleMixpanel/package.json +1 -1
- package/__tests__/index.test.js +2 -2
- package/android/build.gradle +1 -1
- package/android/src/main/java/com/mixpanel/reactnative/MixpanelReactNativeModule.java +85 -84
- package/docs/Mixpanel.html +73 -33
- package/docs/MixpanelGroup.html +7 -7
- package/docs/People.html +12 -12
- package/docs/index.html +1 -1
- package/docs/index.js.html +6 -4
- package/index.d.ts +1 -1
- package/index.js +5 -3
- package/ios/MixpanelReactNative.m +1 -1
- package/ios/MixpanelReactNative.swift +3 -1
- package/package.json +1 -1
package/docs/Mixpanel.html
CHANGED
|
@@ -290,7 +290,8 @@
|
|
|
290
290
|
<dt class="important tag-deprecated">Deprecated:</dt><dd><ul class="dummy"><li>since version 1.3.0. To initialize Mixpanel, please use the instance method `init` instead. See the example below:
|
|
291
291
|
|
|
292
292
|
<pre><code>
|
|
293
|
-
const
|
|
293
|
+
const trackAutomaticEvents = true;
|
|
294
|
+
const mixpanel = new Mixpanel('your project token', trackAutomaticEvents);
|
|
294
295
|
mixpanel.init();
|
|
295
296
|
</code></pre>
|
|
296
297
|
|
|
@@ -308,7 +309,7 @@ Initializes Mixpanel and return an instance of Mixpanel the given project token.
|
|
|
308
309
|
|
|
309
310
|
<dt class="tag-source">Source:</dt>
|
|
310
311
|
<dd class="tag-source"><ul class="dummy"><li>
|
|
311
|
-
<a href="index.js.html">index.js</a>, <a href="index.js.html#
|
|
312
|
+
<a href="index.js.html">index.js</a>, <a href="index.js.html#line86">line 86</a>
|
|
312
313
|
</li></ul></dd>
|
|
313
314
|
|
|
314
315
|
|
|
@@ -468,7 +469,7 @@ Initializes Mixpanel and return an instance of Mixpanel the given project token.
|
|
|
468
469
|
|
|
469
470
|
<dt class="tag-source">Source:</dt>
|
|
470
471
|
<dd class="tag-source"><ul class="dummy"><li>
|
|
471
|
-
<a href="index.js.html">index.js</a>, <a href="index.js.html#
|
|
472
|
+
<a href="index.js.html">index.js</a>, <a href="index.js.html#line311">line 311</a>
|
|
472
473
|
</li></ul></dd>
|
|
473
474
|
|
|
474
475
|
|
|
@@ -635,7 +636,7 @@ People.identify() if you wish the new alias to be used for Events and People.
|
|
|
635
636
|
|
|
636
637
|
<dt class="tag-source">Source:</dt>
|
|
637
638
|
<dd class="tag-source"><ul class="dummy"><li>
|
|
638
|
-
<a href="index.js.html">index.js</a>, <a href="index.js.html#
|
|
639
|
+
<a href="index.js.html">index.js</a>, <a href="index.js.html#line212">line 212</a>
|
|
639
640
|
</li></ul></dd>
|
|
640
641
|
|
|
641
642
|
|
|
@@ -728,7 +729,7 @@ superProperties registered before the clearSuperProperties method was called.
|
|
|
728
729
|
|
|
729
730
|
<dt class="tag-source">Source:</dt>
|
|
730
731
|
<dd class="tag-source"><ul class="dummy"><li>
|
|
731
|
-
<a href="index.js.html">index.js</a>, <a href="index.js.html#
|
|
732
|
+
<a href="index.js.html">index.js</a>, <a href="index.js.html#line419">line 419</a>
|
|
732
733
|
</li></ul></dd>
|
|
733
734
|
|
|
734
735
|
|
|
@@ -890,7 +891,7 @@ to Group Analytics using the same group value will create and store new values.<
|
|
|
890
891
|
|
|
891
892
|
<dt class="tag-source">Source:</dt>
|
|
892
893
|
<dd class="tag-source"><ul class="dummy"><li>
|
|
893
|
-
<a href="index.js.html">index.js</a>, <a href="index.js.html#
|
|
894
|
+
<a href="index.js.html">index.js</a>, <a href="index.js.html#line339">line 339</a>
|
|
894
895
|
</li></ul></dd>
|
|
895
896
|
|
|
896
897
|
|
|
@@ -1027,7 +1028,7 @@ to Group Analytics using the same group value will create and store new values.<
|
|
|
1027
1028
|
|
|
1028
1029
|
<dt class="tag-source">Source:</dt>
|
|
1029
1030
|
<dd class="tag-source"><ul class="dummy"><li>
|
|
1030
|
-
<a href="index.js.html">index.js</a>, <a href="index.js.html#
|
|
1031
|
+
<a href="index.js.html">index.js</a>, <a href="index.js.html#line444">line 444</a>
|
|
1031
1032
|
</li></ul></dd>
|
|
1032
1033
|
|
|
1033
1034
|
|
|
@@ -1143,7 +1144,7 @@ send all remaining messages to the server.
|
|
|
1143
1144
|
|
|
1144
1145
|
<dt class="tag-source">Source:</dt>
|
|
1145
1146
|
<dd class="tag-source"><ul class="dummy"><li>
|
|
1146
|
-
<a href="index.js.html">index.js</a>, <a href="index.js.html#
|
|
1147
|
+
<a href="index.js.html">index.js</a>, <a href="index.js.html#line504">line 504</a>
|
|
1147
1148
|
</li></ul></dd>
|
|
1148
1149
|
|
|
1149
1150
|
|
|
@@ -1239,7 +1240,7 @@ const deviceId = await mixpanel.getDeviceId();
|
|
|
1239
1240
|
|
|
1240
1241
|
<dt class="tag-source">Source:</dt>
|
|
1241
1242
|
<dd class="tag-source"><ul class="dummy"><li>
|
|
1242
|
-
<a href="index.js.html">index.js</a>, <a href="index.js.html#
|
|
1243
|
+
<a href="index.js.html">index.js</a>, <a href="index.js.html#line491">line 491</a>
|
|
1243
1244
|
</li></ul></dd>
|
|
1244
1245
|
|
|
1245
1246
|
|
|
@@ -1357,7 +1358,7 @@ const distinctId = await mixpanel.getDistinctId();
|
|
|
1357
1358
|
|
|
1358
1359
|
<dt class="tag-source">Source:</dt>
|
|
1359
1360
|
<dd class="tag-source"><ul class="dummy"><li>
|
|
1360
|
-
<a href="index.js.html">index.js</a>, <a href="index.js.html#
|
|
1361
|
+
<a href="index.js.html">index.js</a>, <a href="index.js.html#line473">line 473</a>
|
|
1361
1362
|
</li></ul></dd>
|
|
1362
1363
|
|
|
1363
1364
|
|
|
@@ -1540,7 +1541,7 @@ Group Analytics properties.
|
|
|
1540
1541
|
|
|
1541
1542
|
<dt class="tag-source">Source:</dt>
|
|
1542
1543
|
<dd class="tag-source"><ul class="dummy"><li>
|
|
1543
|
-
<a href="index.js.html">index.js</a>, <a href="index.js.html#
|
|
1544
|
+
<a href="index.js.html">index.js</a>, <a href="index.js.html#line301">line 301</a>
|
|
1544
1545
|
</li></ul></dd>
|
|
1545
1546
|
|
|
1546
1547
|
|
|
@@ -1640,7 +1641,7 @@ People Analytics properties.
|
|
|
1640
1641
|
|
|
1641
1642
|
<dt class="tag-source">Source:</dt>
|
|
1642
1643
|
<dd class="tag-source"><ul class="dummy"><li>
|
|
1643
|
-
<a href="index.js.html">index.js</a>, <a href="index.js.html#
|
|
1644
|
+
<a href="index.js.html">index.js</a>, <a href="index.js.html#line251">line 251</a>
|
|
1644
1645
|
</li></ul></dd>
|
|
1645
1646
|
|
|
1646
1647
|
|
|
@@ -1754,7 +1755,7 @@ and persist beyond the lifetime of your application.
|
|
|
1754
1755
|
|
|
1755
1756
|
<dt class="tag-source">Source:</dt>
|
|
1756
1757
|
<dd class="tag-source"><ul class="dummy"><li>
|
|
1757
|
-
<a href="index.js.html">index.js</a>, <a href="index.js.html#
|
|
1758
|
+
<a href="index.js.html">index.js</a>, <a href="index.js.html#line407">line 407</a>
|
|
1758
1759
|
</li></ul></dd>
|
|
1759
1760
|
|
|
1760
1761
|
|
|
@@ -1864,7 +1865,7 @@ and persist beyond the lifetime of your application.
|
|
|
1864
1865
|
|
|
1865
1866
|
<dt class="tag-source">Source:</dt>
|
|
1866
1867
|
<dd class="tag-source"><ul class="dummy"><li>
|
|
1867
|
-
<a href="index.js.html">index.js</a>, <a href="index.js.html#
|
|
1868
|
+
<a href="index.js.html">index.js</a>, <a href="index.js.html#line149">line 149</a>
|
|
1868
1869
|
</li></ul></dd>
|
|
1869
1870
|
|
|
1870
1871
|
|
|
@@ -2035,7 +2036,7 @@ your application.
|
|
|
2035
2036
|
|
|
2036
2037
|
<dt class="tag-source">Source:</dt>
|
|
2037
2038
|
<dd class="tag-source"><ul class="dummy"><li>
|
|
2038
|
-
<a href="index.js.html">index.js</a>, <a href="index.js.html#
|
|
2039
|
+
<a href="index.js.html">index.js</a>, <a href="index.js.html#line192">line 192</a>
|
|
2039
2040
|
</li></ul></dd>
|
|
2040
2041
|
|
|
2041
2042
|
|
|
@@ -2071,7 +2072,7 @@ your application.
|
|
|
2071
2072
|
|
|
2072
2073
|
|
|
2073
2074
|
|
|
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>
|
|
2075
|
+
<h4 class="name" id="init"><span class="type-signature">(async) </span>init<span class="signature">(optOutTrackingDefault, superProperties, serverURL)</span><span class="type-signature"></span></h4>
|
|
2075
2076
|
|
|
2076
2077
|
|
|
2077
2078
|
|
|
@@ -2105,6 +2106,8 @@ your application.
|
|
|
2105
2106
|
|
|
2106
2107
|
|
|
2107
2108
|
|
|
2109
|
+
<th>Default</th>
|
|
2110
|
+
|
|
2108
2111
|
|
|
2109
2112
|
<th class="last">Description</th>
|
|
2110
2113
|
</tr>
|
|
@@ -2130,6 +2133,10 @@ your application.
|
|
|
2130
2133
|
|
|
2131
2134
|
|
|
2132
2135
|
|
|
2136
|
+
<td class="default">
|
|
2137
|
+
|
|
2138
|
+
</td>
|
|
2139
|
+
|
|
2133
2140
|
|
|
2134
2141
|
<td class="description last">Optional Whether or not Mixpanel can start tracking by default. See optOutTracking()</td>
|
|
2135
2142
|
</tr>
|
|
@@ -2153,11 +2160,44 @@ your application.
|
|
|
2153
2160
|
|
|
2154
2161
|
|
|
2155
2162
|
|
|
2163
|
+
<td class="default">
|
|
2164
|
+
|
|
2165
|
+
</td>
|
|
2166
|
+
|
|
2156
2167
|
|
|
2157
2168
|
<td class="description last">Optional A Map containing the key value pairs of the super properties to register</td>
|
|
2158
2169
|
</tr>
|
|
2159
2170
|
|
|
2160
2171
|
|
|
2172
|
+
|
|
2173
|
+
<tr>
|
|
2174
|
+
|
|
2175
|
+
<td class="name"><code>serverURL</code></td>
|
|
2176
|
+
|
|
2177
|
+
|
|
2178
|
+
<td class="type">
|
|
2179
|
+
|
|
2180
|
+
|
|
2181
|
+
<span class="param-type">string</span>
|
|
2182
|
+
|
|
2183
|
+
|
|
2184
|
+
|
|
2185
|
+
</td>
|
|
2186
|
+
|
|
2187
|
+
|
|
2188
|
+
|
|
2189
|
+
|
|
2190
|
+
<td class="default">
|
|
2191
|
+
|
|
2192
|
+
https://api.mixpanel.com
|
|
2193
|
+
|
|
2194
|
+
</td>
|
|
2195
|
+
|
|
2196
|
+
|
|
2197
|
+
<td class="description last">Optional Set the base URL used for Mixpanel API requests. See setServerURL()</td>
|
|
2198
|
+
</tr>
|
|
2199
|
+
|
|
2200
|
+
|
|
2161
2201
|
</tbody>
|
|
2162
2202
|
</table>
|
|
2163
2203
|
|
|
@@ -2195,7 +2235,7 @@ your application.
|
|
|
2195
2235
|
|
|
2196
2236
|
<dt class="tag-source">Source:</dt>
|
|
2197
2237
|
<dd class="tag-source"><ul class="dummy"><li>
|
|
2198
|
-
<a href="index.js.html">index.js</a>, <a href="index.js.html#
|
|
2238
|
+
<a href="index.js.html">index.js</a>, <a href="index.js.html#line65">line 65</a>
|
|
2199
2239
|
</li></ul></dd>
|
|
2200
2240
|
|
|
2201
2241
|
|
|
@@ -2285,7 +2325,7 @@ This method will internally track an opt-in event to your project.
|
|
|
2285
2325
|
|
|
2286
2326
|
<dt class="tag-source">Source:</dt>
|
|
2287
2327
|
<dd class="tag-source"><ul class="dummy"><li>
|
|
2288
|
-
<a href="index.js.html">index.js</a>, <a href="index.js.html#
|
|
2328
|
+
<a href="index.js.html">index.js</a>, <a href="index.js.html#line159">line 159</a>
|
|
2289
2329
|
</li></ul></dd>
|
|
2290
2330
|
|
|
2291
2331
|
|
|
@@ -2377,7 +2417,7 @@ This method will also remove any user-related information from the device.
|
|
|
2377
2417
|
|
|
2378
2418
|
<dt class="tag-source">Source:</dt>
|
|
2379
2419
|
<dd class="tag-source"><ul class="dummy"><li>
|
|
2380
|
-
<a href="index.js.html">index.js</a>, <a href="index.js.html#
|
|
2420
|
+
<a href="index.js.html">index.js</a>, <a href="index.js.html#line170">line 170</a>
|
|
2381
2421
|
</li></ul></dd>
|
|
2382
2422
|
|
|
2383
2423
|
|
|
@@ -2524,7 +2564,7 @@ to remove a superProperty, call unregisterSuperProperty() or clearSuperPropertie
|
|
|
2524
2564
|
|
|
2525
2565
|
<dt class="tag-source">Source:</dt>
|
|
2526
2566
|
<dd class="tag-source"><ul class="dummy"><li>
|
|
2527
|
-
<a href="index.js.html">index.js</a>, <a href="index.js.html#
|
|
2567
|
+
<a href="index.js.html">index.js</a>, <a href="index.js.html#line361">line 361</a>
|
|
2528
2568
|
</li></ul></dd>
|
|
2529
2569
|
|
|
2530
2570
|
|
|
@@ -2664,7 +2704,7 @@ same names has already been registered.
|
|
|
2664
2704
|
|
|
2665
2705
|
<dt class="tag-source">Source:</dt>
|
|
2666
2706
|
<dd class="tag-source"><ul class="dummy"><li>
|
|
2667
|
-
<a href="index.js.html">index.js</a>, <a href="index.js.html#
|
|
2707
|
+
<a href="index.js.html">index.js</a>, <a href="index.js.html#line376">line 376</a>
|
|
2668
2708
|
</li></ul></dd>
|
|
2669
2709
|
|
|
2670
2710
|
|
|
@@ -2824,7 +2864,7 @@ same names has already been registered.
|
|
|
2824
2864
|
|
|
2825
2865
|
<dt class="tag-source">Source:</dt>
|
|
2826
2866
|
<dd class="tag-source"><ul class="dummy"><li>
|
|
2827
|
-
<a href="index.js.html">index.js</a>, <a href="index.js.html#
|
|
2867
|
+
<a href="index.js.html">index.js</a>, <a href="index.js.html#line324">line 324</a>
|
|
2828
2868
|
</li></ul></dd>
|
|
2829
2869
|
|
|
2830
2870
|
|
|
@@ -2913,7 +2953,7 @@ same names has already been registered.
|
|
|
2913
2953
|
|
|
2914
2954
|
<dt class="tag-source">Source:</dt>
|
|
2915
2955
|
<dd class="tag-source"><ul class="dummy"><li>
|
|
2916
|
-
<a href="index.js.html">index.js</a>, <a href="index.js.html#
|
|
2956
|
+
<a href="index.js.html">index.js</a>, <a href="index.js.html#line455">line 455</a>
|
|
2917
2957
|
</li></ul></dd>
|
|
2918
2958
|
|
|
2919
2959
|
|
|
@@ -3051,7 +3091,7 @@ when the app enters the background on iOS. This is set to true by default.
|
|
|
3051
3091
|
|
|
3052
3092
|
<dt class="tag-source">Source:</dt>
|
|
3053
3093
|
<dd class="tag-source"><ul class="dummy"><li>
|
|
3054
|
-
<a href="index.js.html">index.js</a>, <a href="index.js.html#
|
|
3094
|
+
<a href="index.js.html">index.js</a>, <a href="index.js.html#line123">line 123</a>
|
|
3055
3095
|
</li></ul></dd>
|
|
3056
3096
|
|
|
3057
3097
|
|
|
@@ -3211,7 +3251,7 @@ when the app enters the background on iOS. This is set to true by default.
|
|
|
3211
3251
|
|
|
3212
3252
|
<dt class="tag-source">Source:</dt>
|
|
3213
3253
|
<dd class="tag-source"><ul class="dummy"><li>
|
|
3214
|
-
<a href="index.js.html">index.js</a>, <a href="index.js.html#
|
|
3254
|
+
<a href="index.js.html">index.js</a>, <a href="index.js.html#line285">line 285</a>
|
|
3215
3255
|
</li></ul></dd>
|
|
3216
3256
|
|
|
3217
3257
|
|
|
@@ -3350,7 +3390,7 @@ you are running into issues with the SDK that you want to debug
|
|
|
3350
3390
|
|
|
3351
3391
|
<dt class="tag-source">Source:</dt>
|
|
3352
3392
|
<dd class="tag-source"><ul class="dummy"><li>
|
|
3353
|
-
<a href="index.js.html">index.js</a>, <a href="index.js.html#
|
|
3393
|
+
<a href="index.js.html">index.js</a>, <a href="index.js.html#line112">line 112</a>
|
|
3354
3394
|
</li></ul></dd>
|
|
3355
3395
|
|
|
3356
3396
|
|
|
@@ -3489,7 +3529,7 @@ To route data to Mixpanel's EU servers, set to https://api-eu.mixpanel.com
|
|
|
3489
3529
|
|
|
3490
3530
|
<dt class="tag-source">Source:</dt>
|
|
3491
3531
|
<dd class="tag-source"><ul class="dummy"><li>
|
|
3492
|
-
<a href="index.js.html">index.js</a>, <a href="index.js.html#
|
|
3532
|
+
<a href="index.js.html">index.js</a>, <a href="index.js.html#line100">line 100</a>
|
|
3493
3533
|
</li></ul></dd>
|
|
3494
3534
|
|
|
3495
3535
|
|
|
@@ -3629,7 +3669,7 @@ Defaults to true.</td>
|
|
|
3629
3669
|
|
|
3630
3670
|
<dt class="tag-source">Source:</dt>
|
|
3631
3671
|
<dd class="tag-source"><ul class="dummy"><li>
|
|
3632
|
-
<a href="index.js.html">index.js</a>, <a href="index.js.html#
|
|
3672
|
+
<a href="index.js.html">index.js</a>, <a href="index.js.html#line140">line 140</a>
|
|
3633
3673
|
</li></ul></dd>
|
|
3634
3674
|
|
|
3635
3675
|
|
|
@@ -3768,7 +3808,7 @@ property, representing the number of seconds between your calls.
|
|
|
3768
3808
|
|
|
3769
3809
|
<dt class="tag-source">Source:</dt>
|
|
3770
3810
|
<dd class="tag-source"><ul class="dummy"><li>
|
|
3771
|
-
<a href="index.js.html">index.js</a>, <a href="index.js.html#
|
|
3811
|
+
<a href="index.js.html">index.js</a>, <a href="index.js.html#line430">line 430</a>
|
|
3772
3812
|
</li></ul></dd>
|
|
3773
3813
|
|
|
3774
3814
|
|
|
@@ -3934,7 +3974,7 @@ that event.
|
|
|
3934
3974
|
|
|
3935
3975
|
<dt class="tag-source">Source:</dt>
|
|
3936
3976
|
<dd class="tag-source"><ul class="dummy"><li>
|
|
3937
|
-
<a href="index.js.html">index.js</a>, <a href="index.js.html#
|
|
3977
|
+
<a href="index.js.html">index.js</a>, <a href="index.js.html#line234">line 234</a>
|
|
3938
3978
|
</li></ul></dd>
|
|
3939
3979
|
|
|
3940
3980
|
|
|
@@ -4123,7 +4163,7 @@ that event. Group key/value pairs are upserted into the property map before trac
|
|
|
4123
4163
|
|
|
4124
4164
|
<dt class="tag-source">Source:</dt>
|
|
4125
4165
|
<dd class="tag-source"><ul class="dummy"><li>
|
|
4126
|
-
<a href="index.js.html">index.js</a>, <a href="index.js.html#
|
|
4166
|
+
<a href="index.js.html">index.js</a>, <a href="index.js.html#line269">line 269</a>
|
|
4127
4167
|
</li></ul></dd>
|
|
4128
4168
|
|
|
4129
4169
|
|
|
@@ -4264,7 +4304,7 @@ To clear all superProperties, use clearSuperProperties()
|
|
|
4264
4304
|
|
|
4265
4305
|
<dt class="tag-source">Source:</dt>
|
|
4266
4306
|
<dd class="tag-source"><ul class="dummy"><li>
|
|
4267
|
-
<a href="index.js.html">index.js</a>, <a href="index.js.html#
|
|
4307
|
+
<a href="index.js.html">index.js</a>, <a href="index.js.html#line392">line 392</a>
|
|
4268
4308
|
</li></ul></dd>
|
|
4269
4309
|
|
|
4270
4310
|
|
|
@@ -4316,7 +4356,7 @@ To clear all superProperties, use clearSuperProperties()
|
|
|
4316
4356
|
<br class="clear">
|
|
4317
4357
|
|
|
4318
4358
|
<footer>
|
|
4319
|
-
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.
|
|
4359
|
+
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.6</a> on Sun Mar 05 2023 23:39:40 GMT-0800 (Pacific Standard Time)
|
|
4320
4360
|
</footer>
|
|
4321
4361
|
|
|
4322
4362
|
<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#line721">line 721</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#line792">line 792</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#line740">line 740</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#line759">line 759</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#line808">line 808</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#line777">line 777</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.
|
|
960
|
+
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.6</a> on Sun Mar 05 2023 23:39:40 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#line520">line 520</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#line611">line 611</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#line701">line 701</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#line711">line 711</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#line579">line 579</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#line655">line 655</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#line537">line 537</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#line556">line 556</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#line687">line 687</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#line634">line 634</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#line674">line 674</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.
|
|
1628
|
+
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.6</a> on Sun Mar 05 2023 23:39:40 GMT-0800 (Pacific Standard Time)
|
|
1629
1629
|
</footer>
|
|
1630
1630
|
|
|
1631
1631
|
<script> prettyPrint(); </script>
|
package/docs/index.html
CHANGED
|
@@ -178,7 +178,7 @@ Please refer to our <a href="https://mixpanel.com/legal/app-store-privacy-detai
|
|
|
178
178
|
<br class="clear">
|
|
179
179
|
|
|
180
180
|
<footer>
|
|
181
|
-
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.
|
|
181
|
+
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.6</a> on Sun Mar 05 2023 23:39:40 GMT-0800 (Pacific Standard Time)
|
|
182
182
|
</footer>
|
|
183
183
|
|
|
184
184
|
<script> prettyPrint(); </script>
|
package/docs/index.js.html
CHANGED
|
@@ -87,18 +87,20 @@ export class Mixpanel {
|
|
|
87
87
|
*
|
|
88
88
|
* @param {boolean} optOutTrackingDefault Optional Whether or not Mixpanel can start tracking by default. See optOutTracking()
|
|
89
89
|
* @param {object} superProperties Optional A Map containing the key value pairs of the super properties to register
|
|
90
|
+
* @param {string} serverURL Optional Set the base URL used for Mixpanel API requests. See setServerURL()
|
|
90
91
|
*
|
|
91
92
|
*/
|
|
92
|
-
async init(optOutTrackingDefault = DEFAULT_OPT_OUT, superProperties = {}) {
|
|
93
|
+
async init(optOutTrackingDefault = DEFAULT_OPT_OUT, superProperties = {}, serverURL = "https://api.mixpanel.com") {
|
|
93
94
|
let metadata = Helper.getMetaData();
|
|
94
|
-
await MixpanelReactNative.initialize(this.token, this.trackAutomaticEvents, optOutTrackingDefault, {...metadata, ...superProperties});
|
|
95
|
+
await MixpanelReactNative.initialize(this.token, this.trackAutomaticEvents, optOutTrackingDefault, {...metadata, ...superProperties}, serverURL);
|
|
95
96
|
}
|
|
96
97
|
|
|
97
98
|
/**
|
|
98
99
|
* @deprecated since version 1.3.0. To initialize Mixpanel, please use the instance method `init` instead. See the example below:
|
|
99
100
|
*
|
|
100
101
|
* <pre><code>
|
|
101
|
-
* const
|
|
102
|
+
* const trackAutomaticEvents = true;
|
|
103
|
+
* const mixpanel = new Mixpanel('your project token', trackAutomaticEvents);
|
|
102
104
|
* mixpanel.init();
|
|
103
105
|
* </code></pre>
|
|
104
106
|
*
|
|
@@ -927,7 +929,7 @@ class ObjectHelper {
|
|
|
927
929
|
<br class="clear">
|
|
928
930
|
|
|
929
931
|
<footer>
|
|
930
|
-
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.
|
|
932
|
+
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.6</a> on Sun Mar 05 2023 23:39:40 GMT-0800 (Pacific Standard Time)
|
|
931
933
|
</footer>
|
|
932
934
|
|
|
933
935
|
<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, trackAutomaticEvents: boolean);
|
|
6
6
|
static init(token: string, trackAutomaticEvents: boolean, optOutTrackingDefault?: boolean): Promise<Mixpanel>;
|
|
7
|
-
init(optOutTrackingDefault?: boolean, superProperties?: MixpanelProperties): Promise<void>;
|
|
7
|
+
init(optOutTrackingDefault?: boolean, superProperties?: MixpanelProperties, serverURL?: String): Promise<void>;
|
|
8
8
|
setServerURL(serverURL: string): void;
|
|
9
9
|
setLoggingEnabled(loggingEnabled: boolean): void;
|
|
10
10
|
setFlushOnBackground(flushOnBackground: boolean): void;
|
package/index.js
CHANGED
|
@@ -59,18 +59,20 @@ export class Mixpanel {
|
|
|
59
59
|
*
|
|
60
60
|
* @param {boolean} optOutTrackingDefault Optional Whether or not Mixpanel can start tracking by default. See optOutTracking()
|
|
61
61
|
* @param {object} superProperties Optional A Map containing the key value pairs of the super properties to register
|
|
62
|
+
* @param {string} serverURL Optional Set the base URL used for Mixpanel API requests. See setServerURL()
|
|
62
63
|
*
|
|
63
64
|
*/
|
|
64
|
-
async init(optOutTrackingDefault = DEFAULT_OPT_OUT, superProperties = {}) {
|
|
65
|
+
async init(optOutTrackingDefault = DEFAULT_OPT_OUT, superProperties = {}, serverURL = "https://api.mixpanel.com") {
|
|
65
66
|
let metadata = Helper.getMetaData();
|
|
66
|
-
await MixpanelReactNative.initialize(this.token, this.trackAutomaticEvents, optOutTrackingDefault, {...metadata, ...superProperties});
|
|
67
|
+
await MixpanelReactNative.initialize(this.token, this.trackAutomaticEvents, optOutTrackingDefault, {...metadata, ...superProperties}, serverURL);
|
|
67
68
|
}
|
|
68
69
|
|
|
69
70
|
/**
|
|
70
71
|
* @deprecated since version 1.3.0. To initialize Mixpanel, please use the instance method `init` instead. See the example below:
|
|
71
72
|
*
|
|
72
73
|
* <pre><code>
|
|
73
|
-
* const
|
|
74
|
+
* const trackAutomaticEvents = true;
|
|
75
|
+
* const mixpanel = new Mixpanel('your project token', trackAutomaticEvents);
|
|
74
76
|
* mixpanel.init();
|
|
75
77
|
* </code></pre>
|
|
76
78
|
*
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
|
|
6
6
|
// MARK: - Mixpanel Instance
|
|
7
7
|
|
|
8
|
-
RCT_EXTERN_METHOD(initialize:(NSString *)token trackAutomaticEvents:(BOOL)trackAutomaticEvents optOutTrackingByDefault:(BOOL)optOutTrackingByDefault properties:(NSDictionary *)properties resolver:(RCTPromiseResolveBlock)resolve rejecter:(RCTPromiseRejectBlock)reject)
|
|
8
|
+
RCT_EXTERN_METHOD(initialize:(NSString *)token trackAutomaticEvents:(BOOL)trackAutomaticEvents optOutTrackingByDefault:(BOOL)optOutTrackingByDefault properties:(NSDictionary *)properties serverURL:(NSString *)serverURL resolver:(RCTPromiseResolveBlock)resolve rejecter:(RCTPromiseRejectBlock)reject)
|
|
9
9
|
|
|
10
10
|
// Mark: - Settings
|
|
11
11
|
RCT_EXTERN_METHOD(setServerURL:(NSString *)token serverURL:(NSString *)serverURL resolver:(RCTPromiseResolveBlock)resolve rejecter:(RCTPromiseRejectBlock)reject)
|
|
@@ -16,12 +16,14 @@ open class MixpanelReactNative: NSObject {
|
|
|
16
16
|
trackAutomaticEvents: Bool,
|
|
17
17
|
optOutTrackingByDefault: Bool = false,
|
|
18
18
|
properties: [String: Any],
|
|
19
|
+
serverURL: String,
|
|
19
20
|
resolver resolve: RCTPromiseResolveBlock,
|
|
20
21
|
rejecter reject: RCTPromiseRejectBlock) -> Void {
|
|
21
22
|
AutomaticProperties.setAutomaticProperties(properties)
|
|
22
23
|
Mixpanel.initialize(token: token, trackAutomaticEvents: trackAutomaticEvents, flushInterval: Constants.DEFAULT_FLUSH_INTERVAL,
|
|
23
24
|
instanceName: token, optOutTrackingByDefault: optOutTrackingByDefault,
|
|
24
|
-
superProperties: MixpanelTypeHandler.processProperties(properties: properties, includeLibInfo: true)
|
|
25
|
+
superProperties: MixpanelTypeHandler.processProperties(properties: properties, includeLibInfo: true),
|
|
26
|
+
serverURL: serverURL)
|
|
25
27
|
resolve(true)
|
|
26
28
|
}
|
|
27
29
|
|