/** 히어로·오늘의 각·단풍 지도·띠처럼 포스트 틀이 아닌 카드 (피드 응답의 반응 칸 이름) */ export type PinnedKey = 'hero_post' | 'gak_post' | 'foliage_post' | 'events_post' | 'season_post' export type HolidayKey = 'halloween' | 'pepero' | 'christmas' | 'chuseok' | 'suneung' | 'newyear' /** GA4로 보내는 이벤트와 값 (웹·앱 같이 씀). 목록은 docs/이벤트_추적.md. Sheet 는 화면마다 다른 창 이름 */ export type Events = { 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' } /** auto: 위치로 맞춘 사람이 다시 들어오거나 돌아왔을 때 지금 위치로 구가 바뀜 */ region_change: { region_name: string; method: 'list' | 'location' | 'auto' } install_banner_view: Record install_click: { from: 'banner' | 'menu'; method: 'prompt' | 'guide' } install_choice: { outcome: 'accepted' | 'dismissed' } install_done: Record /** 홈 화면 아이콘(standalone)이나 날씨각 안드로이드 앱(android_app, 웹뷰)으로 엶 */ app_launch: { mode: 'standalone' | 'android_app'; version?: string } /** 앱 안에서 웹이 앱에 시킨 일(구글 로그인·공유·위치)이 실패함. 사용자가 닫은 것은 안 보냄 */ app_bridge_error: { action: 'google_login' | 'share' | 'location' } /** 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 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' } region_about_open: { region_name: string } shorts_open: { video_id: string } shorts_view: { video_id: string; index: number } shorts_sound: { on: boolean } shorts_preview: { video_id: string; trigger: 'hover' | 'auto' } foliage_open: Record foliage_spot: { spot_name: string; from: 'page' | 'card' } first_snow_open: Record first_snow_spot: { spot_name: string; from: 'page' | 'card' } sunrise_open: Record sunrise_spot: { spot_name: string; from: 'page' | 'card' } sunrise_day: { day: 'next' | 'newyear' } 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 } /** 바깥에서 날씨 유형 결과 주소(/type/유형)로 바로 들어옴 — 친구가 보낸 링크 */ type_landing: { type: string } /** from_type: 어느 유형의 결과 화면에서 넘어왔는지 (없으면 'none') */ type_start: { from_type: string; again: boolean } type_result: { type: string; from_type: string } /** mine: 방금 테스트해서 나온 내 결과를 보내는지 */ type_share: { type: string; method: 'share_sheet' | 'copy' | 'toss'; mine: boolean } type_gak: { type: string; index_code: string; score: number } type_match: { type: string; to_type: string; level: 'best' | 'good' | 'fun' | 'bad' } type_to_today: { type: string } toss_intro_start: Record /** 토스판 '광고 보고 응원하기' 카드를 누름 */ toss_ad_click: Record /** 광고가 실제로 노출됨 (토스 SDK impression) */ toss_ad_impression: Record toss_ad_dismiss: Record /** stage: 불러오지 못함(load)·보여 주지 못함(show)·10초 넘게 불러오는 중(timeout) */ toss_ad_fail: { stage: 'load' | 'show' | 'timeout' } install_banner_close: Record top_button: { page: string } contact_click: { method: 'phone' | 'email' } } /** GA 에 찍히는 이벤트 이름 (한국어). 코드에서는 왼쪽 키로 부른다 */ export const GA_NAME: Record = { view_gak: '각_보기', select_content: '글_열기', share: '공유', login: '로그인', sign_up: '회원가입', region_change: '지역_변경', install_banner_view: '설치배너_노출', install_click: '설치_누름', install_choice: '설치_선택', install_done: '설치_완료', app_launch: '앱_실행', app_bridge_error: '앱_연결_오류', 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: '검색_유입', region_about_open: '지역안내_펼침', shorts_open: '쇼츠_열기', shorts_view: '쇼츠_보기', shorts_sound: '쇼츠_소리', shorts_preview: '쇼츠_미리보기', foliage_open: '단풍지도_열기', foliage_spot: '단풍명소_보기', first_snow_open: '첫눈지도_열기', first_snow_spot: '첫눈지점_보기', sunrise_open: '해돋이지도_열기', sunrise_spot: '해돋이명소_보기', sunrise_day: '해돋이날짜_전환', my_gak_save: '내각_저장', fortune_draw: '타로_뽑기', day_log: '하루_기록', today_icon: '오늘아이콘_누름', saju_input: '사주_입력', saju_view: '사주_결과', game_start: '게임_시작', game_round: '게임_라운드', game_over: '게임_끝', type_landing: '유형_유입', type_start: '유형_시작', type_result: '유형_결과', type_share: '유형_공유', type_gak: '유형_각_누름', type_match: '유형_궁합_누름', type_to_today: '유형_오늘로', toss_intro_start: '토스소개_시작', toss_ad_click: '토스광고_누름', toss_ad_impression: '토스광고_노출', toss_ad_dismiss: '토스광고_닫음', toss_ad_fail: '토스광고_실패', install_banner_close: '설치배너_닫기', top_button: '맨위로_누름', contact_click: '문의_누름', }