feat. 페이지 귀속 컴포넌트 로그 추가
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
<script setup lang="ts">
|
||||
import type { TrackingObject } from '#layers/types/api/common'
|
||||
import type {
|
||||
EventNavigationResponse,
|
||||
EventNavigation,
|
||||
@@ -6,6 +7,12 @@ import type {
|
||||
|
||||
const { locale } = useI18n()
|
||||
const gameDomain = useGetGameDomain()
|
||||
const { sendLog, useAnalyticsData } = useAnalytics()
|
||||
|
||||
const analytics = {
|
||||
action_type: 'click',
|
||||
click_sarea: 'eventNavigation',
|
||||
}
|
||||
|
||||
const isEventNavigationOpen = ref(true)
|
||||
const eventNavigationList = ref<Record<string, EventNavigation>>({})
|
||||
@@ -36,6 +43,12 @@ const getEventNavigation = async (): Promise<Record<
|
||||
|
||||
const toggleEventNavigation = () => {
|
||||
isEventNavigationOpen.value = !isEventNavigationOpen.value
|
||||
|
||||
const navigationAnalytics = {
|
||||
...analytics,
|
||||
click_item: isEventNavigationOpen.value ? '열기' : '닫기',
|
||||
} as TrackingObject
|
||||
sendLog(locale.value, useAnalyticsData(navigationAnalytics))
|
||||
}
|
||||
|
||||
onMounted(async () => {
|
||||
@@ -65,6 +78,15 @@ onMounted(async () => {
|
||||
:to="item.page_url"
|
||||
:target="item.link_type === 2 ? '_blank' : '_self'"
|
||||
class="item-link"
|
||||
@click="
|
||||
sendLog(
|
||||
locale,
|
||||
useAnalyticsData({
|
||||
...analytics,
|
||||
click_item: item.banner_title || item.promotion_name,
|
||||
})
|
||||
)
|
||||
"
|
||||
>
|
||||
<div class="item-thumbnail">
|
||||
<img
|
||||
|
||||
Reference in New Issue
Block a user