pb-sxp-ui 1.15.18 → 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.
package/dist/pb-ui.js CHANGED
@@ -999,13 +999,18 @@
999
999
  return uri + separator + key + '=' + value;
1000
1000
  }
1001
1001
  }
1002
- if (eventName === 'PageView') {
1002
+ if (eventName === 'PageView' && (pixelEventParamsJson === null || pixelEventParamsJson === void 0 ? void 0 : pixelEventParamsJson.event_name) === 'PageView') {
1003
1003
  const currentUrl = window.location.href;
1004
1004
  const newUrl = updateQueryStringParameter(currentUrl, 'timestamp', Date.now());
1005
1005
  history.pushState({ path: newUrl }, '', newUrl);
1006
1006
  }
1007
- const body = getEventParamsByJson(pixelEventParamsJson);
1008
- window === null || window === void 0 ? void 0 : window.fbq('track', pixelEventParamsJson === null || pixelEventParamsJson === void 0 ? void 0 : pixelEventParamsJson.event_name, body);
1007
+ else {
1008
+ const body = getEventParamsByJson(pixelEventParamsJson);
1009
+ window === null || window === void 0 ? void 0 : window.fbq('track', pixelEventParamsJson === null || pixelEventParamsJson === void 0 ? void 0 : pixelEventParamsJson.event_name, body);
1010
+ if (eventName === 'PageView' && typeof (window === null || window === void 0 ? void 0 : window.gtag) === 'function') {
1011
+ window === null || window === void 0 ? void 0 : window.gtag('event', 'page_view');
1012
+ }
1013
+ }
1009
1014
  }
1010
1015
  else if (eventName === 'PageView' && typeof (window === null || window === void 0 ? void 0 : window.gtag) === 'function') {
1011
1016
  window === null || window === void 0 ? void 0 : window.gtag('event', 'page_view');