pb-sxp-ui 1.15.29 → 1.15.30
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 +12 -4
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +12 -4
- 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 +12 -4
- 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/index.d.ts +2 -0
- package/es/core/context/SxpDataSourceProvider.js +12 -4
- package/lib/core/components/SxpPageRender/index.d.ts +2 -0
- package/lib/core/context/SxpDataSourceProvider.js +12 -4
- package/package.json +1 -1
@@ -380,7 +380,7 @@ const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent
|
|
380
380
|
return jsonParams;
|
381
381
|
}, [fakeUserId]);
|
382
382
|
const bffFbReport = useCallback(({ eventName, product }) => {
|
383
|
-
var _a, _b, _c, _d;
|
383
|
+
var _a, _b, _c, _d, _e, _f;
|
384
384
|
if (!enableReportEvent || (globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.enablePreview)) {
|
385
385
|
return;
|
386
386
|
}
|
@@ -412,18 +412,26 @@ const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent
|
|
412
412
|
else if (eventName === 'PageView' && typeof (window === null || window === void 0 ? void 0 : window.gtag) === 'function') {
|
413
413
|
window === null || window === void 0 ? void 0 : window.gtag('event', 'page_view');
|
414
414
|
}
|
415
|
-
const
|
415
|
+
const tiktokPixelEventParamsJson = (_b = globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.tiktokPixel) === null || _b === void 0 ? void 0 : _b[eventName];
|
416
|
+
if ((tiktokPixelEventParamsJson === null || tiktokPixelEventParamsJson === void 0 ? void 0 : tiktokPixelEventParamsJson.event_name) && typeof (window === null || window === void 0 ? void 0 : window.ttq) === 'function') {
|
417
|
+
window === null || window === void 0 ? void 0 : window.ttq.track(tiktokPixelEventParamsJson === null || tiktokPixelEventParamsJson === void 0 ? void 0 : tiktokPixelEventParamsJson.event_name, tiktokPixelEventParamsJson);
|
418
|
+
}
|
419
|
+
const snapchatPixelEventParamsJson = (_c = globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.tiktokPixel) === null || _c === void 0 ? void 0 : _c[eventName];
|
420
|
+
if ((snapchatPixelEventParamsJson === null || snapchatPixelEventParamsJson === void 0 ? void 0 : snapchatPixelEventParamsJson.event_name) && typeof (window === null || window === void 0 ? void 0 : window.snaptr) === 'function') {
|
421
|
+
window === null || window === void 0 ? void 0 : window.snaptr('track', snapchatPixelEventParamsJson === null || snapchatPixelEventParamsJson === void 0 ? void 0 : snapchatPixelEventParamsJson.event_name, snapchatPixelEventParamsJson);
|
422
|
+
}
|
423
|
+
const converApiEventParamsJson = (_d = globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.converApi) === null || _d === void 0 ? void 0 : _d[eventName];
|
416
424
|
if (enabledMetaConversionApi && converApiEventParamsJson) {
|
417
425
|
const body = getEventParamsByJson(converApiEventParamsJson, product);
|
418
426
|
const params = {};
|
419
427
|
const queryString = location.search.slice(1);
|
420
|
-
(
|
428
|
+
(_e = splitUrlParams(queryString)) === null || _e === void 0 ? void 0 : _e.forEach((val) => {
|
421
429
|
const key = val.split('=')[0];
|
422
430
|
const value = val.split('=')[1];
|
423
431
|
params[key] = value;
|
424
432
|
});
|
425
433
|
const cl_source = params === null || params === void 0 ? void 0 : params.cl_source;
|
426
|
-
bffFetch === null || bffFetch === void 0 ? void 0 : bffFetch(`v2/fb/${(
|
434
|
+
bffFetch === null || bffFetch === void 0 ? void 0 : bffFetch(`v2/fb/${(_f = bffDataSource === null || bffDataSource === void 0 ? void 0 : bffDataSource.headers) === null || _f === void 0 ? void 0 : _f['x-app-id']}/${eventName}${cl_source ? `/${decodeURIComponent(cl_source)}` : ''}`, {
|
427
435
|
method: 'POST',
|
428
436
|
body,
|
429
437
|
type: 'beacon'
|
@@ -383,7 +383,7 @@ const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent
|
|
383
383
|
return jsonParams;
|
384
384
|
}, [fakeUserId]);
|
385
385
|
const bffFbReport = (0, react_1.useCallback)(({ eventName, product }) => {
|
386
|
-
var _a, _b, _c, _d;
|
386
|
+
var _a, _b, _c, _d, _e, _f;
|
387
387
|
if (!enableReportEvent || (globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.enablePreview)) {
|
388
388
|
return;
|
389
389
|
}
|
@@ -415,18 +415,26 @@ const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent
|
|
415
415
|
else if (eventName === 'PageView' && typeof (window === null || window === void 0 ? void 0 : window.gtag) === 'function') {
|
416
416
|
window === null || window === void 0 ? void 0 : window.gtag('event', 'page_view');
|
417
417
|
}
|
418
|
-
const
|
418
|
+
const tiktokPixelEventParamsJson = (_b = globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.tiktokPixel) === null || _b === void 0 ? void 0 : _b[eventName];
|
419
|
+
if ((tiktokPixelEventParamsJson === null || tiktokPixelEventParamsJson === void 0 ? void 0 : tiktokPixelEventParamsJson.event_name) && typeof (window === null || window === void 0 ? void 0 : window.ttq) === 'function') {
|
420
|
+
window === null || window === void 0 ? void 0 : window.ttq.track(tiktokPixelEventParamsJson === null || tiktokPixelEventParamsJson === void 0 ? void 0 : tiktokPixelEventParamsJson.event_name, tiktokPixelEventParamsJson);
|
421
|
+
}
|
422
|
+
const snapchatPixelEventParamsJson = (_c = globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.tiktokPixel) === null || _c === void 0 ? void 0 : _c[eventName];
|
423
|
+
if ((snapchatPixelEventParamsJson === null || snapchatPixelEventParamsJson === void 0 ? void 0 : snapchatPixelEventParamsJson.event_name) && typeof (window === null || window === void 0 ? void 0 : window.snaptr) === 'function') {
|
424
|
+
window === null || window === void 0 ? void 0 : window.snaptr('track', snapchatPixelEventParamsJson === null || snapchatPixelEventParamsJson === void 0 ? void 0 : snapchatPixelEventParamsJson.event_name, snapchatPixelEventParamsJson);
|
425
|
+
}
|
426
|
+
const converApiEventParamsJson = (_d = globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.converApi) === null || _d === void 0 ? void 0 : _d[eventName];
|
419
427
|
if (enabledMetaConversionApi && converApiEventParamsJson) {
|
420
428
|
const body = getEventParamsByJson(converApiEventParamsJson, product);
|
421
429
|
const params = {};
|
422
430
|
const queryString = location.search.slice(1);
|
423
|
-
(
|
431
|
+
(_e = (0, tool_1.splitUrlParams)(queryString)) === null || _e === void 0 ? void 0 : _e.forEach((val) => {
|
424
432
|
const key = val.split('=')[0];
|
425
433
|
const value = val.split('=')[1];
|
426
434
|
params[key] = value;
|
427
435
|
});
|
428
436
|
const cl_source = params === null || params === void 0 ? void 0 : params.cl_source;
|
429
|
-
bffFetch === null || bffFetch === void 0 ? void 0 : bffFetch(`v2/fb/${(
|
437
|
+
bffFetch === null || bffFetch === void 0 ? void 0 : bffFetch(`v2/fb/${(_f = bffDataSource === null || bffDataSource === void 0 ? void 0 : bffDataSource.headers) === null || _f === void 0 ? void 0 : _f['x-app-id']}/${eventName}${cl_source ? `/${decodeURIComponent(cl_source)}` : ''}`, {
|
430
438
|
method: 'POST',
|
431
439
|
body,
|
432
440
|
type: 'beacon'
|