feat: 버튼 로그 추가
This commit is contained in:
@@ -2,7 +2,6 @@
|
||||
import type {
|
||||
PageDataResourceGroup,
|
||||
PageDataResourceGroupBtnInfo,
|
||||
PageDataTracking,
|
||||
} from '#layers/types/api/pageData'
|
||||
import type { ButtonType } from '#layers/types/components/button'
|
||||
|
||||
@@ -12,11 +11,8 @@ interface ButtonListProps {
|
||||
}
|
||||
|
||||
const props = defineProps<ButtonListProps>()
|
||||
const { sendLog, useAnalyticsLogDataDirect } = useAnalytics()
|
||||
const {locale} = useI18n()
|
||||
|
||||
const { gameData } = useGameDataStore()
|
||||
|
||||
const BUTTON_TYPE_MAP = {
|
||||
URL: {
|
||||
_self: 'internal' as const,
|
||||
@@ -58,18 +54,18 @@ const getButtonBackgroundImage = (
|
||||
return ''
|
||||
}
|
||||
|
||||
const handleButtonClick = (btnInfo: PageDataResourceGroupBtnInfo) => {
|
||||
const { locale } = useI18n()
|
||||
const { sendLog, useAnalyticsLogDataDirect } = useAnalytics()
|
||||
|
||||
const handleButtonClick = (btnInfo: PageDataResourceGroupBtnInfo, index: any) => {
|
||||
sendLog(locale.value, useAnalyticsLogDataDirect(props.resourcesData[index], props.pageVerTmplSeq))
|
||||
|
||||
const marketType = btnInfo?.detail?.market_type
|
||||
if (marketType) {
|
||||
const url = gameData?.market[marketType]?.url
|
||||
window.open(url, '_blank')
|
||||
return
|
||||
}
|
||||
|
||||
// sendLog(locale.value, useAnalyticsLogDataDirect(btnInfo, props.pageVerTmplSeq))
|
||||
|
||||
// v-analytics="useAnalyticsLogDataDirect(props.resourcesData[0].tracking, props.pageVerTmplSeq)"
|
||||
|
||||
}
|
||||
</script>
|
||||
|
||||
@@ -81,7 +77,6 @@ const handleButtonClick = (btnInfo: PageDataResourceGroupBtnInfo) => {
|
||||
<AtomsButton
|
||||
v-for="(button, index) in props.resourcesData"
|
||||
:key="index"
|
||||
v-analytics="useAnalyticsLogDataDirect(props.resourcesData[index].tracking, props.pageVerTmplSeq)"
|
||||
:type="getButtonType(button.btn_info)"
|
||||
:target="button.btn_info?.detail?.action?.link_target"
|
||||
:href="button.btn_info?.detail?.action?.url"
|
||||
@@ -103,7 +98,7 @@ const handleButtonClick = (btnInfo: PageDataResourceGroupBtnInfo) => {
|
||||
:style="{
|
||||
backgroundImage: `url(${getButtonBackgroundImage(button.btn_info)})`,
|
||||
}"
|
||||
@click="handleButtonClick(button.btn_info)"
|
||||
@click="handleButtonClick(button.btn_info, index)"
|
||||
>
|
||||
{{ button.btn_info?.txt_btn_name }}
|
||||
</AtomsButton>
|
||||
|
||||
@@ -6,7 +6,7 @@ const props = defineProps<{
|
||||
pageVerTmplSeq: number
|
||||
}>()
|
||||
const { useAnalyticsLogDataDirect } = useAnalytics()
|
||||
const logData = useAnalyticsLogDataDirect(props.resourcesData.tracking, props.pageVerTmplSeq)
|
||||
const logData = useAnalyticsLogDataDirect(props.resourcesData, props.pageVerTmplSeq)
|
||||
|
||||
// YouTube 모달 스토어 사용
|
||||
const modalStore = useModalStore()
|
||||
|
||||
Reference in New Issue
Block a user