pb-sxp-ui 1.16.24-alpha.1 → 1.16.24

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/dist/index.js CHANGED
@@ -917,19 +917,19 @@ const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent
917
917
  originalOpen.apply(this, arguments);
918
918
  };
919
919
  XMLHttpRequest.prototype.send = function (body) {
920
+ var _a;
920
921
  if (this._url && typeof this._url === 'string' && this._url.includes('https://i.giesswein.com/nb-collector')) {
921
922
  if (body && typeof body === 'string') {
922
923
  try {
923
924
  const payload = JSON.parse(body);
924
925
  if (payload && Array.isArray(payload.data)) {
925
- payload.data.forEach((item) => {
926
- if (item && item.e) {
927
- bffCollectEvent({
928
- eventName: item.e,
929
- eventSource: 'Northbeam Pixel'
930
- });
931
- }
932
- });
926
+ const item = payload.data[((_a = payload.data) === null || _a === void 0 ? void 0 : _a.length) - 1];
927
+ if (item && item.e) {
928
+ bffCollectEvent({
929
+ eventName: item.e,
930
+ eventSource: 'Northbeam Pixel'
931
+ });
932
+ }
933
933
  }
934
934
  }
935
935
  catch (e) {
@@ -1226,7 +1226,6 @@ const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent
1226
1226
  window === null || window === void 0 ? void 0 : window.snaptr('track', snapchatPixelEventParamsJson === null || snapchatPixelEventParamsJson === void 0 ? void 0 : snapchatPixelEventParamsJson.event_name, getEventParamsByJson(snapchatPixelEventParamsJson, product));
1227
1227
  }
1228
1228
  if (eventName === 'PageView' && typeof (window === null || window === void 0 ? void 0 : window.Northbeam) === 'object' && typeof ((_f = window === null || window === void 0 ? void 0 : window.Northbeam) === null || _f === void 0 ? void 0 : _f.trackPageView) === 'function') {
1229
- console.log('-----------------trackPageView触发了------------------');
1230
1229
  (_g = window === null || window === void 0 ? void 0 : window.Northbeam) === null || _g === void 0 ? void 0 : _g.trackPageView();
1231
1230
  }
1232
1231
  const converApiEventParamsJson = (_h = globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.converApi) === null || _h === void 0 ? void 0 : _h[eventName];