통합로그 : 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

@@ -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,