feat: webforai.kr 방문 측정 (GTM·GA4) 연결과 처리방침 반영
- discovery 빌드에만 GTM(GTM-WQNTZVZH) 스니펫을 넣는다. GA4(G-013Z3BFY35)와 키 이벤트는 컨테이너 안에서 설정한다 - 문의 접수 성공 시 dataLayer 에 generate_lead(lead_source) 를 보낸다. 개인정보는 넣지 않는다 - GTM 가져오기 파일(docs/analytics/gtm_webforai_import.json): GA4 기본 태그, generate_lead·click_tel·click_email - 개인정보처리방침 제1·5·8조에 Google 애널리틱스 분석 쿠키, 수집 항목, 국외 이전, 거부 방법을 반영한다 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
f03c6a5b90
commit
c90aef654f
5 files changed
+305
-4
No files matched your search
@@ -0,0 +1,11 @@
|
||||
/**
|
||||
* 방문 측정 이벤트. GTM 이 있는 배포(webforai.kr)에서만 dataLayer 로 넘기고, 없으면 아무것도 하지 않는다.
|
||||
* 이벤트에는 개인정보(이름·연락처·문의 내용)를 넣지 않는다. 어느 버튼에서 왔는지 같은 화면 정보만 보낸다.
|
||||
*/
|
||||
type DataLayerWindow = Window & { dataLayer?: Record<string, unknown>[] };
|
||||
|
||||
export function trackEvent(event: string, params: Record<string, string> = {}): void {
|
||||
const w = window as DataLayerWindow;
|
||||
if (!Array.isArray(w.dataLayer)) return;
|
||||
w.dataLayer.push({ event, ...params });
|
||||
}
|
||||
Reference in new issue
Block a user