fix: 구글·토스로 처음 들어와 계정이 생기면 GA sign_up — 서버 응답 is_new, 다시 들어오면 login
This commit is contained in:
1 parent
1f040bc6d4
commit
442441931f
8 files changed
+59
-28
No files matched your search
@@ -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('서버에 닿지 못했어요. 잠시 뒤에 다시 해 주세요.'),
|
||||
|
||||
Reference in new issue
Block a user