feat: GA4 전환 이벤트 추적 + 전 페이지 스크롤 리빌 애니메이션

- lib/gtag.ts: GA4 이벤트 유틸리티 (trackCTAClick, trackToolDemo, trackDownload, trackOutboundClick)
- ContactModal/ContactForm: 공용 trackEvent로 리팩토링 + generate_lead 이벤트
- 홈/tools/automation/prompt/website: CTA 클릭 이벤트 추적 추가
- 홈/freelance/ai-kit: IntersectionObserver 스크롤 리빌 애니메이션 신규 추가
- automation/prompt: GA4 trackCTAClick 적용

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-04-03 07:34:17 +09:00
parent c7bf0253e3
commit 5d2fd4be1f
10 changed files with 230 additions and 60 deletions

View File

@@ -2,6 +2,7 @@
import { useState, useEffect, Suspense } from 'react';
import { useSearchParams } from 'next/navigation';
import { trackEvent } from '../../lib/gtag';
function ContactFormInner() {
const searchParams = useSearchParams();
@@ -36,6 +37,10 @@ function ContactFormInner() {
const data = await response.json();
if (!response.ok) throw new Error(data.error || '문의 전송에 실패했습니다.');
setStatus('success');
trackEvent('generate_lead', {
event_category: 'contact',
event_label: formData.service,
});
setFormData({ name: '', phone: '', email: '', service: '외주 개발 문의', message: '' });
setTimeout(() => setStatus('idle'), 5000);
} catch (error) {