통합로그 피드백 - AL_BANNER_CLICK 배너클릭시 로그 호출

This commit is contained in:
opacity@t-win.kr
2025-07-15 15:06:14 +09:00
parent ae089a855e
commit 1f4a0b528c
2 changed files with 12 additions and 10 deletions

View File

@@ -618,6 +618,7 @@ export const LOG_MESSAGE_ID = {
VIEW_CHANGE: "AL_VIEW_CHANGE",
HOME: "AL_HOME_SHOWN",
BANNER: "AL_BANNER_SHOWN",
BANNER_CLICK: "AL_BANNER_CLICK",
PINCODE: "AL_PINCODE_BUTTON",
CONTENTCLICK: "AL_PAGE_CONTENT_CLICK",
SHOWVIEW: "AL_SHOW_VIEW_CHANGE",

View File

@@ -143,14 +143,14 @@ export default function RandomUnit({
return {};
}, [shptmTmplCd]);
const sendBannerLog = useCallback(() => {
const sendBannerLog = useCallback((bannerClick) => {
const data = randomDataRef.current;
if (data && nowMenu === LOG_MENU.HOME_TOP) {
dispatch(
sendLogTotalRecommend({
contextName: LOG_CONTEXT_NAME.HOME,
messageId: LOG_MESSAGE_ID.BANNER,
messageId: bannerClick ? LOG_MESSAGE_ID.BANNER_CLICK : LOG_MESSAGE_ID.BANNER,
curationId,
curationTitle,
contentType: data.shptmBanrTpNm,
@@ -166,7 +166,7 @@ export default function RandomUnit({
}),
);
}
}, [randomDataRef, nowMenu]);
}, [dispatch, nowMenu, curationId, curationTitle]);
// 1. 비디오(live) 에러 감지
// 2. 라이브 영상이 2개 이상이면, 그 다음 영상으로 전환
@@ -354,7 +354,7 @@ export default function RandomUnit({
let action = linkType === "DSP00507" ? startVideoPlayer : pushPanel;
dispatch(action(linkInfo));
sendBannerLog();
sendBannerLog(true);
dispatch(
sendLogTopContents({
...topContentsLogInfo,
@@ -372,6 +372,7 @@ export default function RandomUnit({
randomData?.showId,
randomData?.shptmLnkTpCd,
topContentsLogInfo,
sendBannerLog,
]);
// 투데이즈딜 클릭
@@ -386,7 +387,7 @@ export default function RandomUnit({
}),
);
sendBannerLog();
sendBannerLog(true);
dispatch(
sendLogTopContents({
@@ -399,8 +400,8 @@ export default function RandomUnit({
dispatch,
randomData?.patnrId,
randomData?.prdtId,
randomDataRef,
topContentsLogInfo,
sendBannerLog,
]);
// 비디오 클릭
@@ -435,7 +436,7 @@ export default function RandomUnit({
}),
);
sendBannerLog();
sendBannerLog(true);
dispatch(
sendLogTopContents({
@@ -446,7 +447,7 @@ export default function RandomUnit({
);
onBlur();
}, [randomData, spotlightId, topContentsLogInfo, nowMenu, randomDataRef]);
}, [randomData, spotlightId, topContentsLogInfo, nowMenu, randomDataRef, sendBannerLog, onBlur]);
// 투데이즈 딜 가격 정보
const { originalPrice, discountedPrice, discountRate, offerInfo } =
@@ -472,8 +473,8 @@ export default function RandomUnit({
//통합로그
useEffect(() => {
sendBannerLog();
}, [randomDataRef, nowMenu]);
sendBannerLog(false);
}, [sendBannerLog]);
useEffect(() => {
if (bannerData) {