[통합로그 No.5] onsale 상품 클릭시 로그 정보 수집
This commit is contained in:
@@ -67,7 +67,7 @@ export default memo(function TItemCard({
|
|||||||
lastLabel,
|
lastLabel,
|
||||||
contextName,
|
contextName,
|
||||||
messageId,
|
messageId,
|
||||||
location,
|
order,
|
||||||
patnerName,
|
patnerName,
|
||||||
brandName,
|
brandName,
|
||||||
shelfId,
|
shelfId,
|
||||||
@@ -125,7 +125,7 @@ export default memo(function TItemCard({
|
|||||||
brand: brandName,
|
brand: brandName,
|
||||||
price: originalPrice,
|
price: originalPrice,
|
||||||
discount: discountRate,
|
discount: discountRate,
|
||||||
locaiton: location,
|
locaiton: order,
|
||||||
category: catNm,
|
category: catNm,
|
||||||
};
|
};
|
||||||
dispatch(sendLogTotalRecommend(params));
|
dispatch(sendLogTotalRecommend(params));
|
||||||
|
|||||||
@@ -202,7 +202,7 @@ const BestSeller = ({
|
|||||||
key={"subItem" + itemIndex}
|
key={"subItem" + itemIndex}
|
||||||
contextName={LOG_CONTEXT_NAME.HOME}
|
contextName={LOG_CONTEXT_NAME.HOME}
|
||||||
messageId={LOG_MESSAGE_ID.SHELF_CLICK}
|
messageId={LOG_MESSAGE_ID.SHELF_CLICK}
|
||||||
location={itemIndex + 1}
|
order={itemIndex + 1}
|
||||||
shelfId={spotlightId}
|
shelfId={spotlightId}
|
||||||
shelfLocation={shelfLocation}
|
shelfLocation={shelfLocation}
|
||||||
shelfTitle={shelfTitle}
|
shelfTitle={shelfTitle}
|
||||||
|
|||||||
@@ -12,6 +12,7 @@ import useScrollTo from "../../../hooks/useScrollTo";
|
|||||||
import { $L, scaleW } from "../../../utils/helperMethods";
|
import { $L, scaleW } from "../../../utils/helperMethods";
|
||||||
import css from "./HomeOnSale.module.less";
|
import css from "./HomeOnSale.module.less";
|
||||||
import HomeOnSaleItem from "./HomeOnSaleItem/HomeOnSaleItem";
|
import HomeOnSaleItem from "./HomeOnSaleItem/HomeOnSaleItem";
|
||||||
|
import { LOG_CONTEXT_NAME, LOG_MESSAGE_ID } from "../../../utils/Config";
|
||||||
|
|
||||||
const Container = SpotlightContainerDecorator(
|
const Container = SpotlightContainerDecorator(
|
||||||
{ enterTo: "last-focused" },
|
{ enterTo: "last-focused" },
|
||||||
@@ -24,6 +25,8 @@ const HomeOnSale = ({
|
|||||||
handleItemFocus,
|
handleItemFocus,
|
||||||
handleShelfFocus,
|
handleShelfFocus,
|
||||||
spotlightId,
|
spotlightId,
|
||||||
|
shelfLocation,
|
||||||
|
shelfTitle,
|
||||||
...rest
|
...rest
|
||||||
}) => {
|
}) => {
|
||||||
const [firstChk, setFirstChk] = useState(0);
|
const [firstChk, setFirstChk] = useState(0);
|
||||||
@@ -120,6 +123,7 @@ const HomeOnSale = ({
|
|||||||
}
|
}
|
||||||
}, [handleShelfFocus]);
|
}, [handleShelfFocus]);
|
||||||
|
|
||||||
|
// console.log("#homeOnSaleInfos", homeOnSaleInfos);
|
||||||
return (
|
return (
|
||||||
<Container
|
<Container
|
||||||
{...rest}
|
{...rest}
|
||||||
@@ -156,6 +160,17 @@ const HomeOnSale = ({
|
|||||||
onBlur={handleBlur(index)}
|
onBlur={handleBlur(index)}
|
||||||
label={index * 1 + 1 + " of " + homeOnSaleInfos.length}
|
label={index * 1 + 1 + " of " + homeOnSaleInfos.length}
|
||||||
lastLabel=" go to detail, button"
|
lastLabel=" go to detail, button"
|
||||||
|
contextName={LOG_CONTEXT_NAME.HOME}
|
||||||
|
messageId={LOG_MESSAGE_ID.SHELF_CLICK}
|
||||||
|
shelfLocation={shelfLocation}
|
||||||
|
shelfId={spotlightId}
|
||||||
|
shelfTitle={shelfTitle}
|
||||||
|
productId={itemData.prdtId}
|
||||||
|
productName={itemData.prdtNm}
|
||||||
|
order={itemData.expsOrd}
|
||||||
|
catNm={itemData.catNm}
|
||||||
|
partner={itemData.patncNm}
|
||||||
|
brandName={itemData.brndNm}
|
||||||
/>
|
/>
|
||||||
);
|
);
|
||||||
})}
|
})}
|
||||||
|
|||||||
@@ -11,6 +11,7 @@ import usePriceInfo from "../../../../hooks/usePriceInfo";
|
|||||||
import { panel_names } from "../../../../utils/Config";
|
import { panel_names } from "../../../../utils/Config";
|
||||||
import { $L } from "../../../../utils/helperMethods";
|
import { $L } from "../../../../utils/helperMethods";
|
||||||
import css from "./HomeOnSaleItem.module.less";
|
import css from "./HomeOnSaleItem.module.less";
|
||||||
|
import { sendLogTotalRecommend } from "../../../../actions/logActions";
|
||||||
|
|
||||||
const SpottableComponent = Spottable("div");
|
const SpottableComponent = Spottable("div");
|
||||||
|
|
||||||
@@ -19,6 +20,17 @@ export default function HomeOnSaleItem({
|
|||||||
itemData,
|
itemData,
|
||||||
label,
|
label,
|
||||||
lastLabel,
|
lastLabel,
|
||||||
|
contextName,
|
||||||
|
messageId,
|
||||||
|
shelfLocation,
|
||||||
|
shelfId,
|
||||||
|
shelfTitle,
|
||||||
|
productId,
|
||||||
|
productName,
|
||||||
|
patnerName,
|
||||||
|
brandName,
|
||||||
|
catNm,
|
||||||
|
order,
|
||||||
...rest
|
...rest
|
||||||
}) {
|
}) {
|
||||||
const { originalPrice, discountedPrice, discountRate } =
|
const { originalPrice, discountedPrice, discountRate } =
|
||||||
@@ -39,8 +51,27 @@ export default function HomeOnSaleItem({
|
|||||||
},
|
},
|
||||||
})
|
})
|
||||||
);
|
);
|
||||||
|
|
||||||
|
if (contextName && messageId) {
|
||||||
|
const params = {
|
||||||
|
contextName: contextName,
|
||||||
|
messageId: messageId,
|
||||||
|
shelfLocation: shelfLocation,
|
||||||
|
shelfId: shelfId,
|
||||||
|
shelfTitle: shelfTitle,
|
||||||
|
productId: productId,
|
||||||
|
productTitle: productName,
|
||||||
|
partner: patnerName,
|
||||||
|
brand: brandName,
|
||||||
|
price: originalPrice,
|
||||||
|
discount: discountRate,
|
||||||
|
locaiton: order,
|
||||||
|
category: catNm,
|
||||||
|
};
|
||||||
|
dispatch(sendLogTotalRecommend(params));
|
||||||
|
}
|
||||||
},
|
},
|
||||||
[dispatch, itemData]
|
[dispatch, itemData, contextName, messageId]
|
||||||
);
|
);
|
||||||
const prdtNum = label ? label : "";
|
const prdtNum = label ? label : "";
|
||||||
const discountLabel = discountRate ? discountRate + " discount," : "";
|
const discountLabel = discountRate ? discountRate + " discount," : "";
|
||||||
|
|||||||
@@ -252,7 +252,7 @@ export default memo(function SubCategory({
|
|||||||
contextName={LOG_CONTEXT_NAME.HOME}
|
contextName={LOG_CONTEXT_NAME.HOME}
|
||||||
messageId={LOG_MESSAGE_ID.SHELF_CLICK}
|
messageId={LOG_MESSAGE_ID.SHELF_CLICK}
|
||||||
catNm={categoryItemInfos.catNm}
|
catNm={categoryItemInfos.catNm}
|
||||||
location={itemIndex + 1}
|
order={itemIndex + 1}
|
||||||
shelfId={spotlightId}
|
shelfId={spotlightId}
|
||||||
shelfLocation={shelfLocation}
|
shelfLocation={shelfLocation}
|
||||||
shelfTitle={shelfTitle}
|
shelfTitle={shelfTitle}
|
||||||
|
|||||||
Reference in New Issue
Block a user