feat: GTM 태그와 이벤트 추적(각·글 보기, 공유, 로그인·가입, 지역 변경)

This commit is contained in:
minaChoi committed 2026-10-08 10:54:18 +09:00
1 parent e8382f450b
commit ce6efe979a
5 files changed
+102 -1

No files matched your search

+2
View File
@@ -1,6 +1,7 @@
import { useCallback, useEffect, useMemo, useState, type ReactNode } from 'react'
import { nearestRegion } from '../api/client/sdk.gen'
import type { RegionData } from '../api/client/types.gen'
import { track } from '../lib/analytics'
import { DEFAULT_REGION, RegionContext, type LocateStatus } from './regionContext'
const KEY = 'nalssigak.b.region'
@@ -43,6 +44,7 @@ export function RegionProvider({ children }: { children: ReactNode }) {
if (!res.region) throw new Error('가까운 구를 찾지 못함')
setRegion(res.region)
setLocateStatus('idle')
track('region_change', { region_name: res.region.name, method: 'location' })
})
.catch(() => setLocateStatus('error'))
},