Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

mixpanel-react-native

Package Overview
Dependencies
Maintainers
2
Versions
51
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

mixpanel-react-native - npm Package Compare versions

Comparing version 2.3.1 to 2.4.0

android/bin/.gradle/5.5/executionHistory/executionHistory.lock

10

__tests__/index.test.js

@@ -12,3 +12,3 @@ /**

const mixpanel = await Mixpanel.init("token", true);
expect(NativeModules.MixpanelReactNative.initialize).toBeCalledWith("token", true, false, {"$lib_version": "2.3.1", "mp_lib": "react-native"}, "https://api.mixpanel.com");
expect(NativeModules.MixpanelReactNative.initialize).toBeCalledWith("token", true, false, {"$lib_version": "2.4.0", "mp_lib": "react-native"}, "https://api.mixpanel.com");
});

@@ -19,3 +19,3 @@

mixpanel.init(true, {"super": "property"})
expect(NativeModules.MixpanelReactNative.initialize).toBeCalledWith("token", true, true, {"$lib_version": "2.3.1", "mp_lib": "react-native", "super": "property"}, "https://api.mixpanel.com");
expect(NativeModules.MixpanelReactNative.initialize).toBeCalledWith("token", true, true, {"$lib_version": "2.4.0", "mp_lib": "react-native", "super": "property"}, "https://api.mixpanel.com");
});

@@ -41,2 +41,8 @@

test(`it calls MixpanelReactNative setFlushBatchSize`, async () => {
const mixpanel = await Mixpanel.init("token", true);
mixpanel.setFlushBatchSize(20);
expect(NativeModules.MixpanelReactNative.setFlushBatchSize).toBeCalledWith("token", 20);
});
test(`it calls MixpanelReactNative hasOptedOutTracking`, async () => {

@@ -43,0 +49,0 @@ const mixpanel = await Mixpanel.init("token", true);

1

__tests__/jest_setup.js

@@ -25,2 +25,3 @@ import * as ReactNative from 'react-native';

setUseIpAddressForGeolocation: jest.fn(),
setFlushBatchSize: jest.fn(),
hasOptedOutTracking: jest.fn(),

@@ -27,0 +28,0 @@ optInTracking: jest.fn(),

#
## [v2.4.0](https://github.com/mixpanel/mixpanel-react-native/tree/v2.4.0) (2023-12-02)
### Enhancements
- add api: setFlushBatchSize [\#219](https://github.com/mixpanel/mixpanel-react-native/pull/219)
- RN 73 support for Android with AGP 8 required [\#215](https://github.com/mixpanel/mixpanel-react-native/pull/215)
#
## [v2.3.1](https://github.com/mixpanel/mixpanel-react-native/tree/v2.3.1) (2023-06-20)
### Fixes
- fix typo in the identify function resolve [\#205](https://github.com/mixpanel/mixpanel-react-native/pull/205)
#
## [v2.3.0](https://github.com/mixpanel/mixpanel-react-native/tree/v2.3.0) (2023-06-16)

@@ -329,1 +346,5 @@

@@ -11,4 +11,4 @@ type MixpanelType = any;

setFlushOnBackground(flushOnBackground: boolean): void;
setUseIpAddressForGeolocation(useIpAddressForGeolocation: boolean): void;
setFlushBatchSize(flushBatchSize: number): void;
hasOptedOutTracking(): Promise<boolean>;

@@ -15,0 +15,0 @@ optInTracking(): void;

@@ -143,3 +143,16 @@ "use strict";

}
/**
* Set the number of events sent in a single network request to the Mixpanel server.
* By configuring this value, you can optimize network usage and manage the frequency of communication between the client and the server. The maximum size is 50; any value over 50 will default to 50.
*
* @param {integer} flushBatchSize whether to automatically send the client IP Address.
* Defaults to true.
*
*/
setFlushBatchSize(flushBatchSize) {
MixpanelReactNative.setFlushBatchSize(this.token, flushBatchSize);
}
/**

@@ -146,0 +159,0 @@ * Will return true if the user has opted out from tracking.

{
"name": "mixpanel-react-native",
"version": "2.3.1",
"version": "2.4.0",
"description": "Official React Native Tracking Library for Mixpanel Analytics",

@@ -5,0 +5,0 @@ "main": "index.js",

@@ -15,8 +15,2 @@ import React from 'react';

mixpanelInstance.init();
mixpanelInstance.identify('Unique User ID').then(() => {
mixpanelInstance.getDistinctId().then(distinctId => {
console.log(`DistinctId is ${ distinctId }`);
});
});
setMixpanel(mixpanelInstance);

@@ -23,0 +17,0 @@ }, []);

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc