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