[통합로그API NO.8] FeaturedBrands 클릭했을때 content 정보 로그 수집 (bestSeller , category)

This commit is contained in:
dongyoungKo
2025-05-19 17:36:22 +09:00
parent 7efeb210e1
commit 871066dc02
9 changed files with 119 additions and 8 deletions

View File

@@ -24,6 +24,7 @@ const FeaturedBestSeller = ({
shelfOrder,
spotlightId,
selectedPatnrId,
shelfTitle,
}) => {
const [firstChk, setFirstChk] = useState(0);
@@ -72,6 +73,9 @@ const FeaturedBestSeller = ({
brandBestSellerInfo={brandBestSellerInfo}
handleItemFocus={_handleItemFocus}
selectedPatnrId={selectedPatnrId}
spotlightId={spotlightId}
shelfOrder={shelfOrder}
shelfTitle={shelfTitle}
/>
</Container>
);

View File

@@ -16,7 +16,11 @@ import TItemCard, {
} from "../../../../components/TItemCard/TItemCard";
import TVirtualGridList from "../../../../components/TVirtualGridList/TVirtualGridList";
import useScrollTo from "../../../../hooks/useScrollTo";
import { panel_names } from "../../../../utils/Config";
import {
LOG_CONTEXT_NAME,
LOG_MESSAGE_ID,
panel_names,
} from "../../../../utils/Config";
import { getTranslate3dValueByDirection } from "../../../../utils/helperMethods";
import css from "./FeaturedBestSellerList.module.less";
@@ -29,6 +33,10 @@ export default function FeaturedBestSellerList({
brandBestSellerInfo,
handleItemFocus,
selectedPatnrId,
spotlightId,
shelfTitle,
shelfLocation,
shelfOrder,
}) {
const { getScrollTo, scrollLeft } = useScrollTo();
@@ -119,9 +127,17 @@ export default function FeaturedBestSellerList({
const renderItem = useCallback(
({ index, ...rest }) => {
const { imgUrl, offerInfo, patnrId, prdtNm, prdtId, priceInfo, rankOrd } =
brandBestSellerInfo[index];
const {
imgUrl,
offerInfo,
patnrId,
prdtNm,
prdtId,
priceInfo,
rankOrd,
patncNm,
brndNm,
} = brandBestSellerInfo[index];
const rankText =
rankOrd === 1
? rankOrd + "st,"
@@ -133,6 +149,14 @@ export default function FeaturedBestSellerList({
return (
<TItemCard
contextName={LOG_CONTEXT_NAME.FEATURED_BRANDS}
messageId={LOG_MESSAGE_ID.SHELF_CLICK}
order={rankOrd}
patnerName={patncNm}
brandName={brndNm}
shelfId={spotlightId}
shelfLocation={shelfOrder}
shelfTitle={shelfTitle}
imageAlt={prdtNm}
imageSource={imgUrl}
isBestSeller

View File

@@ -307,6 +307,8 @@ const FeaturedBrandsPanel = ({ isOnTop, panelInfo, spotlightId }) => {
[brandLayoutInfo]
);
console.log("#brandBestSellerInfo", brandBestSellerInfo);
const doSendLogGNB = useCallback(
(containerId, shelfOrder) => {
if (
@@ -424,6 +426,7 @@ const FeaturedBrandsPanel = ({ isOnTop, panelInfo, spotlightId }) => {
isOnTop={isOnTop}
order={idx + 1}
shelfOrder={el.expsOrd}
shelfTitle={el.shptmBrndOptTpNm}
spotlightId={TEMPLATE_CODE_CONF.LIVE_CHANNELS}
selectedPatnrId={selectedPatnrId}
/>
@@ -444,8 +447,9 @@ const FeaturedBrandsPanel = ({ isOnTop, panelInfo, spotlightId }) => {
brandLiveChannelUpcoming={brandLiveChannelUpcoming}
handleItemFocus={handleItemFocus}
order={idx + 1}
shelfOrder={el.expsOrd}
selectedPatnrId={selectedPatnrId}
shelfOrder={el.expsOrd}
shelfTitle={el.shptmBrndOptTpNm}
spotlightId={TEMPLATE_CODE_CONF.UP_COMING}
/>
)}
@@ -467,6 +471,7 @@ const FeaturedBrandsPanel = ({ isOnTop, panelInfo, spotlightId }) => {
hasQuickMenu={hasQuickMenu}
order={idx + 1}
shelfOrder={el.expsOrd}
shelfTitle={el.shptmBrndOptTpNm}
spotlightId={TEMPLATE_CODE_CONF.TODAYS_DEALS}
/>
)}
@@ -487,6 +492,7 @@ const FeaturedBrandsPanel = ({ isOnTop, panelInfo, spotlightId }) => {
handleItemFocus={handleItemFocus}
order={idx + 1}
shelfOrder={el.expsOrd}
shelfTitle={el.shptmBrndOptTpNm}
spotlightId={TEMPLATE_CODE_CONF.BEST_SELLER}
selectedPatnrId={selectedPatnrId}
/>
@@ -514,6 +520,7 @@ const FeaturedBrandsPanel = ({ isOnTop, panelInfo, spotlightId }) => {
handleItemFocus={handleItemFocus}
order={idx + 1}
shelfOrder={el.expsOrd}
shelfTitle={el.shptmBrndOptTpNm}
spotlightId={TEMPLATE_CODE_CONF.RECOMMENDED_SHOWS}
selectedCatCd={selectedCatCd}
selectedPatncNm={selectedPatncNm}
@@ -542,6 +549,7 @@ const FeaturedBrandsPanel = ({ isOnTop, panelInfo, spotlightId }) => {
handleItemFocus={handleItemFocus}
order={idx + 1}
shelfOrder={el.expsOrd}
shelfTitle={el.shptmBrndOptTpNm}
selectedHstNm={selectedHstNm}
selectedPatncNm={selectedPatncNm}
selectedPatnrId={selectedPatnrId}
@@ -570,6 +578,7 @@ const FeaturedBrandsPanel = ({ isOnTop, panelInfo, spotlightId }) => {
handleItemFocus={handleItemFocus}
order={idx + 1}
shelfOrder={el.expsOrd}
shelfTitle={el.shptmBrndOptTpNm}
spotlightId={TEMPLATE_CODE_CONF.SERIES}
selectedPatncNm={selectedPatncNm}
selectedPatnrId={selectedPatnrId}
@@ -598,6 +607,7 @@ const FeaturedBrandsPanel = ({ isOnTop, panelInfo, spotlightId }) => {
handleItemFocus={handleItemFocus}
order={idx + 1}
shelfOrder={el.expsOrd}
shelfTitle={el.shptmBrndOptTpNm}
spotlightId={TEMPLATE_CODE_CONF.CATEGORY}
selectedCatCdLv1={selectedCatCdLv1}
selectedCatCdLv2={selectedCatCdLv2}
@@ -626,6 +636,7 @@ const FeaturedBrandsPanel = ({ isOnTop, panelInfo, spotlightId }) => {
handleItemFocus={handleItemFocus}
order={idx + 1}
shelfOrder={el.expsOrd}
shelfTitle={el.shptmBrndOptTpNm}
selectedPatnrId={selectedPatnrId}
selectedPatncNm={selectedPatncNm}
spotlightId={TEMPLATE_CODE_CONF.SHOWROOM}

View File

@@ -26,6 +26,7 @@ const FeaturedCategory = ({
handleItemFocus,
order,
shelfOrder,
shelfTitle,
spotlightId,
selectedCatCdLv1,
selectedCatCdLv2,
@@ -193,6 +194,9 @@ const FeaturedCategory = ({
selectedCategoryLv2Infos={selectedCategoryLv2Infos}
selectedPatnrId={selectedPatnrId}
spotlightId={spotlightId}
shelfOrder={shelfOrder}
shelfTitle={shelfTitle}
selectedPatncNm={selectedPatncNm}
/>
)
)}

View File

@@ -18,6 +18,9 @@ const FeaturedCategoryContents = ({
selectedCategoryLv2Infos,
selectedPatnrId,
spotlightId,
shelfOrder,
shelfTitle,
selectedPatncNm,
}) => {
const { brandCategoryProductDetailInfo, catCd, catNm, patnrId } =
brandCategoryProductDetailInfoItem;
@@ -40,6 +43,9 @@ const FeaturedCategoryContents = ({
selectedCatCdLv2={selectedCatCdLv2}
selectedCategoryLv2Infos={selectedCategoryLv2Infos}
selectedPatnrId={selectedPatnrId}
spotlightId={spotlightId}
shelfOrder={shelfOrder}
shelfTitle={shelfTitle}
/>
) : (
<FeaturedCategoryProductGrid
@@ -52,6 +58,10 @@ const FeaturedCategoryContents = ({
selectedCatCdLv2={selectedCatCdLv2}
selectedCategoryLv2Infos={selectedCategoryLv2Infos}
spotlightId={spotlightId}
shelfOrder={shelfOrder}
shelfTitle={shelfTitle}
selectedPatncNm={selectedPatncNm}
catNm={catNm}
/>
)}
</Container>

View File

@@ -19,7 +19,11 @@ const FeaturedCategoryProductGrid = ({
selectedCatCdLv1,
selectedCatCdLv2,
selectedCategoryLv2Infos,
selectedPatncNm,
spotlightId,
shelfOrder,
shelfTitle,
catNm,
}) => {
return (
<Container className={css.container}>
@@ -30,6 +34,7 @@ const FeaturedCategoryProductGrid = ({
brandCategoryProductDetailInfoItem={
brandCategoryProductDetailInfoItem
}
selectedPatncNm={selectedPatncNm}
catCd={catCd}
contentsIndex={contentsIndex}
handleItemFocus={handleItemFocus}
@@ -40,6 +45,9 @@ const FeaturedCategoryProductGrid = ({
selectedCatCdLv2={selectedCatCdLv2}
selectedCategoryLv2Infos={selectedCategoryLv2Infos}
spotlightId={spotlightId}
shelfOrder={shelfOrder}
shelfTitle={shelfTitle}
catNm={catNm}
/>
)
)}

View File

@@ -6,7 +6,11 @@ import Spotlight from "@enact/spotlight";
import { pushPanel, updatePanel } from "../../../../../../actions/panelActions";
import TItemCard from "../../../../../../components/TItemCard/TItemCard";
import { panel_names } from "../../../../../../utils/Config";
import {
LOG_CONTEXT_NAME,
LOG_MESSAGE_ID,
panel_names,
} from "../../../../../../utils/Config";
import css from "./FeaturedCategoryProductGridItem.module.less";
const FeaturedCategoryProductGridItem = ({
@@ -19,11 +23,15 @@ const FeaturedCategoryProductGridItem = ({
selectedCatCdLv1,
selectedCatCdLv2,
selectedCategoryLv2Infos,
selectedPatncNm,
spotlightId,
shelfOrder,
shelfTitle,
catNm,
}) => {
const dispatch = useDispatch();
const { imgUrl, offerInfo, prdtId, prdtNm, priceInfo } =
const { imgUrl, offerInfo, prdtId, prdtNm, priceInfo, expsOrd } =
brandCategoryProductDetailInfoItem;
const handleClick = useCallback(() => {
@@ -80,6 +88,14 @@ const FeaturedCategoryProductGridItem = ({
return (
<li className={css.item}>
<TItemCard
contextName={LOG_CONTEXT_NAME.FEATURED_BRANDS}
messageId={LOG_MESSAGE_ID.SHELF_CLICK}
catNm={catNm}
patnerName={selectedPatncNm}
order={expsOrd}
shelfLocation={shelfOrder}
shelfTitle={shelfTitle}
shelfId={spotlightId}
data-wheel-point={itemIndex >= 5}
imageAlt={prdtNm}
imageSource={imgUrl}

View File

@@ -16,7 +16,11 @@ import TItemCard, {
} from "../../../../../components/TItemCard/TItemCard";
import TVirtualGridList from "../../../../../components/TVirtualGridList/TVirtualGridList";
import useScrollTo from "../../../../../hooks/useScrollTo";
import { panel_names } from "../../../../../utils/Config";
import {
LOG_CONTEXT_NAME,
LOG_MESSAGE_ID,
panel_names,
} from "../../../../../utils/Config";
import { getTranslate3dValueByDirection } from "../../../../../utils/helperMethods";
import css from "./FeaturedCategoryProductList.module.less";
@@ -35,6 +39,9 @@ export default function FeaturedCategoryProductList({
selectedCatCdLv2,
selectedCategoryLv2Infos,
selectedPatnrId,
spotlightId,
shelfTitle,
shelfOrder,
}) {
const { getScrollTo, scrollLeft } = useScrollTo();
@@ -154,10 +161,18 @@ export default function FeaturedCategoryProductList({
prdtId,
prdtNm,
priceInfo,
expsOrd,
} = brandCategoryProductDetailInfo[index];
return (
<TItemCard
contextName={LOG_CONTEXT_NAME.FEATURED_BRANDS}
messageId={LOG_MESSAGE_ID.SHELF_CLICK}
order={expsOrd}
category={selectedCatCdLv1}
shelfLocation={shelfOrder}
shelfTitle={shelfTitle}
shelfId={spotlightId}
data-exposure-order={contentsIndex + 1}
imageAlt={prdtNm}
imageSource={imgUrl}

View File

@@ -30,6 +30,7 @@ import { $L } from "../../../../utils/helperMethods";
import css from "./LiveChannelsVerticalContents.module.less";
import LiveChannelsVerticalProductList from "./LiveChannelsVerticalProductList/LiveChannelsVerticalProductList";
import LiveVideoCard from "./LiveVideoCard/LiveVideoCard";
import { sendLogTotalRecommend } from "../../../../actions/logActions";
const Container = SpotlightContainerDecorator(
{ enterTo: "last-focused" },
@@ -159,6 +160,24 @@ const LiveChannelsVerticalContents = ({
})
);
dispatch(
sendLogTotalRecommend({
partner: "",
shelfLocation: "",
shelfId: "",
shelfTitle: "",
contentId: "",
contentTitle: "",
productId: "",
productTitle: "",
brand: "",
price: "",
discount: "",
location: "",
category: "",
})
);
isFullScreenModeActivedRef.current = true;
}