@blotoutio/edgetag-sdk-js 1.40.1 → 1.41.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 +18 -2
- package/index.mjs +18 -2
- package/internal.d.ts +1 -0
- package/package.json +1 -1
package/index.cjs.js
CHANGED
|
@@ -853,6 +853,7 @@ const initSettings = (destination, options) => {
|
|
|
853
853
|
geoCountry: (_e = existing === null || existing === void 0 ? void 0 : existing.geoCountry) !== null && _e !== void 0 ? _e : null,
|
|
854
854
|
geoRegion: (_f = existing === null || existing === void 0 ? void 0 : existing.geoRegion) !== null && _f !== void 0 ? _f : null,
|
|
855
855
|
isEURequest: (_g = existing === null || existing === void 0 ? void 0 : existing.isEURequest) !== null && _g !== void 0 ? _g : false,
|
|
856
|
+
ip: (existing === null || existing === void 0 ? void 0 : existing.ip) || null,
|
|
856
857
|
consentSetting: (_h = existing === null || existing === void 0 ? void 0 : existing.consentSetting) !== null && _h !== void 0 ? _h : {
|
|
857
858
|
enabled: false,
|
|
858
859
|
channels: {},
|
|
@@ -1305,7 +1306,7 @@ const getStandardPayload = (destination, payload) => {
|
|
|
1305
1306
|
referrer: getReferrer(destination),
|
|
1306
1307
|
search: getSearch(destination),
|
|
1307
1308
|
locale: getLocale(),
|
|
1308
|
-
sdkVersion: "1.
|
|
1309
|
+
sdkVersion: "1.41.0" ,
|
|
1309
1310
|
...(payload || {}),
|
|
1310
1311
|
};
|
|
1311
1312
|
let storage = {};
|
|
@@ -1519,6 +1520,7 @@ const processTag = (destination, eventName, data = {}, providers, options) => {
|
|
|
1519
1520
|
const consentCategory = getConsentCategories(destination);
|
|
1520
1521
|
const consentSettings = getSetting(destination, 'consentSetting');
|
|
1521
1522
|
const userConsent = { consentChannel, consentCategory, consentSettings };
|
|
1523
|
+
const ip = getSetting(destination, 'ip') || null;
|
|
1522
1524
|
const userProperties = getSetting(destination, 'userProperties');
|
|
1523
1525
|
if (skipZeroPurchaseEvent && isZeroPurchaseEvent({ eventName, data })) {
|
|
1524
1526
|
return;
|
|
@@ -1560,7 +1562,7 @@ const processTag = (destination, eventName, data = {}, providers, options) => {
|
|
|
1560
1562
|
continue;
|
|
1561
1563
|
}
|
|
1562
1564
|
if (!doesGeoRequestMatchList(requestCountry, requestRegion, isEURequest, variable.geoRegions)) {
|
|
1563
|
-
logger.log('GEO request region does not match the filter,
|
|
1565
|
+
logger.log('GEO request region does not match the filter, skipping');
|
|
1564
1566
|
continue;
|
|
1565
1567
|
}
|
|
1566
1568
|
const payload = ((_a = conversion === null || conversion === void 0 ? void 0 : conversion.providers) === null || _a === void 0 ? void 0 : _a.length) === 0 ||
|
|
@@ -1578,6 +1580,10 @@ const processTag = (destination, eventName, data = {}, providers, options) => {
|
|
|
1578
1580
|
manifestVariables: variable.variableSet,
|
|
1579
1581
|
executionContext,
|
|
1580
1582
|
destination,
|
|
1583
|
+
geoCountry: requestCountry,
|
|
1584
|
+
geoRegion: requestRegion,
|
|
1585
|
+
isEURequest,
|
|
1586
|
+
ip,
|
|
1581
1587
|
});
|
|
1582
1588
|
}
|
|
1583
1589
|
providerData[pkg.name] = result;
|
|
@@ -1732,6 +1738,7 @@ const processConsent = (destination, consent, consentCategories, options) => {
|
|
|
1732
1738
|
const requestCountry = getSetting(destination, 'geoCountry') || null;
|
|
1733
1739
|
const requestRegion = getSetting(destination, 'geoRegion') || null;
|
|
1734
1740
|
const isEURequest = getSetting(destination, 'isEURequest') || false;
|
|
1741
|
+
const ip = getSetting(destination, 'ip') || null;
|
|
1735
1742
|
const consentSettings = getSetting(destination, 'consentSetting');
|
|
1736
1743
|
/* Calling Init for all provider instances based on consent check */
|
|
1737
1744
|
for (const pkg of providerPackages) {
|
|
@@ -1773,6 +1780,10 @@ const processConsent = (destination, consent, consentCategories, options) => {
|
|
|
1773
1780
|
categories: { ...consentCategories, necessary: true },
|
|
1774
1781
|
consentSettings,
|
|
1775
1782
|
},
|
|
1783
|
+
geoCountry: requestCountry,
|
|
1784
|
+
geoRegion: requestRegion,
|
|
1785
|
+
isEURequest,
|
|
1786
|
+
ip,
|
|
1776
1787
|
});
|
|
1777
1788
|
}
|
|
1778
1789
|
}
|
|
@@ -1996,6 +2007,10 @@ const handleManifest = (destination, response) => {
|
|
|
1996
2007
|
categories: response.consentCategories,
|
|
1997
2008
|
consentSettings: response.consentSetting,
|
|
1998
2009
|
},
|
|
2010
|
+
geoCountry: response.geoCountry,
|
|
2011
|
+
geoRegion: response.geoRegion,
|
|
2012
|
+
isEURequest: response.isEURequest,
|
|
2013
|
+
ip: response.ip,
|
|
1999
2014
|
});
|
|
2000
2015
|
}
|
|
2001
2016
|
}
|
|
@@ -2140,6 +2155,7 @@ const handleInit = (preferences) => {
|
|
|
2140
2155
|
consentSetting: result.consentSetting,
|
|
2141
2156
|
configuratorSetting: result.configuratorSetting,
|
|
2142
2157
|
userProperties: result.userProperties,
|
|
2158
|
+
ip: result.ip,
|
|
2143
2159
|
});
|
|
2144
2160
|
if (result.storageId != null) {
|
|
2145
2161
|
savePerKey(preferences.edgeURL, 'local', tagStorage, result.storageId, storageIdKey);
|
package/index.mjs
CHANGED
|
@@ -851,6 +851,7 @@ const initSettings = (destination, options) => {
|
|
|
851
851
|
geoCountry: (_e = existing === null || existing === void 0 ? void 0 : existing.geoCountry) !== null && _e !== void 0 ? _e : null,
|
|
852
852
|
geoRegion: (_f = existing === null || existing === void 0 ? void 0 : existing.geoRegion) !== null && _f !== void 0 ? _f : null,
|
|
853
853
|
isEURequest: (_g = existing === null || existing === void 0 ? void 0 : existing.isEURequest) !== null && _g !== void 0 ? _g : false,
|
|
854
|
+
ip: (existing === null || existing === void 0 ? void 0 : existing.ip) || null,
|
|
854
855
|
consentSetting: (_h = existing === null || existing === void 0 ? void 0 : existing.consentSetting) !== null && _h !== void 0 ? _h : {
|
|
855
856
|
enabled: false,
|
|
856
857
|
channels: {},
|
|
@@ -1303,7 +1304,7 @@ const getStandardPayload = (destination, payload) => {
|
|
|
1303
1304
|
referrer: getReferrer(destination),
|
|
1304
1305
|
search: getSearch(destination),
|
|
1305
1306
|
locale: getLocale(),
|
|
1306
|
-
sdkVersion: "1.
|
|
1307
|
+
sdkVersion: "1.41.0" ,
|
|
1307
1308
|
...(payload || {}),
|
|
1308
1309
|
};
|
|
1309
1310
|
let storage = {};
|
|
@@ -1517,6 +1518,7 @@ const processTag = (destination, eventName, data = {}, providers, options) => {
|
|
|
1517
1518
|
const consentCategory = getConsentCategories(destination);
|
|
1518
1519
|
const consentSettings = getSetting(destination, 'consentSetting');
|
|
1519
1520
|
const userConsent = { consentChannel, consentCategory, consentSettings };
|
|
1521
|
+
const ip = getSetting(destination, 'ip') || null;
|
|
1520
1522
|
const userProperties = getSetting(destination, 'userProperties');
|
|
1521
1523
|
if (skipZeroPurchaseEvent && isZeroPurchaseEvent({ eventName, data })) {
|
|
1522
1524
|
return;
|
|
@@ -1558,7 +1560,7 @@ const processTag = (destination, eventName, data = {}, providers, options) => {
|
|
|
1558
1560
|
continue;
|
|
1559
1561
|
}
|
|
1560
1562
|
if (!doesGeoRequestMatchList(requestCountry, requestRegion, isEURequest, variable.geoRegions)) {
|
|
1561
|
-
logger.log('GEO request region does not match the filter,
|
|
1563
|
+
logger.log('GEO request region does not match the filter, skipping');
|
|
1562
1564
|
continue;
|
|
1563
1565
|
}
|
|
1564
1566
|
const payload = ((_a = conversion === null || conversion === void 0 ? void 0 : conversion.providers) === null || _a === void 0 ? void 0 : _a.length) === 0 ||
|
|
@@ -1576,6 +1578,10 @@ const processTag = (destination, eventName, data = {}, providers, options) => {
|
|
|
1576
1578
|
manifestVariables: variable.variableSet,
|
|
1577
1579
|
executionContext,
|
|
1578
1580
|
destination,
|
|
1581
|
+
geoCountry: requestCountry,
|
|
1582
|
+
geoRegion: requestRegion,
|
|
1583
|
+
isEURequest,
|
|
1584
|
+
ip,
|
|
1579
1585
|
});
|
|
1580
1586
|
}
|
|
1581
1587
|
providerData[pkg.name] = result;
|
|
@@ -1730,6 +1736,7 @@ const processConsent = (destination, consent, consentCategories, options) => {
|
|
|
1730
1736
|
const requestCountry = getSetting(destination, 'geoCountry') || null;
|
|
1731
1737
|
const requestRegion = getSetting(destination, 'geoRegion') || null;
|
|
1732
1738
|
const isEURequest = getSetting(destination, 'isEURequest') || false;
|
|
1739
|
+
const ip = getSetting(destination, 'ip') || null;
|
|
1733
1740
|
const consentSettings = getSetting(destination, 'consentSetting');
|
|
1734
1741
|
/* Calling Init for all provider instances based on consent check */
|
|
1735
1742
|
for (const pkg of providerPackages) {
|
|
@@ -1771,6 +1778,10 @@ const processConsent = (destination, consent, consentCategories, options) => {
|
|
|
1771
1778
|
categories: { ...consentCategories, necessary: true },
|
|
1772
1779
|
consentSettings,
|
|
1773
1780
|
},
|
|
1781
|
+
geoCountry: requestCountry,
|
|
1782
|
+
geoRegion: requestRegion,
|
|
1783
|
+
isEURequest,
|
|
1784
|
+
ip,
|
|
1774
1785
|
});
|
|
1775
1786
|
}
|
|
1776
1787
|
}
|
|
@@ -1994,6 +2005,10 @@ const handleManifest = (destination, response) => {
|
|
|
1994
2005
|
categories: response.consentCategories,
|
|
1995
2006
|
consentSettings: response.consentSetting,
|
|
1996
2007
|
},
|
|
2008
|
+
geoCountry: response.geoCountry,
|
|
2009
|
+
geoRegion: response.geoRegion,
|
|
2010
|
+
isEURequest: response.isEURequest,
|
|
2011
|
+
ip: response.ip,
|
|
1997
2012
|
});
|
|
1998
2013
|
}
|
|
1999
2014
|
}
|
|
@@ -2138,6 +2153,7 @@ const handleInit = (preferences) => {
|
|
|
2138
2153
|
consentSetting: result.consentSetting,
|
|
2139
2154
|
configuratorSetting: result.configuratorSetting,
|
|
2140
2155
|
userProperties: result.userProperties,
|
|
2156
|
+
ip: result.ip,
|
|
2141
2157
|
});
|
|
2142
2158
|
if (result.storageId != null) {
|
|
2143
2159
|
savePerKey(preferences.edgeURL, 'local', tagStorage, result.storageId, storageIdKey);
|
package/internal.d.ts
CHANGED