[통합로그API No.15] HotPicks 화면 내에서 리모콘을 통해 상/하단 이동 시 노출되는 hotpicsk 정보 로그 수집
This commit is contained in:
@@ -614,4 +614,6 @@ export const LOG_MESSAGE_ID = {
|
|||||||
TOGGLE_CLICK: "AL_TOGGLE_CLICK",
|
TOGGLE_CLICK: "AL_TOGGLE_CLICK",
|
||||||
MYPAGE_DELETE: "AL_MYPAGE_DELETE",
|
MYPAGE_DELETE: "AL_MYPAGE_DELETE",
|
||||||
MYPAGE_CLICK: "AL_MYPAGE_CLICK",
|
MYPAGE_CLICK: "AL_MYPAGE_CLICK",
|
||||||
|
HOTPICKS_SHOWN: "AL_HOTPCIKS_SHOWN",
|
||||||
|
HOTPICKS_CLICK: "AL_HOTPICKS_CLICK",
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -31,6 +31,7 @@ import {
|
|||||||
sendLogCuration,
|
sendLogCuration,
|
||||||
sendLogGNB,
|
sendLogGNB,
|
||||||
sendLogShopByMobile,
|
sendLogShopByMobile,
|
||||||
|
sendLogTotalRecommend,
|
||||||
} from "../../actions/logActions";
|
} from "../../actions/logActions";
|
||||||
import {
|
import {
|
||||||
popPanel,
|
popPanel,
|
||||||
@@ -136,10 +137,12 @@ const HotPicksPanel = ({ panelInfo, isOnTop, spotlightId }) => {
|
|||||||
const [smsTpCode, setSmsTpCode] = useState(null);
|
const [smsTpCode, setSmsTpCode] = useState(null);
|
||||||
const [loading, setLoading] = useState(true);
|
const [loading, setLoading] = useState(true);
|
||||||
|
|
||||||
const expsOrdRef = useRef(null);
|
|
||||||
const shopByMobileLogRef = useRef(null);
|
const shopByMobileLogRef = useRef(null);
|
||||||
const spotYoffsetRef = useRef(0);
|
const spotYoffsetRef = useRef(0);
|
||||||
|
|
||||||
|
const currentCurationId = useRef(null);
|
||||||
const oneLog = useRef(false);
|
const oneLog = useRef(false);
|
||||||
|
|
||||||
let timerRef = useRef();
|
let timerRef = useRef();
|
||||||
|
|
||||||
const _onScroll = (e) => {
|
const _onScroll = (e) => {
|
||||||
@@ -163,6 +166,24 @@ const HotPicksPanel = ({ panelInfo, isOnTop, spotlightId }) => {
|
|||||||
setScrolling(false);
|
setScrolling(false);
|
||||||
}, []);
|
}, []);
|
||||||
|
|
||||||
|
const onFocus = useCallback(() => {
|
||||||
|
const { curationId, curationNm, expsOrd } =
|
||||||
|
themeCurationInfoData[currentPage];
|
||||||
|
|
||||||
|
if (curationId !== currentCurationId.current) {
|
||||||
|
const params = {
|
||||||
|
contextName: Config.LOG_CONTEXT_NAME.HOT_PICKS,
|
||||||
|
messageId: Config.LOG_MESSAGE_ID.HOTPICKS_SHOWN,
|
||||||
|
curationId: curationId,
|
||||||
|
curationTitle: curationNm,
|
||||||
|
location: expsOrd,
|
||||||
|
};
|
||||||
|
dispatch(sendLogTotalRecommend(params));
|
||||||
|
|
||||||
|
currentCurationId.current = curationId;
|
||||||
|
}
|
||||||
|
}, [themeCurationInfoData, currentPage, currentCurationId]);
|
||||||
|
|
||||||
const themeCurationType = useCallback(
|
const themeCurationType = useCallback(
|
||||||
(
|
(
|
||||||
data,
|
data,
|
||||||
@@ -172,11 +193,14 @@ const HotPicksPanel = ({ panelInfo, isOnTop, spotlightId }) => {
|
|||||||
eventInfoV2,
|
eventInfoV2,
|
||||||
index
|
index
|
||||||
) => {
|
) => {
|
||||||
|
const sendLogClick = () => {
|
||||||
|
console.log("#sendLogClick", sendLogClick);
|
||||||
|
};
|
||||||
|
|
||||||
let itemData = [];
|
let itemData = [];
|
||||||
itemData.push(JSON.parse(JSON.stringify(data)));
|
itemData.push(JSON.parse(JSON.stringify(data)));
|
||||||
|
|
||||||
let Component = null;
|
let Component = null;
|
||||||
|
|
||||||
switch (templateCode) {
|
switch (templateCode) {
|
||||||
case "TCFI": // Full Image
|
case "TCFI": // Full Image
|
||||||
Component = TCFI;
|
Component = TCFI;
|
||||||
@@ -235,6 +259,7 @@ const HotPicksPanel = ({ panelInfo, isOnTop, spotlightId }) => {
|
|||||||
eventInfo={eventInfoV2}
|
eventInfo={eventInfoV2}
|
||||||
osVersion={osVersion}
|
osVersion={osVersion}
|
||||||
scrolling={scrolling}
|
scrolling={scrolling}
|
||||||
|
sendLogClick={sendLogClick}
|
||||||
/>
|
/>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
@@ -257,6 +282,7 @@ const HotPicksPanel = ({ panelInfo, isOnTop, spotlightId }) => {
|
|||||||
|
|
||||||
const components = useMemo(() => {
|
const components = useMemo(() => {
|
||||||
let comps = [];
|
let comps = [];
|
||||||
|
|
||||||
if (themeCurationInfoData) {
|
if (themeCurationInfoData) {
|
||||||
comps = themeCurationInfoData.map((item, index) =>
|
comps = themeCurationInfoData.map((item, index) =>
|
||||||
themeCurationType(
|
themeCurationType(
|
||||||
@@ -806,7 +832,11 @@ const HotPicksPanel = ({ panelInfo, isOnTop, spotlightId }) => {
|
|||||||
>
|
>
|
||||||
{components.length > 0
|
{components.length > 0
|
||||||
? components.map((component, index) => (
|
? components.map((component, index) => (
|
||||||
<Container key={index} className={css.sectionWrap}>
|
<Container
|
||||||
|
key={index}
|
||||||
|
className={css.sectionWrap}
|
||||||
|
onFocus={onFocus}
|
||||||
|
>
|
||||||
{currentPage === index && component}
|
{currentPage === index && component}
|
||||||
</Container>
|
</Container>
|
||||||
))
|
))
|
||||||
|
|||||||
Reference in New Issue
Block a user