apps-sdk 1.1.13 → 1.1.14

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "apps-sdk",
3
- "version": "1.1.13",
3
+ "version": "1.1.14",
4
4
  "description": "Apps SDK",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -134,7 +134,8 @@ class MixPanel {
134
134
  }
135
135
  }
136
136
 
137
- async setUserProperty(propertyName, propertyValue) {
137
+
138
+ async setUserProperties(properties) {
138
139
  if (!this.mixpanel) {
139
140
  console.log('Mixpanel is not initialized');
140
141
  return;
@@ -142,16 +143,13 @@ class MixPanel {
142
143
 
143
144
  try {
144
145
  if (!this.devMode) {
145
- // const distinctId = await this.getDistinctID();
146
- // const userProperties = { [propertyName]: propertyValue, distinct_id: distinctId };
147
- await this.mixpanel.getPeople().set(propertyName, propertyValue);
148
- config.DEBUG_MODE && console.log(`MixPanel User property set: ${propertyName} = ${propertyValue}`);
149
- // config.DEBUG_MODE && console.log(`MixPanel User property set: ${propertyName} = ${propertyValue}, distinct_id = ${distinctId}`);
146
+ await this.mixpanel.getPeople().set(properties);
147
+ config.DEBUG_MODE && console.log('MixPanel User properties set:', properties);
150
148
  } else {
151
- config.DEBUG_MODE && console.log(`MixPanel User property set but not send (DEV_MODE ON): ${propertyName} = ${propertyValue}`);
149
+ config.DEBUG_MODE && console.log('MixPanel User properties set but not send (DEV_MODE ON):', properties);
152
150
  }
153
151
  } catch (error) {
154
- console.error('Error setting user property:', error);
152
+ console.error('Error setting user properties:', error);
155
153
  }
156
154
  }
157
155
 
package/types/index.d.ts CHANGED
@@ -188,7 +188,7 @@ declare module 'apps-sdk' {
188
188
  superProperties(properties: object): Promise<void>;
189
189
  superPropertiesAppend(properties: object): Promise<void>;
190
190
  identifyUser(userID: string): Promise<void>;
191
- setUserProperty(property: string, value: any): Promise<void>;
191
+ setUserProperties(properties: any): Promise<void>;
192
192
  disableTracking(): Promise<void>;
193
193
  enableTracking(): Promise<void>;
194
194
  }