통합로그 : home banner 클릭시 해당값 로그 호출

This commit is contained in:
opacity@t-win.kr
2025-09-02 15:16:05 +09:00
parent 769a2cebc3
commit 6def95216f
3 changed files with 52 additions and 46 deletions

View File

@@ -172,23 +172,27 @@ export default function RandomUnit({
};
if (data && nowMenu === LOG_MENU.HOME_TOP) {
dispatch(
sendLogTotalRecommend({
contextName: LOG_CONTEXT_NAME.HOME,
messageId: bannerClick
? LOG_MESSAGE_ID.BANNER_CLICK
: LOG_MESSAGE_ID.BANNER,
...newParams,
curationId,
curationTitle,
contentType: data.shptmBanrTpNm,
productId: data.prdtId,
productTitle: data.prdtNm,
partner: data.patncNm,
brand: data.brndNm, // <- 'brnad' 확인
location: bannerData.banrLctnNo,
})
);
const logParams = {
contextName: LOG_CONTEXT_NAME.HOME,
messageId: bannerClick
? LOG_MESSAGE_ID.BANNER_CLICK
: LOG_MESSAGE_ID.BANNER,
...newParams,
curationId,
curationTitle,
contentType: data.shptmBanrTpNm,
productId: data.prdtId,
productTitle: data.prdtNm,
partner: data.patncNm,
brand: data.brndNm, // <- 'brnad' 확인
location: bannerData.banrLctnNo,
};
dispatch(sendLogTotalRecommend(logParams));
if (bannerClick) {
console.log("###bannerClick", logParams);
} else {
console.log("###bannerShow", logParams);
}
}
},
[dispatch, nowMenu, curationId, curationTitle]
@@ -440,7 +444,6 @@ export default function RandomUnit({
const videoClick = useCallback(() => {
const lastFocusedTargetId = getContainerId(Spotlight.getCurrent());
const currentSpot = Spotlight.getCurrent();
if (lastFocusedTargetId) {
dispatch(
updateHomeInfo({
@@ -468,8 +471,6 @@ export default function RandomUnit({
})
);
sendBannerLog(true);
dispatch(
sendLogTopContents({
...topContentsLogInfo,
@@ -478,6 +479,7 @@ export default function RandomUnit({
})
);
sendBannerLog(true);
onBlur();
}, [
randomData,
@@ -513,7 +515,7 @@ export default function RandomUnit({
//통합로그
useEffect(() => {
sendBannerLog(false);
sendBannerLog();
}, [sendBannerLog]);
useEffect(() => {

View File

@@ -171,7 +171,6 @@ export default function RollingUnit({
return {};
}, [shptmTmplCd, startIndex]);
const sendBannerLog = useCallback(
(bannerClick) => {
const data = rollingDataRef.current[startIndex];
@@ -184,29 +183,33 @@ export default function RollingUnit({
bannerType: "Vertical",
};
if (rollingDataRef.current && nowMenu === LOG_MENU.HOME_TOP) {
dispatch(
sendLogTotalRecommend({
contextName: LOG_CONTEXT_NAME.HOME,
messageId: bannerClick
? LOG_MESSAGE_ID.BANNER_CLICK
: LOG_MESSAGE_ID.BANNER,
curationId: curationId,
curationTitle: curationTitle,
contentType: data.shptmBanrTpNm,
contentId: data.showId,
contentTitle: data.showNm,
productId: data.prdtId,
productTitle: data.prdtNm,
displayType: "button",
partner: data.patncNm,
brand: data.brndNm,
location: bannerData.banrLctnNo,
...newParams,
})
);
const logParams = {
contextName: LOG_CONTEXT_NAME.HOME,
messageId: bannerClick
? LOG_MESSAGE_ID.BANNER_CLICK
: LOG_MESSAGE_ID.BANNER,
curationId: curationId,
curationTitle: curationTitle,
contentType: data.shptmBanrTpNm,
contentId: data.showId,
contentTitle: data.showNm,
productId: data.prdtId,
productTitle: data.prdtNm,
displayType: "button",
partner: data.patncNm,
brand: data.brndNm,
location: bannerData.banrLctnNo,
...newParams,
};
dispatch(sendLogTotalRecommend(logParams));
if (bannerClick) {
console.log("###bannerClick", logParams);
} else {
console.log("###bannerShow", logParams);
}
}
},
[nowMenu, rollingDataRef]
[nowMenu, rollingDataRef, imageBannerClick]
);
useEffect(() => {
@@ -355,7 +358,7 @@ export default function RollingUnit({
if (bannerType === "Today's Deals") {
handlePushPanel(panel_names.DETAIL_PANEL, createPanelInfo(currentData));
sendBannerLog();
sendBannerLog(true);
dispatch(
sendLogTopContents({
...topContentsLogInfo,

View File

@@ -361,6 +361,8 @@ const PlayerPanel = ({
prevNowMenuRef.current = nowMenuRef.current;
return () => dispatch(sendLogGNB(prevNowMenuRef.current));
} else if (panelInfo?.modal) {
dispatch(sendLogGNB(entryMenu));
}
}, [panelInfo?.modal, panelInfo?.shptmBanrTpNm]);
@@ -400,7 +402,6 @@ const PlayerPanel = ({
logTemplateNo = Config.LOG_TP_NO.LIVE.ITEM_DETAIL;
setLogStatus((status) => ({ ...status, isDetailLiveLogReady: true }));
}
liveLogParamsRef.current = {
entryMenu: entryMenuRef.current,
lgCatCd: currentLiveShowInfo.catCd ?? "",
@@ -855,7 +856,6 @@ const PlayerPanel = ({
// ev?.preventDefault();
return;
}
if (panelInfo.modalContainerId && !panelInfo.modal) {
dispatch(
startVideoPlayer({
@@ -899,6 +899,7 @@ const PlayerPanel = ({
[
dispatch,
panelInfo,
nowMenu,
videoPlayer,
sideContentsVisible,
videoVerticalVisible,