fix. [SWV-877] GNB 지표 정의 개선
This commit is contained in:
@@ -7,6 +7,7 @@ import type {
|
||||
GameDataResourceGroup,
|
||||
GameDataResourceGroupSet,
|
||||
} from '#layers/types/api/gameData'
|
||||
import type { TrackingObject } from '#layers/types/api/common'
|
||||
|
||||
const MORE_WIDTH = 72
|
||||
const START_MARGIN = 40
|
||||
@@ -20,7 +21,8 @@ const scrollStore = useScrollStore()
|
||||
const breakpoints = useResponsiveBreakpoints()
|
||||
const { sendLog } = useAnalytics()
|
||||
|
||||
const { gameName, imgJson, gnb, eventBanner } = storeToRefs(gameDataStore)
|
||||
const { gameId, gameName, imgJson, gnb, eventBanner } =
|
||||
storeToRefs(gameDataStore)
|
||||
const { pageLayoutType } = storeToRefs(pageDataStore)
|
||||
const { isPassedStoveGnb } = storeToRefs(scrollStore)
|
||||
|
||||
@@ -139,12 +141,16 @@ const handleMenuClose = () => {
|
||||
scrollStore.controlScrollLock(false)
|
||||
}
|
||||
|
||||
const handleSendLog = (item: string) => {
|
||||
const analytics = {
|
||||
action_type: 'click',
|
||||
click_item: item,
|
||||
click_sarea: 'GNB',
|
||||
}
|
||||
const handleSendLog = (item: string | TrackingObject) => {
|
||||
const analytics: TrackingObject =
|
||||
typeof item === 'string'
|
||||
? {
|
||||
action_type: 'click',
|
||||
click_item: item,
|
||||
click_sarea: 'GNB',
|
||||
click_area: gameId.value,
|
||||
}
|
||||
: { ...item, click_area: gameId.value }
|
||||
sendLog(locale.value, analytics)
|
||||
}
|
||||
|
||||
@@ -152,7 +158,7 @@ const handleGnbItemClick = (gnbItem: GameDataMenu) => {
|
||||
if (isNotClickable(gnbItem)) return
|
||||
|
||||
handleMenuClose()
|
||||
sendLog(locale.value, gnbItem.tracking_json)
|
||||
handleSendLog(gnbItem.tracking_json)
|
||||
}
|
||||
|
||||
onMounted(() => {
|
||||
@@ -196,10 +202,7 @@ onMounted(() => {
|
||||
class="h-[30px]"
|
||||
/>
|
||||
</AtomsLocaleLink>
|
||||
<button
|
||||
class="btn-open"
|
||||
@click="[handleMenuOpen(), handleSendLog('모바일 메뉴')]"
|
||||
>
|
||||
<button class="btn-open" @click="handleMenuOpen">
|
||||
<AtomsIconsMenuBoldLine class="mx-auto" />
|
||||
<span class="sr-only">menu open</span>
|
||||
</button>
|
||||
@@ -391,7 +394,7 @@ onMounted(() => {
|
||||
:use-game-font="
|
||||
start1depthData?.btn_info?.use_game_font === 1
|
||||
"
|
||||
@click="sendLog(locale, start1depthData.tracking)"
|
||||
@click="handleSendLog(start1depthData.tracking)"
|
||||
>
|
||||
{{ start1depthData?.btn_info?.txt_btn_name }}
|
||||
</BlocksButtonLauncher>
|
||||
@@ -405,7 +408,7 @@ onMounted(() => {
|
||||
type="single"
|
||||
variant="custom"
|
||||
:platform="key"
|
||||
@click="sendLog(locale, item.tracking)"
|
||||
@click="handleSendLog(item.tracking)"
|
||||
>
|
||||
{{ item.btn_info?.txt_btn_name }}
|
||||
</BlocksButtonLauncher>
|
||||
|
||||
Reference in New Issue
Block a user