- 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>
169 lines
5.2 KiB
Markdown
169 lines
5.2 KiB
Markdown
# GTM Guardian (Code)
|
|
|
|
GTM 태깅 라이프사이클의 자동화 및 유지보수 단계를 지원하는 Claude Code 스킬.
|
|
|
|
**Code 범위**: Phase 6-7 (Progressive Audit, Lookup App), GTM Toolkit 연계
|
|
|
|
> Desktop 스킬에서 Phase 1-5 (분석, 설계, 문서화)를 수행한 후 사용.
|
|
|
|
## Quick Commands
|
|
|
|
```bash
|
|
# D.intelligence GTM Toolkit 클론
|
|
git clone https://github.com/ourdigital/dintel-gtm-toolkit.git
|
|
|
|
# GTM Container 분석
|
|
python analyze_container.py GTM-XXXXXX.json --output report.md
|
|
|
|
# 버전 비교
|
|
python diff_versions.py v1.json v2.json --output diff.md
|
|
|
|
# 미사용 요소 탐지
|
|
python find_unused.py container.json --type all
|
|
```
|
|
|
|
## Workflow Overview
|
|
|
|
| Phase | Name | Output | Tools |
|
|
|-------|------|--------|-------|
|
|
| 6 | Progressive Audit | 진단 리포트, 업데이트 | D.intel GTM Toolkit, Python |
|
|
| 7 | Lookup App | 이벤트 조회 앱 | Google Apps Script |
|
|
|
|
## Phase 6: Progressive Audit
|
|
|
|
### D.intelligence GTM Toolkit Integration
|
|
|
|
**Repository**: https://github.com/ourdigital/dintel-gtm-toolkit
|
|
|
|
### Capabilities
|
|
|
|
| Feature | Description | Use Case |
|
|
|---------|-------------|----------|
|
|
| Container Analysis | JSON 파싱, 구조 분석 | 컨테이너 리뷰 |
|
|
| Dependency Mapping | 태그↔트리거↔변수 관계 | 영향도 분석 |
|
|
| Version Diff | 버전 간 변경사항 비교 | 변경 추적 |
|
|
| Tag Validation | 발화 상태 자동 검증 | 정기 감사 |
|
|
|
|
### Audit Workflow
|
|
|
|
```
|
|
1. GTM Container Export
|
|
└── JSON 파일 다운로드 (GTM Admin > Container > Export)
|
|
|
|
2. D.intel Toolkit Analysis
|
|
├── python analyze_container.py container.json
|
|
├── Dependency graph 생성
|
|
└── Issue detection
|
|
|
|
3. Report Generation
|
|
└── Markdown/HTML 리포트
|
|
|
|
4. Notion 업로드
|
|
└── MCP 또는 수동 업로드
|
|
```
|
|
|
|
### Audit Schedule
|
|
|
|
| Frequency | Scope | Trigger |
|
|
|-----------|-------|---------|
|
|
| Weekly | Tag firing validation | 자동 스케줄 |
|
|
| Monthly | Full container review | 월간 리포트 |
|
|
| Quarterly | Architecture review | 분기 회의 |
|
|
| Ad-hoc | Issue investigation | 이슈 발생 시 |
|
|
|
|
## Phase 7: Lookup App
|
|
|
|
Google Apps Script 기반 Event Taxonomy 조회 앱 배포.
|
|
|
|
### Architecture
|
|
```
|
|
┌─────────────────┐ ┌─────────────────┐ ┌─────────────────┐
|
|
│ Google Sheets │────▶│ Apps Script │────▶│ Web App │
|
|
│ (Taxonomy DB) │ │ (Backend) │ │ (Frontend) │
|
|
└─────────────────┘ └─────────────────┘ └─────────────────┘
|
|
```
|
|
|
|
### Quick Setup
|
|
1. Google Sheets에서 Extensions > Apps Script
|
|
2. `references/phase7-lookup-app.md` 코드 참조
|
|
3. Deploy > New deployment > Web app
|
|
|
|
## Key References
|
|
|
|
- [phase6-audit.md](references/phase6-audit.md) - 진단 워크플로우, 체크리스트
|
|
- [phase7-lookup-app.md](references/phase7-lookup-app.md) - Apps Script 코드, 배포 가이드
|
|
|
|
### Shared References
|
|
- [datalayer-schema.md](references/datalayer-schema.md) - DataLayer 스키마
|
|
- [platform-mapping.md](references/platform-mapping.md) - 플랫폼별 이벤트 매핑
|
|
- [naming-conventions.md](references/naming-conventions.md) - 네이밍 규칙
|
|
- [qa-checklist.md](references/qa-checklist.md) - QA 체크리스트
|
|
|
|
## Notion Output
|
|
|
|
**Database**: [GTM Knowledge Base](https://www.notion.so/dintelligence/2cf581e58a1e80c8b358f1625356e931)
|
|
|
|
### Report Properties
|
|
|
|
| Property | Type | Description |
|
|
|----------|------|-------------|
|
|
| Project | Title | 프로젝트명 |
|
|
| Audit Date | Date | 감사 일자 |
|
|
| Container ID | Rich Text | GTM-XXXXXX |
|
|
| Status | Select | Healthy / Needs Attention / Critical |
|
|
| Version | Number | 컨테이너 버전 |
|
|
| Issues Count | Number | 발견 이슈 수 |
|
|
|
|
### Language Guidelines
|
|
- 리포트 내용은 한국어로 작성
|
|
- 기술 용어는 영어 유지 (GTM, dataLayer, GA4 등)
|
|
- 코드와 URL은 변경 없이 유지
|
|
|
|
## Common Tasks
|
|
|
|
### Container 분석 실행
|
|
```bash
|
|
cd dintel-gtm-toolkit
|
|
python analyze_container.py /path/to/GTM-XXXXXX.json \
|
|
--output /path/to/report.md \
|
|
--format markdown
|
|
```
|
|
|
|
### 버전 비교
|
|
```bash
|
|
python diff_versions.py \
|
|
/path/to/container_v1.json \
|
|
/path/to/container_v2.json \
|
|
--output diff_report.md
|
|
```
|
|
|
|
### 미사용 요소 탐지
|
|
```bash
|
|
python find_unused.py /path/to/container.json \
|
|
--type all \
|
|
--output unused_elements.md
|
|
```
|
|
|
|
## Update Procedures
|
|
|
|
### Minor Update (태그 수정)
|
|
1. 변경 필요 태그 식별
|
|
2. GTM Preview 모드에서 수정
|
|
3. 테스트 완료
|
|
4. Publish with version note
|
|
5. Notion 문서 업데이트
|
|
|
|
### Major Update (신규 태그 추가)
|
|
1. Desktop 스킬로 Phase 3-4 문서 업데이트
|
|
2. DataLayer 요구사항 개발팀 전달
|
|
3. GTM 태그/트리거/변수 설정
|
|
4. QA 체크리스트 수행
|
|
5. 단계적 배포
|
|
|
|
## Coding Guidelines
|
|
|
|
GTM Toolkit 수정 시:
|
|
1. **Tag Destinations**: `TAG_DESTINATIONS` dict에 플랫폼 추가
|
|
2. **Event Validation**: `GA4_EVENT_REQUIREMENTS` dict에 요구사항 추가
|
|
3. **Korean Patterns**: 한국 결제 수단 (카카오페이, 네이버페이, 토스) 지원
|