feat. 페이지 분석 로그 데이터 기능 추가 및 컴포넌트 수정
This commit is contained in:
@@ -7,6 +7,7 @@ import type { ButtonType } from '#layers/types/components/button'
|
||||
|
||||
interface ButtonListProps {
|
||||
resourcesData: PageDataResourceGroup[]
|
||||
pageVerTmplSeq: number
|
||||
}
|
||||
|
||||
const props = defineProps<ButtonListProps>()
|
||||
@@ -51,7 +52,13 @@ const getButtonProps = (button: PageDataResourceGroup) => ({
|
||||
}),
|
||||
disabled: button.btn_info?.disabled,
|
||||
text: button.btn_info?.txt_btn_name,
|
||||
tracking: button.tracking,
|
||||
})
|
||||
|
||||
const { useAnalyticsLogDataDirect } = useAnalytics()
|
||||
// const logData = useAnalyticsLogDataDirect(props.resourcesData, props.pageVerTmplSeq)
|
||||
console.log("🚀 11111~ getButtonProps ~ props.resourcesData:", getButtonProps(props.resourcesData[0]))
|
||||
|
||||
</script>
|
||||
|
||||
<template>
|
||||
@@ -63,9 +70,10 @@ const getButtonProps = (button: PageDataResourceGroup) => ({
|
||||
v-for="(button, index) in props.resourcesData"
|
||||
:key="`${button.group_code}-${index}`"
|
||||
v-bind="getButtonProps(button)"
|
||||
v-analytics="useAnalyticsLogDataDirect(getButtonProps(button), props.pageVerTmplSeq)"
|
||||
class="size-extra-small md:size-medium"
|
||||
>
|
||||
{{ button.btn_info?.txt_btn_name }}
|
||||
{{ button.btn_info?.txt_btn_name }}
|
||||
</AtomsButton>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@@ -5,8 +5,8 @@ const props = defineProps<{
|
||||
resourcesData: PageDataResourceGroup
|
||||
pageVerTmplSeq: number
|
||||
}>()
|
||||
const { useAnalyticsLogData } = useAnalytics()
|
||||
const logData = useAnalyticsLogData(props.resourcesData, props.pageVerTmplSeq)
|
||||
const { useAnalyticsLogDataDirect } = useAnalytics()
|
||||
const logData = useAnalyticsLogDataDirect(props.resourcesData, props.pageVerTmplSeq)
|
||||
|
||||
// YouTube 모달 스토어 사용
|
||||
const modalStore = useModalStore()
|
||||
@@ -20,6 +20,7 @@ const handleVideoPlayClick = () => {
|
||||
|
||||
<template>
|
||||
<AtomsButtonPlay
|
||||
v-analytics="logData"
|
||||
:resources-data="resourcesData"
|
||||
@click="handleVideoPlayClick"
|
||||
/>
|
||||
|
||||
Reference in New Issue
Block a user