feat: GA 이벤트 이름을 한국어로 — 코드 키는 그대로, analytics.ts GA_NAME 이 바꿔 보냄(로그인·회원가입·공유 포함), 첫화면_멈춤도

This commit is contained in:
minaChoi committed 2026-10-30 12:00:38 +09:00
1 parent 442441931f
commit 82ca286ea4
3 files changed
+87 -42

No files matched your search

+1 -1
View File
@@ -86,7 +86,7 @@
}
boot.appendChild(p)
boot.appendChild(b)
gtag('event', 'boot_stuck', { reason: reason.slice(0, 100), seconds: Math.round((Date.now() - start) / 1000), tries: tries(), app_started: !!window.__appStarted })
gtag('event', '첫화면_멈춤', { reason: reason.slice(0, 100), seconds: Math.round((Date.now() - start) / 1000), tries: tries(), app_started: !!window.__appStarted })
}, 8000)
var timer = setInterval(function () {
if (document.getElementById('boot')) retry()
+44 -1
View File
@@ -54,7 +54,50 @@ declare global {
}
}
/** GA 에 찍히는 이벤트 이름 (한국어). 코드에서는 왼쪽 키로 부른다 */
const GA_NAME: Record<keyof Events, string> = {
view_gak: '각_보기',
select_content: '글_열기',
share: '공유',
login: '로그인',
sign_up: '회원가입',
region_change: '지역_변경',
install_banner_view: '설치배너_노출',
install_click: '설치_누름',
install_choice: '설치_선택',
install_done: '설치_완료',
app_launch: '앱_실행',
boot_stuck: '첫화면_멈춤',
sheet_open: '창_열기',
like: '좋아요',
comment: '댓글',
talk_comment: '이야기_댓글',
report: '신고',
block: '차단',
terms_agree: '약관_동의',
talk_post: '이야기_올림',
feed_item_view: '피드_항목_노출',
hero_day_switch: '오늘내일_전환',
tomorrow_to_today: '내일에서_오늘로',
shorts_open: '쇼츠_열기',
shorts_view: '쇼츠_보기',
shorts_sound: '쇼츠_소리',
foliage_open: '단풍지도_열기',
foliage_spot: '단풍명소_보기',
my_gak_save: '내각_저장',
fortune_draw: '타로_뽑기',
day_log: '하루_기록',
today_icon: '오늘아이콘_누름',
saju_input: '사주_입력',
saju_view: '사주_결과',
game_start: '게임_시작',
game_round: '게임_라운드',
game_over: '게임_끝',
toss_intro_start: '토스소개_시작',
install_banner_close: '설치배너_닫기',
}
export function track<E extends keyof Events>(event: E, params: Events[E]) {
if (import.meta.env.DEV) return
window.gtag?.('event', event, params)
window.gtag?.('event', GA_NAME[event], params)
}