[통합로그 API No.8] FeaturedBrands Today's Deal Content 클릭시 로그 정보 수집

This commit is contained in:
dongyoungKo
2025-05-20 10:58:59 +09:00
parent 5853ef2846
commit cb92e134b1
2 changed files with 35 additions and 1 deletions

View File

@@ -22,6 +22,7 @@ const TodaysDeals = ({
handleItemFocus,
order,
shelfOrder,
shelfTitle,
spotlightId,
}) => {
const [firstChk, setFirstChk] = useState(0);
@@ -67,6 +68,9 @@ const TodaysDeals = ({
<TodaysDealsCard
brandTsvInfo={brandTsvInfo}
handleItemFocus={_handleItemFocus}
spotlightId={spotlightId}
shelfOrder={shelfOrder}
shelfTitle={shelfTitle}
/>
</Container>
);

View File

@@ -9,9 +9,15 @@ import { pushPanel, updatePanel } from "../../../../actions/panelActions";
import CustomImage from "../../../../components/CustomImage/CustomImage";
import { removeDotAndColon } from "../../../../components/TItemCard/TItemCard";
import usePriceInfo from "../../../../hooks/usePriceInfo";
import { panel_names } from "../../../../utils/Config";
import {
LOG_CONTEXT_NAME,
LOG_MESSAGE_ID,
panel_names,
} from "../../../../utils/Config";
import { $L } from "../../../../utils/helperMethods";
import css from "./TodaysDealsCard.module.less";
import { sendLogTotalRecommend } from "../../../../actions/logActions";
import FeaturedCategoryProductGridItem from "../../FeaturedCategory/FeaturedCategoryContents/FeaturedCategoryProductGrid/FeaturedCategoryProductGridItem/FeaturedCategoryProductGridItem";
const SpottableComponent = Spottable("div");
@@ -22,6 +28,9 @@ const STRING_CONF = {
export default memo(function TodaysDealsCard({
brandTsvInfo,
handleItemFocus,
spotlightId,
shelfOrder,
shelfTitle,
...rest
}) {
const dispatch = useDispatch();
@@ -35,6 +44,9 @@ export default memo(function TodaysDealsCard({
thumbnailImg,
todaySpclFlag,
offerInfo,
patncNm,
brndNm,
catNm,
} = brandTsvInfo;
const { originalPrice, discountedPrice, discountRate } =
@@ -71,6 +83,24 @@ export default memo(function TodaysDealsCard({
panelInfo: { patnrId, prdtId },
})
);
dispatch(
sendLogTotalRecommend({
contextName: LOG_CONTEXT_NAME.FEATURED_BRANDS,
messageId: LOG_MESSAGE_ID.SHELF_CLICK,
shelfId: spotlightId,
shelfLocation: shelfOrder,
shelfTitle: shelfTitle,
productId: prdtId,
productTitle: prdtNm,
partner: patncNm,
brand: brndNm,
price: originalPrice,
discount: discountRate,
location: 1,
category: catNm,
})
);
}, [dispatch, patnrId, prdtId]);
const handleFocus = useCallback(() => {