@blotoutio/edgetag-sdk-browser 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.
Files changed (2) hide show
  1. package/index.js +18 -2
  2. package/package.json +1 -1
package/index.js CHANGED
@@ -854,6 +854,7 @@
854
854
  geoCountry: (_e = existing === null || existing === void 0 ? void 0 : existing.geoCountry) !== null && _e !== void 0 ? _e : null,
855
855
  geoRegion: (_f = existing === null || existing === void 0 ? void 0 : existing.geoRegion) !== null && _f !== void 0 ? _f : null,
856
856
  isEURequest: (_g = existing === null || existing === void 0 ? void 0 : existing.isEURequest) !== null && _g !== void 0 ? _g : false,
857
+ ip: (existing === null || existing === void 0 ? void 0 : existing.ip) || null,
857
858
  consentSetting: (_h = existing === null || existing === void 0 ? void 0 : existing.consentSetting) !== null && _h !== void 0 ? _h : {
858
859
  enabled: false,
859
860
  channels: {},
@@ -1306,7 +1307,7 @@
1306
1307
  referrer: getReferrer(destination),
1307
1308
  search: getSearch(destination),
1308
1309
  locale: getLocale(),
1309
- sdkVersion: "1.40.1" ,
1310
+ sdkVersion: "1.41.0" ,
1310
1311
  ...(payload || {}),
1311
1312
  };
1312
1313
  let storage = {};
@@ -1520,6 +1521,7 @@
1520
1521
  const consentCategory = getConsentCategories(destination);
1521
1522
  const consentSettings = getSetting(destination, 'consentSetting');
1522
1523
  const userConsent = { consentChannel, consentCategory, consentSettings };
1524
+ const ip = getSetting(destination, 'ip') || null;
1523
1525
  const userProperties = getSetting(destination, 'userProperties');
1524
1526
  if (skipZeroPurchaseEvent && isZeroPurchaseEvent({ eventName, data })) {
1525
1527
  return;
@@ -1561,7 +1563,7 @@
1561
1563
  continue;
1562
1564
  }
1563
1565
  if (!doesGeoRequestMatchList(requestCountry, requestRegion, isEURequest, variable.geoRegions)) {
1564
- logger.log('GEO request region does not match the filter, skiping');
1566
+ logger.log('GEO request region does not match the filter, skipping');
1565
1567
  continue;
1566
1568
  }
1567
1569
  const payload = ((_a = conversion === null || conversion === void 0 ? void 0 : conversion.providers) === null || _a === void 0 ? void 0 : _a.length) === 0 ||
@@ -1579,6 +1581,10 @@
1579
1581
  manifestVariables: variable.variableSet,
1580
1582
  executionContext,
1581
1583
  destination,
1584
+ geoCountry: requestCountry,
1585
+ geoRegion: requestRegion,
1586
+ isEURequest,
1587
+ ip,
1582
1588
  });
1583
1589
  }
1584
1590
  providerData[pkg.name] = result;
@@ -1733,6 +1739,7 @@
1733
1739
  const requestCountry = getSetting(destination, 'geoCountry') || null;
1734
1740
  const requestRegion = getSetting(destination, 'geoRegion') || null;
1735
1741
  const isEURequest = getSetting(destination, 'isEURequest') || false;
1742
+ const ip = getSetting(destination, 'ip') || null;
1736
1743
  const consentSettings = getSetting(destination, 'consentSetting');
1737
1744
  /* Calling Init for all provider instances based on consent check */
1738
1745
  for (const pkg of providerPackages) {
@@ -1774,6 +1781,10 @@
1774
1781
  categories: { ...consentCategories, necessary: true },
1775
1782
  consentSettings,
1776
1783
  },
1784
+ geoCountry: requestCountry,
1785
+ geoRegion: requestRegion,
1786
+ isEURequest,
1787
+ ip,
1777
1788
  });
1778
1789
  }
1779
1790
  }
@@ -1997,6 +2008,10 @@
1997
2008
  categories: response.consentCategories,
1998
2009
  consentSettings: response.consentSetting,
1999
2010
  },
2011
+ geoCountry: response.geoCountry,
2012
+ geoRegion: response.geoRegion,
2013
+ isEURequest: response.isEURequest,
2014
+ ip: response.ip,
2000
2015
  });
2001
2016
  }
2002
2017
  }
@@ -2141,6 +2156,7 @@
2141
2156
  consentSetting: result.consentSetting,
2142
2157
  configuratorSetting: result.configuratorSetting,
2143
2158
  userProperties: result.userProperties,
2159
+ ip: result.ip,
2144
2160
  });
2145
2161
  if (result.storageId != null) {
2146
2162
  savePerKey(preferences.edgeURL, 'local', tagStorage, result.storageId, storageIdKey);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@blotoutio/edgetag-sdk-browser",
3
- "version": "1.40.1",
3
+ "version": "1.41.0",
4
4
  "description": "Browser SDK for EdgeTag",
5
5
  "author": "Blotout",
6
6
  "license": "MIT",