pb-sxp-ui 1.15.35 → 1.15.37
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 +14 -11
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +14 -11
- 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 +14 -11
- 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/components/SxpPageRender/ExpandableText.js +2 -0
- package/es/core/context/SxpDataSourceProvider.js +12 -11
- package/lib/core/components/SxpPageRender/ExpandableText.js +2 -0
- package/lib/core/context/SxpDataSourceProvider.js +12 -11
- package/package.json +1 -1
@@ -357,6 +357,7 @@ const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent
|
|
357
357
|
if (!enableReportEvent || (globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.enablePreview)) {
|
358
358
|
return;
|
359
359
|
}
|
360
|
+
let isPushState = false;
|
360
361
|
const pixelEventParamsJson = (_a = globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.pixel) === null || _a === void 0 ? void 0 : _a[eventName];
|
361
362
|
if ((pixelEventParamsJson === null || pixelEventParamsJson === void 0 ? void 0 : pixelEventParamsJson.event_name) && typeof (window === null || window === void 0 ? void 0 : window.fbq) === 'function') {
|
362
363
|
function updateQueryStringParameter(uri, key, value) {
|
@@ -377,24 +378,24 @@ const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent
|
|
377
378
|
const currentUrl = window.location.href;
|
378
379
|
const newUrl = updateQueryStringParameter(currentUrl, 'timestamp', Date.now());
|
379
380
|
history.pushState({ path: newUrl }, '', newUrl);
|
381
|
+
isPushState = true;
|
380
382
|
}
|
381
383
|
}
|
382
384
|
else {
|
383
385
|
const body = getEventParamsByJson(pixelEventParamsJson);
|
384
386
|
window === null || window === void 0 ? void 0 : window.fbq('track', pixelEventParamsJson === null || pixelEventParamsJson === void 0 ? void 0 : pixelEventParamsJson.event_name, body);
|
385
|
-
if (eventName === 'PageView' && typeof (window === null || window === void 0 ? void 0 : window.gtag) === 'function') {
|
386
|
-
window === null || window === void 0 ? void 0 : window.gtag('event', 'page_view');
|
387
|
-
}
|
388
387
|
}
|
389
388
|
}
|
390
|
-
|
391
|
-
window === null || window === void 0 ? void 0 : window.gtag
|
392
|
-
|
393
|
-
|
394
|
-
|
395
|
-
|
396
|
-
|
397
|
-
|
389
|
+
if (!isPushState) {
|
390
|
+
if (eventName === 'PageView' && typeof (window === null || window === void 0 ? void 0 : window.gtag) === 'function') {
|
391
|
+
window === null || window === void 0 ? void 0 : window.gtag('event', 'page_view');
|
392
|
+
}
|
393
|
+
const tiktokPixelEventParamsJson = (_b = globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.tiktokPixel) === null || _b === void 0 ? void 0 : _b[eventName];
|
394
|
+
if ((tiktokPixelEventParamsJson === null || tiktokPixelEventParamsJson === void 0 ? void 0 : tiktokPixelEventParamsJson.event_name) &&
|
395
|
+
typeof (window === null || window === void 0 ? void 0 : window.ttq) === 'object' &&
|
396
|
+
typeof ((_c = window === null || window === void 0 ? void 0 : window.ttq) === null || _c === void 0 ? void 0 : _c.track) === 'function') {
|
397
|
+
(_d = window === null || window === void 0 ? void 0 : window.ttq) === null || _d === void 0 ? void 0 : _d.track(tiktokPixelEventParamsJson === null || tiktokPixelEventParamsJson === void 0 ? void 0 : tiktokPixelEventParamsJson.event_name, tiktokPixelEventParamsJson);
|
398
|
+
}
|
398
399
|
}
|
399
400
|
const snapchatPixelEventParamsJson = (_e = globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.snapchatPixel) === null || _e === void 0 ? void 0 : _e[eventName];
|
400
401
|
if ((snapchatPixelEventParamsJson === null || snapchatPixelEventParamsJson === void 0 ? void 0 : snapchatPixelEventParamsJson.event_name) && typeof (window === null || window === void 0 ? void 0 : window.snaptr) === 'function') {
|
@@ -360,6 +360,7 @@ const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent
|
|
360
360
|
if (!enableReportEvent || (globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.enablePreview)) {
|
361
361
|
return;
|
362
362
|
}
|
363
|
+
let isPushState = false;
|
363
364
|
const pixelEventParamsJson = (_a = globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.pixel) === null || _a === void 0 ? void 0 : _a[eventName];
|
364
365
|
if ((pixelEventParamsJson === null || pixelEventParamsJson === void 0 ? void 0 : pixelEventParamsJson.event_name) && typeof (window === null || window === void 0 ? void 0 : window.fbq) === 'function') {
|
365
366
|
function updateQueryStringParameter(uri, key, value) {
|
@@ -380,24 +381,24 @@ const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent
|
|
380
381
|
const currentUrl = window.location.href;
|
381
382
|
const newUrl = updateQueryStringParameter(currentUrl, 'timestamp', Date.now());
|
382
383
|
history.pushState({ path: newUrl }, '', newUrl);
|
384
|
+
isPushState = true;
|
383
385
|
}
|
384
386
|
}
|
385
387
|
else {
|
386
388
|
const body = getEventParamsByJson(pixelEventParamsJson);
|
387
389
|
window === null || window === void 0 ? void 0 : window.fbq('track', pixelEventParamsJson === null || pixelEventParamsJson === void 0 ? void 0 : pixelEventParamsJson.event_name, body);
|
388
|
-
if (eventName === 'PageView' && typeof (window === null || window === void 0 ? void 0 : window.gtag) === 'function') {
|
389
|
-
window === null || window === void 0 ? void 0 : window.gtag('event', 'page_view');
|
390
|
-
}
|
391
390
|
}
|
392
391
|
}
|
393
|
-
|
394
|
-
window === null || window === void 0 ? void 0 : window.gtag
|
395
|
-
|
396
|
-
|
397
|
-
|
398
|
-
|
399
|
-
|
400
|
-
|
392
|
+
if (!isPushState) {
|
393
|
+
if (eventName === 'PageView' && typeof (window === null || window === void 0 ? void 0 : window.gtag) === 'function') {
|
394
|
+
window === null || window === void 0 ? void 0 : window.gtag('event', 'page_view');
|
395
|
+
}
|
396
|
+
const tiktokPixelEventParamsJson = (_b = globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.tiktokPixel) === null || _b === void 0 ? void 0 : _b[eventName];
|
397
|
+
if ((tiktokPixelEventParamsJson === null || tiktokPixelEventParamsJson === void 0 ? void 0 : tiktokPixelEventParamsJson.event_name) &&
|
398
|
+
typeof (window === null || window === void 0 ? void 0 : window.ttq) === 'object' &&
|
399
|
+
typeof ((_c = window === null || window === void 0 ? void 0 : window.ttq) === null || _c === void 0 ? void 0 : _c.track) === 'function') {
|
400
|
+
(_d = window === null || window === void 0 ? void 0 : window.ttq) === null || _d === void 0 ? void 0 : _d.track(tiktokPixelEventParamsJson === null || tiktokPixelEventParamsJson === void 0 ? void 0 : tiktokPixelEventParamsJson.event_name, tiktokPixelEventParamsJson);
|
401
|
+
}
|
401
402
|
}
|
402
403
|
const snapchatPixelEventParamsJson = (_e = globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.snapchatPixel) === null || _e === void 0 ? void 0 : _e[eventName];
|
403
404
|
if ((snapchatPixelEventParamsJson === null || snapchatPixelEventParamsJson === void 0 ? void 0 : snapchatPixelEventParamsJson.event_name) && typeof (window === null || window === void 0 ? void 0 : window.snaptr) === 'function') {
|