pb-sxp-ui 1.15.31 → 1.15.32
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 +9 -7
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +9 -7
- 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 +9 -7
- 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 +9 -7
- package/lib/core/context/SxpDataSourceProvider.js +9 -7
- package/package.json +1 -1
package/dist/index.js
CHANGED
@@ -998,7 +998,7 @@ const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent
|
|
998
998
|
return jsonParams;
|
999
999
|
}, [fakeUserId]);
|
1000
1000
|
const bffFbReport = useCallback(({ eventName, product }) => {
|
1001
|
-
var _a, _b, _c, _d, _e, _f;
|
1001
|
+
var _a, _b, _c, _d, _e, _f, _g, _h;
|
1002
1002
|
if (!enableReportEvent || (globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.enablePreview)) {
|
1003
1003
|
return;
|
1004
1004
|
}
|
@@ -1031,25 +1031,27 @@ const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent
|
|
1031
1031
|
window === null || window === void 0 ? void 0 : window.gtag('event', 'page_view');
|
1032
1032
|
}
|
1033
1033
|
const tiktokPixelEventParamsJson = (_b = globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.tiktokPixel) === null || _b === void 0 ? void 0 : _b[eventName];
|
1034
|
-
if ((tiktokPixelEventParamsJson === null || tiktokPixelEventParamsJson === void 0 ? void 0 : tiktokPixelEventParamsJson.event_name) &&
|
1035
|
-
window === null || window === void 0 ? void 0 : window.ttq
|
1034
|
+
if ((tiktokPixelEventParamsJson === null || tiktokPixelEventParamsJson === void 0 ? void 0 : tiktokPixelEventParamsJson.event_name) &&
|
1035
|
+
typeof (window === null || window === void 0 ? void 0 : window.ttq) === 'object' &&
|
1036
|
+
typeof ((_c = window === null || window === void 0 ? void 0 : window.ttq) === null || _c === void 0 ? void 0 : _c.track) === 'function') {
|
1037
|
+
(_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);
|
1036
1038
|
}
|
1037
|
-
const snapchatPixelEventParamsJson = (
|
1039
|
+
const snapchatPixelEventParamsJson = (_e = globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.snapchatPixel) === null || _e === void 0 ? void 0 : _e[eventName];
|
1038
1040
|
if ((snapchatPixelEventParamsJson === null || snapchatPixelEventParamsJson === void 0 ? void 0 : snapchatPixelEventParamsJson.event_name) && typeof (window === null || window === void 0 ? void 0 : window.snaptr) === 'function') {
|
1039
1041
|
window === null || window === void 0 ? void 0 : window.snaptr('track', snapchatPixelEventParamsJson === null || snapchatPixelEventParamsJson === void 0 ? void 0 : snapchatPixelEventParamsJson.event_name, snapchatPixelEventParamsJson);
|
1040
1042
|
}
|
1041
|
-
const converApiEventParamsJson = (
|
1043
|
+
const converApiEventParamsJson = (_f = globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.converApi) === null || _f === void 0 ? void 0 : _f[eventName];
|
1042
1044
|
if (enabledMetaConversionApi && converApiEventParamsJson) {
|
1043
1045
|
const body = getEventParamsByJson(converApiEventParamsJson, product);
|
1044
1046
|
const params = {};
|
1045
1047
|
const queryString = location.search.slice(1);
|
1046
|
-
(
|
1048
|
+
(_g = splitUrlParams(queryString)) === null || _g === void 0 ? void 0 : _g.forEach((val) => {
|
1047
1049
|
const key = val.split('=')[0];
|
1048
1050
|
const value = val.split('=')[1];
|
1049
1051
|
params[key] = value;
|
1050
1052
|
});
|
1051
1053
|
const cl_source = params === null || params === void 0 ? void 0 : params.cl_source;
|
1052
|
-
bffFetch === null || bffFetch === void 0 ? void 0 : bffFetch(`v2/fb/${(
|
1054
|
+
bffFetch === null || bffFetch === void 0 ? void 0 : bffFetch(`v2/fb/${(_h = bffDataSource === null || bffDataSource === void 0 ? void 0 : bffDataSource.headers) === null || _h === void 0 ? void 0 : _h['x-app-id']}/${eventName}${cl_source ? `/${decodeURIComponent(cl_source)}` : ''}`, {
|
1053
1055
|
method: 'POST',
|
1054
1056
|
body,
|
1055
1057
|
type: 'beacon'
|