- Add desktop/ directory for Claude Desktop (Phase 1-5: analysis, design, docs) - Add code/ directory for Claude Code (Phase 6-7: automation, audit) - Create SKILL.md with YAML frontmatter for Desktop compatibility - Create CLAUDE.md for Code automation workflows - Organize references by platform scope with shared files duplicated - Add templates for tagging plan and event taxonomy - Include README.md with overview and usage guide 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2.7 KiB
2.7 KiB
Server-side GTM Guide
sGTM 아키텍처 옵션 및 설정 가이드.
Why Server-side GTM?
| Benefit | Description |
|---|---|
| Data Control | 클라이언트 → 서버 → 벤더 흐름 제어 |
| Privacy | PII 필터링, 서버에서 처리 |
| Cookie Duration | 1st-party cookie (최대 2년) |
| Performance | 클라이언트 JS 감소 |
| Reliability | Ad blocker 영향 최소화 |
Architecture Options
Option 1: GCP Cloud Run
Browser → Your Domain (1st-party) → GCP Cloud Run → GA4/Ads/Meta
- Pros: 완전한 제어, GCP 통합
- Cons: GCP 전문 지식 필요
- Cost: Low ~$20, Medium ~$100, High $200+/월
Option 2: Stape.io (Managed)
Browser → Stape CDN → Stape Server → GA4/Ads/Meta
- Pros: 간편 설정 (10분), 관리형, 한국 리전
- Cons: 월정액, 벤더 종속
- Cost: Starter $20, Business $50, Scale $150/월
Option 3: Google Tag Gateway
Browser → Google Gateway → Google Cloud (Managed) → GA4/Ads
- Pros: Google 관리형, 무료(제한적)
- Cons: Google 태그만 지원, 제한된 커스터마이징
Selection Guide
| Requirement | Recommendation |
|---|---|
| Google 태그만 | Tag Gateway |
| 빠른 구현 | Stape.io |
| 완전한 제어 | GCP Cloud Run |
| Third-party 태그 (Meta 등) | Stape 또는 GCP |
Client Configuration
Web Container 설정
gtag('config', 'G-XXXXXXXXXX', {
'server_container_url': 'https://gtm.yourdomain.com'
});
GTM GA4 Configuration Tag
Advanced Settings:
Server container URL: https://gtm.yourdomain.com
Stape Quick Setup
- 계정 생성: stape.io
- Container 생성: Region = Seoul (asia-northeast3)
- Custom Domain 연결
DNS: gtm.example.com CNAME [stape-provided-address] - GTM Server Container ID 연결
- Web Container 수정: server_container_url 추가
Server Tags
GA4 Tag
Measurement ID: G-XXXXXXXXXX
Event Name: {{Event Name}}
Event Parameters: {{Event Data}}
Google Ads Conversion
Conversion ID: AW-XXXXXXXXX
Conversion Label: [Label]
Enhanced Conversions: Enabled
Meta Conversions API
Pixel ID: [ID]
API Access Token: [Token]
Event Name: {{Event Name}}
Testing
- Preview Mode: GTM Server Container → Preview
- Validation:
- Client → Server 요청 도달
- Server → Platform 전송 확인
- Cookie 설정 확인 (1st-party)
- Latency < 200ms
Common Issues
| Issue | Solution |
|---|---|
| 요청 미도달 | CORS, Custom domain 확인 |
| Cookie 미설정 | Same-site 정책, 도메인 확인 |
| Timeout | 리전 최적화, 스케일링 |