apps-sdk 2.1.6 → 2.1.7

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/config.js CHANGED
@@ -91,6 +91,7 @@ const config = {
91
91
 
92
92
  MIXPANEL: {
93
93
  TOKEN: '8893d9ebad697ab26bc63214cf6cc262',
94
+ SERVER_URL: 'https://api-eu.mixpanel.com', // EU region by default
94
95
  DEBUG: false,
95
96
  },
96
97
 
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "apps-sdk",
3
- "version": "2.1.6",
4
- "description": "Apps SDK - Compatible with Expo SDK 54 + React 19 - add generic method checksubscription to check if user has active subscription in webapp, and push notifications handler to handle incoming notifications and route to correct screen",
3
+ "version": "2.1.7",
4
+ "description": "Apps SDK - Compatible with Expo SDK 54 + React 19 - update url server for MixPanel events",
5
5
  "main": "index.js",
6
6
  "author": "ASD",
7
7
  "license": "ISC",
@@ -9,13 +9,13 @@ class MixPanel {
9
9
  this.devMode = false;
10
10
  }
11
11
 
12
- async initialize(token = null, trackAutomaticEvents = false, useNative = false, devMode = false) {
12
+ async initialize(token = null, trackAutomaticEvents = false, useNative = false, devMode = false, serverURL = null) {
13
13
  this.devMode = devMode;
14
14
  const finalToken = token || config.MIXPANEL.TOKEN;
15
- console.log('Initializing MixPanel with token: ' + finalToken);
15
+ const finalServerURL = serverURL || config.MIXPANEL.SERVER_URL || 'https://api-eu.mixpanel.com';
16
16
  try {
17
17
  this.mixpanel = new Mixpanel(finalToken, trackAutomaticEvents, useNative);
18
- await this.mixpanel.init();
18
+ await this.mixpanel.init(false, {}, finalServerURL);
19
19
  config.DEBUG_MODE && console.log('MixPanel initialized: OK');
20
20
  Networking.sendEvent('other', 'mixpanel_init_ok');
21
21
  } catch (error) {