pb-sxp-ui 1.15.32 → 1.15.33
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 +5 -0
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +5 -0
- 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 +5 -0
- 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 +5 -0
- package/lib/core/context/SxpDataSourceProvider.js +5 -0
- package/package.json +1 -1
@@ -49,6 +49,7 @@ const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent
|
|
49
49
|
const [playbookType, setPlaybookType] = useState();
|
50
50
|
const [chatlabsId, setChatlabsId] = useState();
|
51
51
|
const finalPageData = useMemo(() => pageData !== null && pageData !== void 0 ? pageData : data, [pageData, data]);
|
52
|
+
const pixelPvStatusRef = useRef(false);
|
52
53
|
const isShowConsent = useMemo(() => {
|
53
54
|
var _a, _b, _c, _d;
|
54
55
|
return (((((_d = (_c = (_b = (_a = globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.consent) === null || _a === void 0 ? void 0 : _a[0]) === null || _b === void 0 ? void 0 : _b.item) === null || _c === void 0 ? void 0 : _c.props) === null || _d === void 0 ? void 0 : _d.privacy_necessity) && !isAgreePolicy && !isEditor) || isOpenConsent) &&
|
@@ -397,6 +398,10 @@ const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent
|
|
397
398
|
}
|
398
399
|
}
|
399
400
|
if (eventName === 'PageView' && (pixelEventParamsJson === null || pixelEventParamsJson === void 0 ? void 0 : pixelEventParamsJson.event_name) === 'PageView') {
|
401
|
+
if (!pixelPvStatusRef.current) {
|
402
|
+
pixelPvStatusRef.current = true;
|
403
|
+
return;
|
404
|
+
}
|
400
405
|
const currentUrl = window.location.href;
|
401
406
|
const newUrl = updateQueryStringParameter(currentUrl, 'timestamp', Date.now());
|
402
407
|
history.pushState({ path: newUrl }, '', newUrl);
|
@@ -52,6 +52,7 @@ const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent
|
|
52
52
|
const [playbookType, setPlaybookType] = (0, react_1.useState)();
|
53
53
|
const [chatlabsId, setChatlabsId] = (0, react_1.useState)();
|
54
54
|
const finalPageData = (0, react_1.useMemo)(() => pageData !== null && pageData !== void 0 ? pageData : data, [pageData, data]);
|
55
|
+
const pixelPvStatusRef = (0, react_1.useRef)(false);
|
55
56
|
const isShowConsent = (0, react_1.useMemo)(() => {
|
56
57
|
var _a, _b, _c, _d;
|
57
58
|
return (((((_d = (_c = (_b = (_a = globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.consent) === null || _a === void 0 ? void 0 : _a[0]) === null || _b === void 0 ? void 0 : _b.item) === null || _c === void 0 ? void 0 : _c.props) === null || _d === void 0 ? void 0 : _d.privacy_necessity) && !isAgreePolicy && !isEditor) || isOpenConsent) &&
|
@@ -400,6 +401,10 @@ const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent
|
|
400
401
|
}
|
401
402
|
}
|
402
403
|
if (eventName === 'PageView' && (pixelEventParamsJson === null || pixelEventParamsJson === void 0 ? void 0 : pixelEventParamsJson.event_name) === 'PageView') {
|
404
|
+
if (!pixelPvStatusRef.current) {
|
405
|
+
pixelPvStatusRef.current = true;
|
406
|
+
return;
|
407
|
+
}
|
403
408
|
const currentUrl = window.location.href;
|
404
409
|
const newUrl = updateQueryStringParameter(currentUrl, 'timestamp', Date.now());
|
405
410
|
history.pushState({ path: newUrl }, '', newUrl);
|