fix: 구글·토스로 처음 들어와 계정이 생기면 GA sign_up — 서버 응답 is_new, 다시 들어오면 login

This commit is contained in:
minaChoi committed 2026-10-30 11:49:01 +09:00
1 parent 1f040bc6d4
commit 442441931f
8 files changed
+59 -28

No files matched your search

+4 -2
View File
@@ -1061,7 +1061,8 @@ function LoginSheet({ onDone, onLoggedIn, why }: { onDone: () => void; onLoggedI
return
}
setTokens(res.access_token, res.refresh_token ?? null)
track('login', { method: 'google' })
if (res.is_new) track('sign_up', { method: 'google' })
else track('login', { method: 'google' })
onLoggedIn()
}
const fail = () => setError('서버에 닿지 못했어요. 잠시 뒤에 다시 해 주세요.')
@@ -1117,7 +1118,8 @@ function TossLoginSheet({ onDone, onLoggedIn }: { onDone: () => void; onLoggedIn
onSuccess: (res) => {
if (!res.result?.success || !res.access_token) return setError('토스 로그인을 마치지 못했어요. 한 번 더 눌러 주세요.')
setTokens(res.access_token, res.refresh_token ?? null)
track('login', { method: 'toss' })
if (res.is_new) track('sign_up', { method: 'toss' })
else track('login', { method: 'toss' })
onLoggedIn()
},
onError: () => setError('서버에 닿지 못했어요. 잠시 뒤에 다시 해 주세요.'),
+1 -1
View File
@@ -8,7 +8,7 @@ type Events = {
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' }
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' }