@blotoutio/edgetag-sdk-browser 1.37.2 → 1.38.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/index.js +14 -17
- package/package.json +1 -1
package/index.js
CHANGED
|
@@ -995,23 +995,20 @@
|
|
|
995
995
|
session: manifestResult.session,
|
|
996
996
|
});
|
|
997
997
|
const updateUserProperties = (destination, data) => {
|
|
998
|
-
const
|
|
999
|
-
if (
|
|
1000
|
-
|
|
1001
|
-
if (data['email']) {
|
|
1002
|
-
latestUserProperties['hasEmail'] = true;
|
|
1003
|
-
}
|
|
1004
|
-
if (data['phone']) {
|
|
1005
|
-
latestUserProperties['hasPhone'] = true;
|
|
1006
|
-
}
|
|
1007
|
-
if (typeof data['isNewCustomer'] === 'string') {
|
|
1008
|
-
latestUserProperties['isNewCustomer'] = data['isNewCustomer'] === 'true';
|
|
1009
|
-
}
|
|
1010
|
-
const userProperties = getSetting(destination, 'userProperties');
|
|
1011
|
-
setSetting(destination, {
|
|
1012
|
-
userProperties: { ...userProperties, ...latestUserProperties },
|
|
1013
|
-
});
|
|
998
|
+
const latestUserProperties = {};
|
|
999
|
+
if (data['email']) {
|
|
1000
|
+
latestUserProperties['hasEmail'] = true;
|
|
1014
1001
|
}
|
|
1002
|
+
if (data['phone']) {
|
|
1003
|
+
latestUserProperties['hasPhone'] = true;
|
|
1004
|
+
}
|
|
1005
|
+
if (typeof data['isNewCustomer'] === 'string') {
|
|
1006
|
+
latestUserProperties['isNewCustomer'] = data['isNewCustomer'] === 'true';
|
|
1007
|
+
}
|
|
1008
|
+
const userProperties = getSetting(destination, 'userProperties');
|
|
1009
|
+
setSetting(destination, {
|
|
1010
|
+
userProperties: { ...userProperties, ...latestUserProperties },
|
|
1011
|
+
});
|
|
1015
1012
|
};
|
|
1016
1013
|
|
|
1017
1014
|
const tagStorage = 'edgeTag';
|
|
@@ -1304,7 +1301,7 @@
|
|
|
1304
1301
|
referrer: getReferrer(destination),
|
|
1305
1302
|
search: getSearch(destination),
|
|
1306
1303
|
locale: getLocale(),
|
|
1307
|
-
sdkVersion: "1.
|
|
1304
|
+
sdkVersion: "1.38.0" ,
|
|
1308
1305
|
...(payload || {}),
|
|
1309
1306
|
};
|
|
1310
1307
|
let storage = {};
|