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