98 lines
4.3 KiB
TypeScript
98 lines
4.3 KiB
TypeScript
/** 히어로·오늘의 각·단풍 지도·띠처럼 포스트 틀이 아닌 카드 (피드 응답의 반응 칸 이름) */
|
|
export type PinnedKey = 'hero_post' | 'gak_post' | 'foliage_post' | 'events_post' | 'season_post'
|
|
|
|
export type HolidayKey = 'halloween' | 'pepero' | 'christmas' | 'chuseok'
|
|
|
|
/** GA4로 보내는 이벤트와 값 (웹·앱 같이 씀). 목록은 docs/이벤트_추적.md. Sheet 는 화면마다 다른 창 이름 */
|
|
export type Events<Sheet extends string = string> = {
|
|
view_gak: { index_id: number; gak_name: string; score: number; rank: number }
|
|
select_content: { content_type: 'article'; item_id: number; category: string }
|
|
share: { content_type: 'image'; item_id: string; method: 'share_sheet' | 'download'; ratio: string }
|
|
login: { method: 'id' | 'google' | 'toss' }
|
|
sign_up: { method: 'id' | 'google' | 'toss' }
|
|
region_change: { region_name: string; method: 'list' | 'location' }
|
|
install_banner_view: Record<string, never>
|
|
install_click: { from: 'banner' | 'menu'; method: 'prompt' | 'guide' }
|
|
install_choice: { outcome: 'accepted' | 'dismissed' }
|
|
install_done: Record<string, never>
|
|
app_launch: { mode: 'standalone' }
|
|
/** index.html 첫 화면 스크립트가 gtag 로 바로 보낸다 */
|
|
boot_stuck: { reason: string; seconds: number; tries: number; app_started: boolean }
|
|
sheet_open: { sheet: Sheet }
|
|
like: { content_type: 'post' | 'comment' | 'talk' | PinnedKey; item_id: number }
|
|
comment: { post_id: number }
|
|
talk_comment: { talk_id: number }
|
|
report: { content_type: 'comment' | 'talk'; reason: number }
|
|
block: { content_type: 'comment' | 'talk' }
|
|
terms_agree: Record<string, never>
|
|
talk_post: { topic: number; with_image: boolean }
|
|
feed_item_view: { item_type: 'talk' | 'event'; position: number }
|
|
hero_day_switch: { day: 'today' | 'tomorrow' }
|
|
tomorrow_to_today: { region_name: string }
|
|
search_landing: { page: 'today' | 'tomorrow'; engine: 'google' | 'naver'; copy: 'new' | 'old' | 'none' }
|
|
shorts_open: { video_id: string }
|
|
shorts_view: { video_id: string; index: number }
|
|
shorts_sound: { on: boolean }
|
|
foliage_open: Record<string, never>
|
|
foliage_spot: { spot_name: string; from: 'page' | 'card' }
|
|
my_gak_save: { gak_name: string }
|
|
fortune_draw: { card: string }
|
|
day_log: { mood: number; went_out: boolean; card_hit: boolean | null }
|
|
today_icon: { icon: string }
|
|
saju_input: { with_time: boolean }
|
|
saju_view: { scene: string; score: number; strength: string; top_element: string }
|
|
game_start: { again: boolean; logged_in: boolean; wind_ms: number; theme: 'basic' | HolidayKey }
|
|
game_round: { round: number; score: number; logged_in: boolean }
|
|
game_over: { round: number; score: number; best: boolean; drops: number }
|
|
toss_intro_start: Record<string, never>
|
|
install_banner_close: Record<string, never>
|
|
top_button: { page: string }
|
|
contact_click: { method: 'phone' | 'email' }
|
|
}
|
|
|
|
/** GA 에 찍히는 이벤트 이름 (한국어). 코드에서는 왼쪽 키로 부른다 */
|
|
export 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: '내일에서_오늘로',
|
|
search_landing: '검색_유입',
|
|
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: '설치배너_닫기',
|
|
top_button: '맨위로_누름',
|
|
contact_click: '문의_누름',
|
|
}
|