pb-sxp-ui 1.15.29 → 1.15.31
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
package/dist/pb-ui.js
CHANGED
@@ -1013,7 +1013,7 @@
|
|
1013
1013
|
return jsonParams;
|
1014
1014
|
}, [fakeUserId]);
|
1015
1015
|
const bffFbReport = React.useCallback(({ eventName, product }) => {
|
1016
|
-
var _a, _b, _c, _d;
|
1016
|
+
var _a, _b, _c, _d, _e, _f;
|
1017
1017
|
if (!enableReportEvent || (globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.enablePreview)) {
|
1018
1018
|
return;
|
1019
1019
|
}
|
@@ -1045,18 +1045,26 @@
|
|
1045
1045
|
else if (eventName === 'PageView' && typeof (window === null || window === void 0 ? void 0 : window.gtag) === 'function') {
|
1046
1046
|
window === null || window === void 0 ? void 0 : window.gtag('event', 'page_view');
|
1047
1047
|
}
|
1048
|
-
const
|
1048
|
+
const tiktokPixelEventParamsJson = (_b = globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.tiktokPixel) === null || _b === void 0 ? void 0 : _b[eventName];
|
1049
|
+
if ((tiktokPixelEventParamsJson === null || tiktokPixelEventParamsJson === void 0 ? void 0 : tiktokPixelEventParamsJson.event_name) && typeof (window === null || window === void 0 ? void 0 : window.ttq) === 'function') {
|
1050
|
+
window === null || window === void 0 ? void 0 : window.ttq.track(tiktokPixelEventParamsJson === null || tiktokPixelEventParamsJson === void 0 ? void 0 : tiktokPixelEventParamsJson.event_name, tiktokPixelEventParamsJson);
|
1051
|
+
}
|
1052
|
+
const snapchatPixelEventParamsJson = (_c = globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.snapchatPixel) === null || _c === void 0 ? void 0 : _c[eventName];
|
1053
|
+
if ((snapchatPixelEventParamsJson === null || snapchatPixelEventParamsJson === void 0 ? void 0 : snapchatPixelEventParamsJson.event_name) && typeof (window === null || window === void 0 ? void 0 : window.snaptr) === 'function') {
|
1054
|
+
window === null || window === void 0 ? void 0 : window.snaptr('track', snapchatPixelEventParamsJson === null || snapchatPixelEventParamsJson === void 0 ? void 0 : snapchatPixelEventParamsJson.event_name, snapchatPixelEventParamsJson);
|
1055
|
+
}
|
1056
|
+
const converApiEventParamsJson = (_d = globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.converApi) === null || _d === void 0 ? void 0 : _d[eventName];
|
1049
1057
|
if (enabledMetaConversionApi && converApiEventParamsJson) {
|
1050
1058
|
const body = getEventParamsByJson(converApiEventParamsJson, product);
|
1051
1059
|
const params = {};
|
1052
1060
|
const queryString = location.search.slice(1);
|
1053
|
-
(
|
1061
|
+
(_e = splitUrlParams(queryString)) === null || _e === void 0 ? void 0 : _e.forEach((val) => {
|
1054
1062
|
const key = val.split('=')[0];
|
1055
1063
|
const value = val.split('=')[1];
|
1056
1064
|
params[key] = value;
|
1057
1065
|
});
|
1058
1066
|
const cl_source = params === null || params === void 0 ? void 0 : params.cl_source;
|
1059
|
-
bffFetch === null || bffFetch === void 0 ? void 0 : bffFetch(`v2/fb/${(
|
1067
|
+
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)}` : ''}`, {
|
1060
1068
|
method: 'POST',
|
1061
1069
|
body,
|
1062
1070
|
type: 'beacon'
|