@blotoutio/edgetag-sdk-js 1.61.2 → 1.62.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 (3) hide show
  1. package/index.cjs.js +28 -19
  2. package/index.mjs +28 -19
  3. package/package.json +1 -1
package/index.cjs.js CHANGED
@@ -1470,7 +1470,7 @@ const getStandardPayload = (destination, payload) => {
1470
1470
  referrer: getReferrer(destination),
1471
1471
  search: getSearch(destination),
1472
1472
  locale: getLocale(),
1473
- sdkVersion: "1.61.2" ,
1473
+ sdkVersion: "1.62.0" ,
1474
1474
  ...(payload || {}),
1475
1475
  };
1476
1476
  let storage = {};
@@ -1780,9 +1780,11 @@ const runPluginHook = async (plugins, hookName, pluginScopes, baseParams) => {
1780
1780
  if (result === null || result === void 0 ? void 0 : result.additionalEvents) {
1781
1781
  dispatchAdditionalEvents(plugin, pluginScopes, result.additionalEvents);
1782
1782
  }
1783
+ // Mark-and-continue, matching the edge (processPluginsChannel /
1784
+ // processPluginsInstance): a skip suppresses only the final tag; later
1785
+ // plugins still run and can fire their additionalEvents.
1783
1786
  if (result === null || result === void 0 ? void 0 : result.skipEvent) {
1784
1787
  skip = true;
1785
- break;
1786
1788
  }
1787
1789
  if ((_a = result === null || result === void 0 ? void 0 : result.payload) === null || _a === void 0 ? void 0 : _a.eventName) {
1788
1790
  currentEventName = result.payload.eventName;
@@ -2054,23 +2056,30 @@ const processTag = async (destination, eventName, data = {}, providers, options,
2054
2056
  ((_b = conversion === null || conversion === void 0 ? void 0 : conversion.providers) === null || _b === void 0 ? void 0 : _b.includes(providerId))
2055
2057
  ? conversion.payload
2056
2058
  : state.data;
2057
- result[variable.tagName] = pkg.tag({
2058
- userId,
2059
- sessionId,
2060
- eventName: state.eventName,
2061
- eventId,
2062
- data: jsonClone(payload),
2063
- sendTag: sendTag.bind(null, destination),
2064
- getEdgeData: processGetData.bind(null, destination),
2065
- manifestVariables: variable.variableSet,
2066
- executionContext,
2067
- destination,
2068
- geoCountry: requestCountry,
2069
- geoRegion: requestRegion,
2070
- isEURequest,
2071
- ip,
2072
- pageUrl: getPageUrl(destination),
2073
- });
2059
+ try {
2060
+ result[variable.tagName] = (await Promise.resolve(pkg.tag({
2061
+ userId,
2062
+ sessionId,
2063
+ eventName: state.eventName,
2064
+ eventId,
2065
+ data: jsonClone(payload),
2066
+ sendTag: sendTag.bind(null, destination),
2067
+ getEdgeData: processGetData.bind(null, destination),
2068
+ manifestVariables: variable.variableSet,
2069
+ executionContext,
2070
+ destination,
2071
+ geoCountry: requestCountry,
2072
+ geoRegion: requestRegion,
2073
+ isEURequest,
2074
+ ip,
2075
+ pageUrl: getPageUrl(destination),
2076
+ })));
2077
+ }
2078
+ catch (e) {
2079
+ // Isolate a provider failure so the remaining providers still run
2080
+ // and the server-side sendTag below still fires.
2081
+ logger.error(`Provider ${providerId} tag error (${variable.tagName}): ${e}`);
2082
+ }
2074
2083
  }
2075
2084
  if (Object.keys(result).length > 0) {
2076
2085
  providerData[providerId] = result;
package/index.mjs CHANGED
@@ -1468,7 +1468,7 @@ const getStandardPayload = (destination, payload) => {
1468
1468
  referrer: getReferrer(destination),
1469
1469
  search: getSearch(destination),
1470
1470
  locale: getLocale(),
1471
- sdkVersion: "1.61.2" ,
1471
+ sdkVersion: "1.62.0" ,
1472
1472
  ...(payload || {}),
1473
1473
  };
1474
1474
  let storage = {};
@@ -1778,9 +1778,11 @@ const runPluginHook = async (plugins, hookName, pluginScopes, baseParams) => {
1778
1778
  if (result === null || result === void 0 ? void 0 : result.additionalEvents) {
1779
1779
  dispatchAdditionalEvents(plugin, pluginScopes, result.additionalEvents);
1780
1780
  }
1781
+ // Mark-and-continue, matching the edge (processPluginsChannel /
1782
+ // processPluginsInstance): a skip suppresses only the final tag; later
1783
+ // plugins still run and can fire their additionalEvents.
1781
1784
  if (result === null || result === void 0 ? void 0 : result.skipEvent) {
1782
1785
  skip = true;
1783
- break;
1784
1786
  }
1785
1787
  if ((_a = result === null || result === void 0 ? void 0 : result.payload) === null || _a === void 0 ? void 0 : _a.eventName) {
1786
1788
  currentEventName = result.payload.eventName;
@@ -2052,23 +2054,30 @@ const processTag = async (destination, eventName, data = {}, providers, options,
2052
2054
  ((_b = conversion === null || conversion === void 0 ? void 0 : conversion.providers) === null || _b === void 0 ? void 0 : _b.includes(providerId))
2053
2055
  ? conversion.payload
2054
2056
  : state.data;
2055
- result[variable.tagName] = pkg.tag({
2056
- userId,
2057
- sessionId,
2058
- eventName: state.eventName,
2059
- eventId,
2060
- data: jsonClone(payload),
2061
- sendTag: sendTag.bind(null, destination),
2062
- getEdgeData: processGetData.bind(null, destination),
2063
- manifestVariables: variable.variableSet,
2064
- executionContext,
2065
- destination,
2066
- geoCountry: requestCountry,
2067
- geoRegion: requestRegion,
2068
- isEURequest,
2069
- ip,
2070
- pageUrl: getPageUrl(destination),
2071
- });
2057
+ try {
2058
+ result[variable.tagName] = (await Promise.resolve(pkg.tag({
2059
+ userId,
2060
+ sessionId,
2061
+ eventName: state.eventName,
2062
+ eventId,
2063
+ data: jsonClone(payload),
2064
+ sendTag: sendTag.bind(null, destination),
2065
+ getEdgeData: processGetData.bind(null, destination),
2066
+ manifestVariables: variable.variableSet,
2067
+ executionContext,
2068
+ destination,
2069
+ geoCountry: requestCountry,
2070
+ geoRegion: requestRegion,
2071
+ isEURequest,
2072
+ ip,
2073
+ pageUrl: getPageUrl(destination),
2074
+ })));
2075
+ }
2076
+ catch (e) {
2077
+ // Isolate a provider failure so the remaining providers still run
2078
+ // and the server-side sendTag below still fires.
2079
+ logger.error(`Provider ${providerId} tag error (${variable.tagName}): ${e}`);
2080
+ }
2072
2081
  }
2073
2082
  if (Object.keys(result).length > 0) {
2074
2083
  providerData[providerId] = result;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@blotoutio/edgetag-sdk-js",
3
- "version": "1.61.2",
3
+ "version": "1.62.0",
4
4
  "description": "JS SDK for EdgeTag",
5
5
  "author": "Blotout",
6
6
  "license": "MIT",