[통합로그API No.23] MyOrder 특정 버튼 클릭 시 버튼의 로그 정보 수집
This commit is contained in:
@@ -34,6 +34,7 @@ import {
|
||||
import {
|
||||
sendLogOrderBtnClick,
|
||||
sendLogOrderChange,
|
||||
sendLogTotalRecommend,
|
||||
} from "../../../../actions/logActions";
|
||||
// getMyinfoOrderSearch : 회원 주문 정보 조회
|
||||
// getMyinfoOrderDetailSearch : 회원 주문 상세 정보 조회 - 디테일
|
||||
@@ -264,6 +265,19 @@ export default function MyOrders({ title, panelInfo, isOnTop }) {
|
||||
};
|
||||
}, []);
|
||||
|
||||
const sendLogButtonClick = useCallback(
|
||||
(buttonName, tabName) => {
|
||||
const params = {
|
||||
contextName: Config.LOG_CONTEXT_NAME.MYORDER,
|
||||
messageId: Config.LOG_MESSAGE_ID.BUTTONCLICK,
|
||||
tabTitle: tabName ? tabName : buttonTabList[selectedTab],
|
||||
buttonTitle: buttonName,
|
||||
};
|
||||
|
||||
dispatch(sendLogTotalRecommend(params));
|
||||
},
|
||||
[dispatch, buttonTabList, selectedTab]
|
||||
);
|
||||
const handleButtonTabClick = useCallback(
|
||||
({ index, ...rest }) => {
|
||||
if (index === selectedTab) {
|
||||
@@ -275,6 +289,8 @@ export default function MyOrders({ title, panelInfo, isOnTop }) {
|
||||
if (cbChangePageRef.current) {
|
||||
cbChangePageRef.current(0, false, false);
|
||||
}
|
||||
|
||||
sendLogButtonClick(buttonTabList[index], buttonTabList[index]);
|
||||
},
|
||||
[selectedTab]
|
||||
);
|
||||
@@ -320,6 +336,8 @@ export default function MyOrders({ title, panelInfo, isOnTop }) {
|
||||
|
||||
setContainerLastFocusedElement(null, [SpotlightIds.MY_PAGE_MY_ORDER_BOX]);
|
||||
Spotlight.focus("tab-" + selectedTab);
|
||||
|
||||
sendLogButtonClick("TOP");
|
||||
}, [selectedTab]);
|
||||
|
||||
const onScrollStop = useCallback((event) => {
|
||||
@@ -366,7 +384,9 @@ export default function MyOrders({ title, panelInfo, isOnTop }) {
|
||||
|
||||
const handleClosePopupBtn = useCallback(() => {
|
||||
dispatch(setHidePopup());
|
||||
}, [dispatch]);
|
||||
|
||||
sendLogButtonClick("POPUP CLOSE");
|
||||
}, [dispatch, buttonTabList, selectedTab]);
|
||||
|
||||
const onClickBuyAgain = useCallback(
|
||||
(ev) => {
|
||||
@@ -482,9 +502,13 @@ export default function MyOrders({ title, panelInfo, isOnTop }) {
|
||||
};
|
||||
}, [popup.secondaryPopup, popup.secondaryPopupVisible, preventKeyDown]);
|
||||
|
||||
const doSendLogOrderBtnClick = useCallback((btnNm) => {
|
||||
dispatch(sendLogOrderBtnClick({ btnNm }));
|
||||
}, []);
|
||||
const doSendLogOrderBtnClick = useCallback(
|
||||
(btnNm) => {
|
||||
dispatch(sendLogOrderBtnClick({ btnNm }));
|
||||
sendLogButtonClick(btnNm);
|
||||
},
|
||||
[buttonTabList, selectedTab]
|
||||
);
|
||||
|
||||
useEffect(() => {
|
||||
if (
|
||||
|
||||
@@ -162,7 +162,7 @@ export default function OrderListCardStatus({
|
||||
if (doSendLogOrderBtnClick) {
|
||||
doSendLogOrderBtnClick(
|
||||
cancelItem
|
||||
? LOG_STRING_CONF.VIEW_CANCELLATION_ITEM
|
||||
? LOG_STRING_CONF.VIEW_CANCELLATION_DETAILS
|
||||
: LOG_STRING_CONF.VIEW_ORDER_DETAILS
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user