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/index.cjs +8 -3
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +8 -3
- package/dist/index.js.map +1 -1
- package/dist/index.min.cjs +4 -4
- package/dist/index.min.cjs.map +1 -1
- package/dist/index.min.js +4 -4
- package/dist/index.min.js.map +1 -1
- package/dist/pb-ui.js +8 -3
- package/dist/pb-ui.js.map +1 -1
- package/dist/pb-ui.min.js +4 -4
- package/dist/pb-ui.min.js.map +1 -1
- package/es/core/context/SxpDataSourceProvider.js +8 -3
- package/lib/core/context/SxpDataSourceProvider.js +8 -3
- package/package.json +1 -1
@@ -366,13 +366,18 @@ const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent
|
|
366
366
|
return uri + separator + key + '=' + value;
|
367
367
|
}
|
368
368
|
}
|
369
|
-
if (eventName === '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
|
-
|
375
|
-
|
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 (eventName === '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
|
-
|
378
|
-
|
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');
|