pb-sxp-ui 1.15.17 → 1.15.19

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.
@@ -366,13 +366,18 @@ const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent
366
366
  return uri + separator + key + '=' + value;
367
367
  }
368
368
  }
369
- if ((pixelEventParamsJson === null || pixelEventParamsJson === void 0 ? void 0 : pixelEventParamsJson.event_name) === 'PageView') {
369
+ if (eventName === 'PageView' && (pixelEventParamsJson === null || pixelEventParamsJson === void 0 ? void 0 : pixelEventParamsJson.event_name) === 'PageView') {
370
370
  const currentUrl = window.location.href;
371
371
  const newUrl = updateQueryStringParameter(currentUrl, 'timestamp', Date.now());
372
372
  history.pushState({ path: newUrl }, '', newUrl);
373
373
  }
374
- const body = getEventParamsByJson(pixelEventParamsJson);
375
- window === null || window === void 0 ? void 0 : window.fbq('track', pixelEventParamsJson === null || pixelEventParamsJson === void 0 ? void 0 : pixelEventParamsJson.event_name, body);
374
+ else {
375
+ const body = getEventParamsByJson(pixelEventParamsJson);
376
+ window === null || window === void 0 ? void 0 : window.fbq('track', pixelEventParamsJson === null || pixelEventParamsJson === void 0 ? void 0 : pixelEventParamsJson.event_name, body);
377
+ if (eventName === 'PageView' && typeof (window === null || window === void 0 ? void 0 : window.gtag) === 'function') {
378
+ window === null || window === void 0 ? void 0 : window.gtag('event', 'page_view');
379
+ }
380
+ }
376
381
  }
377
382
  else if (eventName === 'PageView' && typeof (window === null || window === void 0 ? void 0 : window.gtag) === 'function') {
378
383
  window === null || window === void 0 ? void 0 : window.gtag('event', 'page_view');
@@ -369,13 +369,18 @@ const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent
369
369
  return uri + separator + key + '=' + value;
370
370
  }
371
371
  }
372
- if ((pixelEventParamsJson === null || pixelEventParamsJson === void 0 ? void 0 : pixelEventParamsJson.event_name) === 'PageView') {
372
+ if (eventName === 'PageView' && (pixelEventParamsJson === null || pixelEventParamsJson === void 0 ? void 0 : pixelEventParamsJson.event_name) === 'PageView') {
373
373
  const currentUrl = window.location.href;
374
374
  const newUrl = updateQueryStringParameter(currentUrl, 'timestamp', Date.now());
375
375
  history.pushState({ path: newUrl }, '', newUrl);
376
376
  }
377
- const body = getEventParamsByJson(pixelEventParamsJson);
378
- window === null || window === void 0 ? void 0 : window.fbq('track', pixelEventParamsJson === null || pixelEventParamsJson === void 0 ? void 0 : pixelEventParamsJson.event_name, body);
377
+ else {
378
+ const body = getEventParamsByJson(pixelEventParamsJson);
379
+ window === null || window === void 0 ? void 0 : window.fbq('track', pixelEventParamsJson === null || pixelEventParamsJson === void 0 ? void 0 : pixelEventParamsJson.event_name, body);
380
+ if (eventName === 'PageView' && typeof (window === null || window === void 0 ? void 0 : window.gtag) === 'function') {
381
+ window === null || window === void 0 ? void 0 : window.gtag('event', 'page_view');
382
+ }
383
+ }
379
384
  }
380
385
  else if (eventName === 'PageView' && typeof (window === null || window === void 0 ? void 0 : window.gtag) === 'function') {
381
386
  window === null || window === void 0 ? void 0 : window.gtag('event', 'page_view');
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pb-sxp-ui",
3
- "version": "1.15.17",
3
+ "version": "1.15.19",
4
4
  "description": "React enterprise-class UI components",
5
5
  "main": "dist/index.cjs",
6
6
  "module": "dist/index.js",