[통합로그 No.1] ShopTime Home이 메뉴 혹은 webOS에서 진입하여 화면에 노출될 때 entryMenu 정보 수집

This commit is contained in:
dongyoungKo
2025-05-08 16:33:42 +09:00
parent 2ceff7f710
commit 2b2f46d0e8
6 changed files with 64 additions and 42 deletions

View File

@@ -386,10 +386,6 @@ function AppBase(props) {
);
}, [dispatch]);
useEffect(() => {
console.log("#introTermsAgree", introTermsAgree);
}, [introTermsAgree]);
return (
<ErrorBoundary>
{webOSVersion === "" ? null : Number(webOSVersion) < 4 ? (

View File

@@ -166,11 +166,11 @@ export const getUrlByLogTpNo = (logTpNo) => {
export const postTotalLog = (params, url) => (dispatch, getState) => {
const onSuccess = (response) => {
console.log("#Total Log onSuccess.....", response);
console.log("Total Log onSuccess.....", response);
};
const onFail = (error) => {
console.error("#totalLog onFail...", error);
console.error("totalLog onFail...", error);
};
TLogEvent(
@@ -1608,6 +1608,8 @@ export const sendLogTotalRecommend = (params) => (dispatch, getState) => {
const logCreateTime = new Date().toISOString();
console.log("#entryMenu", entryMenu);
const newParams = {
...params,
userNumber: userNumber,

View File

@@ -75,7 +75,6 @@ export const TLogEvent = (
axiosInstance = axios.get(url, AUTHORIZATION);
break;
case "post":
console.log("#model", model);
axiosInstance = axios.post(url, model, AUTHORIZATION);
break;

View File

@@ -1,5 +1,5 @@
import { types } from "../actions/actionTypes";
import { LOG_MENU } from "../utils/Config";
import { types } from '../actions/actionTypes';
import { LOG_MENU } from '../utils/Config';
const initialState = {
appStatus: {
@@ -52,7 +52,7 @@ const initialState = {
check: "",
menu: {
entryMenu: "App",
entryMenu: "webOS",
nowMenu: "",
menuMovSno: 0,
},

View File

@@ -251,7 +251,7 @@ export const LOG_TP_NO = {
// TV log update
export const LOG_MENU = {
APP: "App",
APP: "webOS",
UNKNOWN: "Unknown",
EVENT_POPUP: "Event Popup",

View File

@@ -4,16 +4,19 @@ import React, {
useMemo,
useRef,
useState,
} from "react";
} from 'react';
import classNames from "classnames";
import { useDispatch, useSelector } from "react-redux";
import classNames from 'classnames';
import {
useDispatch,
useSelector,
} from 'react-redux';
import Spotlight from "@enact/spotlight";
import Spotlight from '@enact/spotlight';
import {
getContainerNavigableElements,
setContainerLastFocusedElement,
} from "@enact/spotlight/src/container";
} from '@enact/spotlight/src/container';
import {
changeAppStatus,
@@ -21,36 +24,47 @@ import {
setExitApp,
setHidePopup,
setShowPopup,
} from "../../actions/commonActions";
import { getWelcomeEventInfo } from "../../actions/eventActions";
} from '../../actions/commonActions';
import { getWelcomeEventInfo } from '../../actions/eventActions';
import {
checkEnterThroughGNB,
getHomeLayout,
getHomeMainContents,
updateHomeInfo,
} from "../../actions/homeActions";
import { sendLogGNB } from "../../actions/logActions";
import { getSubCategory, getTop20Show } from "../../actions/mainActions";
import { getHomeOnSaleInfo } from "../../actions/onSaleActions";
import { finishVideoPreview } from "../../actions/playActions";
import { getBestSeller } from "../../actions/productActions";
import TBody from "../../components/TBody/TBody";
import TButton, { TYPES } from "../../components/TButton/TButton";
import TPanel from "../../components/TPanel/TPanel";
import TPopUp from "../../components/TPopUp/TPopUp";
import TVerticalPagenator from "../../components/TVerticalPagenator/TVerticalPagenator";
import useDebugKey from "../../hooks/useDebugKey";
import usePrevious from "../../hooks/usePrevious";
import { ACTIVE_POPUP, LOG_MENU, panel_names } from "../../utils/Config";
import { $L } from "../../utils/helperMethods";
import { SpotlightIds } from "../../utils/SpotlightIds";
import BestSeller from "../HomePanel/BestSeller/BestSeller";
import HomeBanner from "../HomePanel/HomeBanner/HomeBanner";
import HomeOnSale from "../HomePanel/HomeOnSale/HomeOnSale";
import css from "../HomePanel/HomePanel.module.less";
import PopularShow from "../HomePanel/PopularShow/PopularShow";
import SubCategory from "../HomePanel/SubCategory/SubCategory";
import EventPopUpBanner from "./EventPopUpBanner/EventPopUpBanner";
} from '../../actions/homeActions';
import {
sendLogGNB,
sendLogTotalRecommend,
} from '../../actions/logActions';
import {
getSubCategory,
getTop20Show,
} from '../../actions/mainActions';
import { getHomeOnSaleInfo } from '../../actions/onSaleActions';
import { finishVideoPreview } from '../../actions/playActions';
import { getBestSeller } from '../../actions/productActions';
import TBody from '../../components/TBody/TBody';
import TButton, { TYPES } from '../../components/TButton/TButton';
import TPanel from '../../components/TPanel/TPanel';
import TPopUp from '../../components/TPopUp/TPopUp';
import TVerticalPagenator
from '../../components/TVerticalPagenator/TVerticalPagenator';
import useDebugKey from '../../hooks/useDebugKey';
import usePrevious from '../../hooks/usePrevious';
import {
ACTIVE_POPUP,
LOG_MENU,
panel_names,
} from '../../utils/Config';
import { $L } from '../../utils/helperMethods';
import { SpotlightIds } from '../../utils/SpotlightIds';
import BestSeller from '../HomePanel/BestSeller/BestSeller';
import HomeBanner from '../HomePanel/HomeBanner/HomeBanner';
import HomeOnSale from '../HomePanel/HomeOnSale/HomeOnSale';
import css from '../HomePanel/HomePanel.module.less';
import PopularShow from '../HomePanel/PopularShow/PopularShow';
import SubCategory from '../HomePanel/SubCategory/SubCategory';
import EventPopUpBanner from './EventPopUpBanner/EventPopUpBanner';
export const TEMPLATE_CODE_CONF = {
TOP: "DSP00101",
@@ -117,7 +131,7 @@ const HomePanel = ({ isOnTop }) => {
);
const [cateCd, setCateCd] = useState(panelInfo.currentCatCd ?? null);
const [cateNm, setCateNm] = useState(panelInfo.currentCateName ?? null);
const { entryMenu, nowMenu } = useSelector((state) => state.common.menu);
const [focusedContainerId, setFocusedContainerId] = useState(
panelInfo.focusedContainerId
);
@@ -126,6 +140,17 @@ const HomePanel = ({ isOnTop }) => {
const verticalPagenatorRef = useRef(null);
const currentSentMenuRef = useRef(null);
useEffect(() => {
if (nowMenu === "Home/Top") {
dispatch(
sendLogTotalRecommend({
messageId: "AL_HOME_SHOWN",
contextName: "shoptime.home",
})
);
}
}, [entryMenu, nowMenu]);
const sortedHomeLayoutInfo = useMemo(() => {
if (homeLayoutInfo && homeLayoutInfo.homeLayoutInfo) {
const sorted = [...homeLayoutInfo.homeLayoutInfo].sort(