mixpanel-react-native 2.3.0 → 2.3.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.
@@ -12,6 +12,12 @@ export const MixpanelProvider = ({children}) => {
12
12
  const trackAutomaticEvents = true;
13
13
  const mixpanelInstance = new Mixpanel(`Your Project Token`, trackAutomaticEvents);
14
14
  mixpanelInstance.init();
15
+ mixpanelInstance.identify('Unique User ID').then(() => {
16
+ mixpanelInstance.getDistinctId().then(distinctId => {
17
+ console.log(`DistinctId is ${ distinctId }`);
18
+ });
19
+ });
20
+
15
21
  setMixpanel(mixpanelInstance);
16
22
  }, []);
17
23
 
@@ -9,13 +9,13 @@ import { NativeModules } from 'react-native';
9
9
 
10
10
  test(`it calls MixpanelReactNative initialize`, async () => {
11
11
  const mixpanel = await Mixpanel.init("token", true);
12
- expect(NativeModules.MixpanelReactNative.initialize).toBeCalledWith("token", true, false, {"$lib_version": "2.3.0", "mp_lib": "react-native"}, "https://api.mixpanel.com");
12
+ expect(NativeModules.MixpanelReactNative.initialize).toBeCalledWith("token", true, false, {"$lib_version": "2.3.1", "mp_lib": "react-native"}, "https://api.mixpanel.com");
13
13
  });
14
14
 
15
15
  test(`it calls MixpanelReactNative initialize with optOut and superProperties`, async () => {
16
16
  const mixpanel = new Mixpanel("token", true);
17
17
  mixpanel.init(true, {"super": "property"})
18
- expect(NativeModules.MixpanelReactNative.initialize).toBeCalledWith("token", true, true, {"$lib_version": "2.3.0", "mp_lib": "react-native", "super": "property"}, "https://api.mixpanel.com");
18
+ expect(NativeModules.MixpanelReactNative.initialize).toBeCalledWith("token", true, true, {"$lib_version": "2.3.1", "mp_lib": "react-native", "super": "property"}, "https://api.mixpanel.com");
19
19
  });
20
20
 
21
21
  test(`it calls MixpanelReactNative setServerURL`, async () => {
@@ -4379,7 +4379,7 @@ To clear all superProperties, use clearSuperProperties()
4379
4379
  <br class="clear">
4380
4380
 
4381
4381
  <footer>
4382
- Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.6</a> on Fri Jun 16 2023 16:47:53 GMT-0700 (Pacific Daylight Time)
4382
+ Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.6</a> on Tue Jun 20 2023 11:54:12 GMT-0700 (Pacific Daylight Time)
4383
4383
  </footer>
4384
4384
 
4385
4385
  <script> prettyPrint(); </script>
@@ -957,7 +957,7 @@ If the property exists and is not list-valued, the union will be ignored.
957
957
  <br class="clear">
958
958
 
959
959
  <footer>
960
- Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.6</a> on Fri Jun 16 2023 16:47:53 GMT-0700 (Pacific Daylight Time)
960
+ Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.6</a> on Tue Jun 20 2023 11:54:12 GMT-0700 (Pacific Daylight Time)
961
961
  </footer>
962
962
 
963
963
  <script> prettyPrint(); </script>
package/docs/People.html CHANGED
@@ -1625,7 +1625,7 @@ If the property exists and is not list-valued, the union will be ignored.
1625
1625
  <br class="clear">
1626
1626
 
1627
1627
  <footer>
1628
- Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.6</a> on Fri Jun 16 2023 16:47:53 GMT-0700 (Pacific Daylight Time)
1628
+ Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.6</a> on Tue Jun 20 2023 11:54:12 GMT-0700 (Pacific Daylight Time)
1629
1629
  </footer>
1630
1630
 
1631
1631
  <script> prettyPrint(); </script>
package/docs/index.html CHANGED
@@ -179,7 +179,7 @@ Please refer to our <a href="https://mixpanel.com/legal/app-store-privacy-detai
179
179
  <br class="clear">
180
180
 
181
181
  <footer>
182
- Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.6</a> on Fri Jun 16 2023 16:47:53 GMT-0700 (Pacific Daylight Time)
182
+ Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.6</a> on Tue Jun 20 2023 11:54:12 GMT-0700 (Pacific Daylight Time)
183
183
  </footer>
184
184
 
185
185
  <script> prettyPrint(); </script>
@@ -220,7 +220,7 @@ export class Mixpanel {
220
220
  *
221
221
  */
222
222
  identify(distinctId) {
223
- return new Promise((resolvem, reject) => {
223
+ return new Promise((resolve, reject) => {
224
224
  if (!StringHelper.isValid(distinctId)) {
225
225
  StringHelper.raiseError(PARAMS.DISTINCT_ID);
226
226
  reject(new Error('Invalid distinctId'));
@@ -940,7 +940,7 @@ class ObjectHelper {
940
940
  <br class="clear">
941
941
 
942
942
  <footer>
943
- Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.6</a> on Fri Jun 16 2023 16:47:53 GMT-0700 (Pacific Daylight Time)
943
+ Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.6</a> on Tue Jun 20 2023 11:54:12 GMT-0700 (Pacific Daylight Time)
944
944
  </footer>
945
945
 
946
946
  <script> prettyPrint(); </script>
package/index.js CHANGED
@@ -192,7 +192,7 @@ export class Mixpanel {
192
192
  *
193
193
  */
194
194
  identify(distinctId) {
195
- return new Promise((resolvem, reject) => {
195
+ return new Promise((resolve, reject) => {
196
196
  if (!StringHelper.isValid(distinctId)) {
197
197
  StringHelper.raiseError(PARAMS.DISTINCT_ID);
198
198
  reject(new Error('Invalid distinctId'));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mixpanel-react-native",
3
- "version": "2.3.0",
3
+ "version": "2.3.1",
4
4
  "description": "Official React Native Tracking Library for Mixpanel Analytics",
5
5
  "main": "index.js",
6
6
  "scripts": {