[통합로그API No.8] Feafuredbrand 화면 내에서 shelf 상/하단 이동시 shelf 정보 수집 로그
This commit is contained in:
@@ -1599,7 +1599,7 @@ export const sendLogTotalRecommend = (params) => (dispatch, getState) => {
|
||||
|
||||
const logCreateTime = new Date().toISOString();
|
||||
|
||||
// console.log("#params", params);
|
||||
console.log("#params", params);
|
||||
|
||||
const newParams = {
|
||||
...params,
|
||||
|
||||
@@ -128,8 +128,6 @@ export default memo(function TItemCard({
|
||||
category: catNm,
|
||||
};
|
||||
dispatch(sendLogTotalRecommend(params));
|
||||
|
||||
console.log("#params", params);
|
||||
}
|
||||
},
|
||||
[onClick, disabled]
|
||||
|
||||
@@ -592,6 +592,7 @@ export const LOG_CONTEXT_NAME = {
|
||||
GNB: "shoptime.gnb",
|
||||
REMINDER: "shoptime.reminder",
|
||||
MYPAGE: "shoptime.mypage",
|
||||
FEATURED_BRANDS: "shoptime.featuredpartner",
|
||||
};
|
||||
|
||||
export const LOG_MESSAGE_ID = {
|
||||
|
||||
@@ -21,13 +21,14 @@ const FeaturedBestSeller = ({
|
||||
brandBestSellerInfo,
|
||||
handleItemFocus,
|
||||
order,
|
||||
shelfOrder,
|
||||
spotlightId,
|
||||
selectedPatnrId,
|
||||
}) => {
|
||||
const [firstChk, setFirstChk] = useState(0);
|
||||
|
||||
const _handleItemFocus = useCallback(() => {
|
||||
if (handleItemFocus) handleItemFocus(spotlightId);
|
||||
if (handleItemFocus) handleItemFocus(spotlightId, shelfOrder);
|
||||
|
||||
const c = Spotlight.getCurrent();
|
||||
if (firstChk === 0) {
|
||||
|
||||
@@ -27,7 +27,11 @@ import {
|
||||
getBrandTSVInfo,
|
||||
} from "../../actions/brandActions";
|
||||
import { changeAppStatus, setHidePopup } from "../../actions/commonActions";
|
||||
import { sendLogGNB, sendLogPartners } from "../../actions/logActions";
|
||||
import {
|
||||
sendLogGNB,
|
||||
sendLogPartners,
|
||||
sendLogTotalRecommend,
|
||||
} from "../../actions/logActions";
|
||||
import { setMainLiveUpcomingAlarm } from "../../actions/mainActions";
|
||||
import {
|
||||
deleteMyUpcomingAlertShow,
|
||||
@@ -41,7 +45,13 @@ import TPanel from "../../components/TPanel/TPanel";
|
||||
import TPopUp from "../../components/TPopUp/TPopUp";
|
||||
import TVerticalPagenator from "../../components/TVerticalPagenator/TVerticalPagenator";
|
||||
import usePrevious from "../../hooks/usePrevious";
|
||||
import { ACTIVE_POPUP, LOG_MENU, panel_names } from "../../utils/Config";
|
||||
import {
|
||||
ACTIVE_POPUP,
|
||||
LOG_CONTEXT_NAME,
|
||||
LOG_MENU,
|
||||
LOG_MESSAGE_ID,
|
||||
panel_names,
|
||||
} from "../../utils/Config";
|
||||
import { $L } from "../../utils/helperMethods";
|
||||
import { SpotlightIds } from "../../utils/SpotlightIds";
|
||||
import Banner from "./Banner/Banner";
|
||||
@@ -298,7 +308,7 @@ const FeaturedBrandsPanel = ({ isOnTop, panelInfo, spotlightId }) => {
|
||||
);
|
||||
|
||||
const doSendLogGNB = useCallback(
|
||||
(containerId) => {
|
||||
(containerId, shelfOrder) => {
|
||||
if (
|
||||
!selectedPatncNm ||
|
||||
!getMenuByContainerId(containerId) ||
|
||||
@@ -314,11 +324,23 @@ const FeaturedBrandsPanel = ({ isOnTop, panelInfo, spotlightId }) => {
|
||||
selectedBrand && currentShelf && `${selectedBrand} ${currentShelf}`;
|
||||
|
||||
dispatch(sendLogGNB(menu));
|
||||
|
||||
dispatch(
|
||||
sendLogTotalRecommend({
|
||||
contextName: LOG_CONTEXT_NAME.FEATURED_BRANDS,
|
||||
messageId: LOG_MESSAGE_ID.SHELF,
|
||||
partner: selectedPatncNm,
|
||||
shelfLocation: shelfOrder,
|
||||
shelfId: containerId,
|
||||
shelfTitle: currentShelf,
|
||||
})
|
||||
);
|
||||
|
||||
setIsLogGNBSent(true);
|
||||
prevSelectedPatncNmRef.current = selectedPatncNm;
|
||||
lastMenuRef.current = getMenuByContainerId(containerId);
|
||||
},
|
||||
[selectedPatncNm]
|
||||
[selectedPatncNm, sortedBrandLayoutInfo, selectedPatncNm]
|
||||
);
|
||||
|
||||
const focusOnMount = useCallback((targetId) => {
|
||||
@@ -331,7 +353,7 @@ const FeaturedBrandsPanel = ({ isOnTop, panelInfo, spotlightId }) => {
|
||||
}, []);
|
||||
|
||||
const handleItemFocus = useCallback(
|
||||
(containerId) => doSendLogGNB(containerId),
|
||||
(containerId, shelfOrder) => doSendLogGNB(containerId, shelfOrder),
|
||||
[doSendLogGNB]
|
||||
);
|
||||
|
||||
@@ -401,6 +423,7 @@ const FeaturedBrandsPanel = ({ isOnTop, panelInfo, spotlightId }) => {
|
||||
handleItemFocus={handleItemFocus}
|
||||
isOnTop={isOnTop}
|
||||
order={idx + 1}
|
||||
shelfOrder={el.expsOrd}
|
||||
spotlightId={TEMPLATE_CODE_CONF.LIVE_CHANNELS}
|
||||
selectedPatnrId={selectedPatnrId}
|
||||
/>
|
||||
@@ -421,6 +444,7 @@ const FeaturedBrandsPanel = ({ isOnTop, panelInfo, spotlightId }) => {
|
||||
brandLiveChannelUpcoming={brandLiveChannelUpcoming}
|
||||
handleItemFocus={handleItemFocus}
|
||||
order={idx + 1}
|
||||
shelfOrder={el.expsOrd}
|
||||
selectedPatnrId={selectedPatnrId}
|
||||
spotlightId={TEMPLATE_CODE_CONF.UP_COMING}
|
||||
/>
|
||||
@@ -442,6 +466,7 @@ const FeaturedBrandsPanel = ({ isOnTop, panelInfo, spotlightId }) => {
|
||||
handleItemFocus={handleItemFocus}
|
||||
hasQuickMenu={hasQuickMenu}
|
||||
order={idx + 1}
|
||||
shelfOrder={el.expsOrd}
|
||||
spotlightId={TEMPLATE_CODE_CONF.TODAYS_DEALS}
|
||||
/>
|
||||
)}
|
||||
@@ -461,6 +486,7 @@ const FeaturedBrandsPanel = ({ isOnTop, panelInfo, spotlightId }) => {
|
||||
brandBestSellerInfo={brandBestSellerInfo}
|
||||
handleItemFocus={handleItemFocus}
|
||||
order={idx + 1}
|
||||
shelfOrder={el.expsOrd}
|
||||
spotlightId={TEMPLATE_CODE_CONF.BEST_SELLER}
|
||||
selectedPatnrId={selectedPatnrId}
|
||||
/>
|
||||
@@ -487,6 +513,7 @@ const FeaturedBrandsPanel = ({ isOnTop, panelInfo, spotlightId }) => {
|
||||
fromQuickMenu={fromQuickMenu}
|
||||
handleItemFocus={handleItemFocus}
|
||||
order={idx + 1}
|
||||
shelfOrder={el.expsOrd}
|
||||
spotlightId={TEMPLATE_CODE_CONF.RECOMMENDED_SHOWS}
|
||||
selectedCatCd={selectedCatCd}
|
||||
selectedPatncNm={selectedPatncNm}
|
||||
@@ -514,6 +541,7 @@ const FeaturedBrandsPanel = ({ isOnTop, panelInfo, spotlightId }) => {
|
||||
fromQuickMenu={fromQuickMenu}
|
||||
handleItemFocus={handleItemFocus}
|
||||
order={idx + 1}
|
||||
shelfOrder={el.expsOrd}
|
||||
selectedHstNm={selectedHstNm}
|
||||
selectedPatncNm={selectedPatncNm}
|
||||
selectedPatnrId={selectedPatnrId}
|
||||
@@ -541,6 +569,7 @@ const FeaturedBrandsPanel = ({ isOnTop, panelInfo, spotlightId }) => {
|
||||
fromQuickMenu={fromQuickMenu}
|
||||
handleItemFocus={handleItemFocus}
|
||||
order={idx + 1}
|
||||
shelfOrder={el.expsOrd}
|
||||
spotlightId={TEMPLATE_CODE_CONF.SERIES}
|
||||
selectedPatncNm={selectedPatncNm}
|
||||
selectedPatnrId={selectedPatnrId}
|
||||
@@ -568,6 +597,7 @@ const FeaturedBrandsPanel = ({ isOnTop, panelInfo, spotlightId }) => {
|
||||
fromQuickMenu={fromQuickMenu}
|
||||
handleItemFocus={handleItemFocus}
|
||||
order={idx + 1}
|
||||
shelfOrder={el.expsOrd}
|
||||
spotlightId={TEMPLATE_CODE_CONF.CATEGORY}
|
||||
selectedCatCdLv1={selectedCatCdLv1}
|
||||
selectedCatCdLv2={selectedCatCdLv2}
|
||||
@@ -595,6 +625,7 @@ const FeaturedBrandsPanel = ({ isOnTop, panelInfo, spotlightId }) => {
|
||||
fromQuickMenu={fromQuickMenu}
|
||||
handleItemFocus={handleItemFocus}
|
||||
order={idx + 1}
|
||||
shelfOrder={el.expsOrd}
|
||||
selectedPatnrId={selectedPatnrId}
|
||||
selectedPatncNm={selectedPatncNm}
|
||||
spotlightId={TEMPLATE_CODE_CONF.SHOWROOM}
|
||||
|
||||
@@ -25,6 +25,7 @@ const FeaturedCategory = ({
|
||||
fromQuickMenu,
|
||||
handleItemFocus,
|
||||
order,
|
||||
shelfOrder,
|
||||
spotlightId,
|
||||
selectedCatCdLv1,
|
||||
selectedCatCdLv2,
|
||||
@@ -117,7 +118,7 @@ const FeaturedCategory = ({
|
||||
]);
|
||||
|
||||
const _handleItemFocus = useCallback(() => {
|
||||
if (handleItemFocus) handleItemFocus(spotlightId);
|
||||
if (handleItemFocus) handleItemFocus(spotlightId, shelfOrder);
|
||||
|
||||
const c = Spotlight.getCurrent();
|
||||
if (firstChk === 0) {
|
||||
|
||||
@@ -24,6 +24,7 @@ const FeaturedCreators = ({
|
||||
fromQuickMenu,
|
||||
handleItemFocus,
|
||||
order,
|
||||
shelfOrder,
|
||||
selectedHstNm,
|
||||
selectedPatncNm,
|
||||
selectedPatnrId,
|
||||
@@ -33,7 +34,7 @@ const FeaturedCreators = ({
|
||||
const [firstChk, setFirstChk] = useState(0);
|
||||
|
||||
const _handleItemFocus = useCallback(() => {
|
||||
if (handleItemFocus) handleItemFocus(spotlightId);
|
||||
if (handleItemFocus) handleItemFocus(spotlightId, shelfOrder);
|
||||
|
||||
const c = Spotlight.getCurrent();
|
||||
if (firstChk === 0) {
|
||||
|
||||
@@ -29,6 +29,7 @@ const LiveChannels = ({
|
||||
handleItemFocus,
|
||||
isOnTop,
|
||||
order,
|
||||
shelfOrder,
|
||||
selectedPatnrId,
|
||||
spotlightId,
|
||||
}) => {
|
||||
@@ -82,7 +83,7 @@ const LiveChannels = ({
|
||||
]);
|
||||
|
||||
const _handleItemFocus = useCallback(() => {
|
||||
if (handleItemFocus) handleItemFocus(spotlightId);
|
||||
if (handleItemFocus) handleItemFocus(spotlightId, shelfOrder);
|
||||
|
||||
const c = Spotlight.getCurrent();
|
||||
|
||||
|
||||
@@ -27,6 +27,7 @@ const RecommendedShows = ({
|
||||
fromQuickMenu,
|
||||
handleItemFocus,
|
||||
order,
|
||||
shelfOrder,
|
||||
spotlightId,
|
||||
selectedCatCd,
|
||||
selectedPatncNm,
|
||||
@@ -55,7 +56,7 @@ const RecommendedShows = ({
|
||||
);
|
||||
|
||||
const _handleItemFocus = useCallback(() => {
|
||||
if (handleItemFocus) handleItemFocus(spotlightId);
|
||||
if (handleItemFocus) handleItemFocus(spotlightId, shelfOrder);
|
||||
|
||||
const c = Spotlight.getCurrent();
|
||||
if (firstChk === 0) {
|
||||
|
||||
@@ -25,6 +25,7 @@ const Series = ({
|
||||
fromQuickMenu,
|
||||
handleItemFocus,
|
||||
order,
|
||||
shelfOrder,
|
||||
spotlightId,
|
||||
selectedPatncNm,
|
||||
selectedPatnrId,
|
||||
@@ -47,7 +48,7 @@ const Series = ({
|
||||
}, [brandSeriesGroupInfo, selectedSeriesId]);
|
||||
|
||||
const _handleItemFocus = useCallback(() => {
|
||||
if (handleItemFocus) handleItemFocus(spotlightId);
|
||||
if (handleItemFocus) handleItemFocus(spotlightId, shelfOrder);
|
||||
|
||||
const c = Spotlight.getCurrent();
|
||||
if (firstChk === 0) {
|
||||
|
||||
@@ -26,6 +26,7 @@ const Showroom = ({
|
||||
fromQuickMenu,
|
||||
handleItemFocus,
|
||||
order,
|
||||
shelfOrder,
|
||||
selectedPatnrId,
|
||||
selectedPatncNm,
|
||||
spotlightId,
|
||||
@@ -53,7 +54,7 @@ const Showroom = ({
|
||||
}, [brandShowroomInfo, panelInfo, selectedRoomId]);
|
||||
|
||||
const _handleItemFocus = useCallback(() => {
|
||||
if (handleItemFocus) handleItemFocus(spotlightId);
|
||||
if (handleItemFocus) handleItemFocus(spotlightId, shelfOrder);
|
||||
|
||||
const c = Spotlight.getCurrent();
|
||||
if (firstChk === 0) {
|
||||
|
||||
@@ -17,11 +17,17 @@ const Container = SpotlightContainerDecorator(
|
||||
"div"
|
||||
);
|
||||
|
||||
const TodaysDeals = ({ brandTsvInfo, handleItemFocus, order, spotlightId }) => {
|
||||
const TodaysDeals = ({
|
||||
brandTsvInfo,
|
||||
handleItemFocus,
|
||||
order,
|
||||
shelfOrder,
|
||||
spotlightId,
|
||||
}) => {
|
||||
const [firstChk, setFirstChk] = useState(0);
|
||||
|
||||
const _handleItemFocus = useCallback(() => {
|
||||
if (handleItemFocus) handleItemFocus(spotlightId);
|
||||
if (handleItemFocus) handleItemFocus(spotlightId, shelfOrder);
|
||||
|
||||
const c = Spotlight.getCurrent();
|
||||
|
||||
|
||||
@@ -21,13 +21,14 @@ const UpComing = ({
|
||||
brandLiveChannelUpcoming,
|
||||
handleItemFocus,
|
||||
order,
|
||||
shelfOrder,
|
||||
selectedPatnrId,
|
||||
spotlightId,
|
||||
}) => {
|
||||
const [firstChk, setFirstChk] = useState(0);
|
||||
|
||||
const _handleItemFocus = useCallback(() => {
|
||||
if (handleItemFocus) handleItemFocus(spotlightId);
|
||||
if (handleItemFocus) handleItemFocus(spotlightId, shelfOrder);
|
||||
|
||||
const c = Spotlight.getCurrent();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user