From b859d0a2660f25cfc552b1676432951b2819fec2 Mon Sep 17 00:00:00 2001 From: Andrew Yim Date: Wed, 31 Dec 2025 19:59:22 +0900 Subject: [PATCH] feat(gtm-guardian): Reorganize skill with dual-platform structure MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 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 --- custom-skills/22-gtm-guardian/README.md | 98 ++++++ custom-skills/22-gtm-guardian/code/CLAUDE.md | 168 +++++++++++ .../code/references/datalayer-schema.md | 193 ++++++++++++ .../code/references/naming-conventions.md | 130 ++++++++ .../code/references/phase6-audit.md | 215 +++++++++++++ .../code/references/phase7-lookup-app.md | 283 ++++++++++++++++++ .../code/references/platform-mapping.md | 125 ++++++++ .../code/references/qa-checklist.md | 149 +++++++++ .../22-gtm-guardian/code/scripts/README.md | 32 ++ .../22-gtm-guardian/desktop/SKILL.md | 121 ++++++++ .../desktop/references/datalayer-schema.md | 193 ++++++++++++ .../desktop/references/naming-conventions.md | 130 ++++++++ .../desktop/references/phase1-analysis.md | 115 +++++++ .../desktop/references/phase2-behaviour.md | 167 +++++++++++ .../desktop/references/phase3-tagging-plan.md | 169 +++++++++++ .../desktop/references/phase4-taxonomy.md | 159 ++++++++++ .../references/phase5-implementation.md | 208 +++++++++++++ .../desktop/references/platform-mapping.md | 125 ++++++++ .../desktop/references/qa-checklist.md | 149 +++++++++ .../desktop/references/sgtm-guide.md | 113 +++++++ .../templates/event-taxonomy-template.csv | 25 ++ .../templates/tagging-plan-template.md | 147 +++++++++ 22 files changed, 3214 insertions(+) create mode 100644 custom-skills/22-gtm-guardian/README.md create mode 100644 custom-skills/22-gtm-guardian/code/CLAUDE.md create mode 100644 custom-skills/22-gtm-guardian/code/references/datalayer-schema.md create mode 100644 custom-skills/22-gtm-guardian/code/references/naming-conventions.md create mode 100644 custom-skills/22-gtm-guardian/code/references/phase6-audit.md create mode 100644 custom-skills/22-gtm-guardian/code/references/phase7-lookup-app.md create mode 100644 custom-skills/22-gtm-guardian/code/references/platform-mapping.md create mode 100644 custom-skills/22-gtm-guardian/code/references/qa-checklist.md create mode 100644 custom-skills/22-gtm-guardian/code/scripts/README.md create mode 100644 custom-skills/22-gtm-guardian/desktop/SKILL.md create mode 100644 custom-skills/22-gtm-guardian/desktop/references/datalayer-schema.md create mode 100644 custom-skills/22-gtm-guardian/desktop/references/naming-conventions.md create mode 100644 custom-skills/22-gtm-guardian/desktop/references/phase1-analysis.md create mode 100644 custom-skills/22-gtm-guardian/desktop/references/phase2-behaviour.md create mode 100644 custom-skills/22-gtm-guardian/desktop/references/phase3-tagging-plan.md create mode 100644 custom-skills/22-gtm-guardian/desktop/references/phase4-taxonomy.md create mode 100644 custom-skills/22-gtm-guardian/desktop/references/phase5-implementation.md create mode 100644 custom-skills/22-gtm-guardian/desktop/references/platform-mapping.md create mode 100644 custom-skills/22-gtm-guardian/desktop/references/qa-checklist.md create mode 100644 custom-skills/22-gtm-guardian/desktop/references/sgtm-guide.md create mode 100644 custom-skills/22-gtm-guardian/desktop/templates/event-taxonomy-template.csv create mode 100644 custom-skills/22-gtm-guardian/desktop/templates/tagging-plan-template.md diff --git a/custom-skills/22-gtm-guardian/README.md b/custom-skills/22-gtm-guardian/README.md new file mode 100644 index 0000000..6b72fa5 --- /dev/null +++ b/custom-skills/22-gtm-guardian/README.md @@ -0,0 +1,98 @@ +# GTM Guardian + +Google Tag Manager νƒœκΉ… μ „λž΅ μˆ˜λ¦½λΆ€ν„° κ΅¬ν˜„, μœ μ§€λ³΄μˆ˜κΉŒμ§€ 7단계 μ›Œν¬ν”Œλ‘œμš°λ₯Ό μ§€μ›ν•˜λŠ” SMART Tool. + +## Overview + +GTM Guardian은 GTM νƒœκΉ…μ˜ 전체 라이프사이클을 μ²΄κ³„μ μœΌλ‘œ κ΄€λ¦¬ν•©λ‹ˆλ‹€: + +| Phase | Name | Description | +|-------|------|-------------| +| 1 | Web/App Analysis | DOM 뢄석, νƒœκΉ… κ°€λŠ₯ μš”μ†Œ 식별 | +| 2 | User Behaviour & KPI | μ‚¬μš©μž μ—¬μ • 뢄석, KPI μ •μ˜ | +| 3 | Tagging Plan | 맞좀 이벀트, νŒŒλΌλ―Έν„° 섀계 | +| 4 | Event Taxonomy | 이벀트 νƒμ†Œλ…Έλ―Έ μ‹œνŠΈ ꡬ쑰화 | +| 5 | Implementation Guide | κ΅¬ν˜„ μˆœμ„œ, 개발자 κ°€μ΄λ“œ | +| 6 | Progressive Audit | 주기적 진단 및 μ—…λ°μ΄νŠΈ | +| 7 | Lookup App | 이벀트 쑰회 μ›Ήμ•± | + +## Dual-Platform Structure + +이 μŠ€ν‚¬μ€ Claude Desktopκ³Ό Claude Code μ–‘μͺ½μ—μ„œ μ‚¬μš© κ°€λŠ₯ν•©λ‹ˆλ‹€: + +``` +22-gtm-guardian/ +β”œβ”€β”€ desktop/ # Claude Desktop 버전 +β”‚ β”œβ”€β”€ SKILL.md # MCP 기반 μ›Œν¬ν”Œλ‘œμš° (Phase 1-5) +β”‚ β”œβ”€β”€ references/ # 뢄석/섀계 κ°€μ΄λ“œ +β”‚ └── templates/ # νƒœκΉ… κ³„νšμ„œ, νƒμ†Œλ…Έλ―Έ ν…œν”Œλ¦Ώ +β”‚ +β”œβ”€β”€ code/ # Claude Code 버전 +β”‚ β”œβ”€β”€ CLAUDE.md # μžλ™ν™” 및 μœ μ§€λ³΄μˆ˜ (Phase 6-7) +β”‚ β”œβ”€β”€ scripts/ # GTM Toolkit 연계 +β”‚ └── references/ # 감사/μ•± κ°€μ΄λ“œ +β”‚ +└── README.md +``` + +### Platform μ—­ν•  λΆ„λ‹΄ + +| Platform | Phases | Focus | +|----------|--------|-------| +| **Desktop** | 1-5 | 뢄석, 섀계, λ¬Έμ„œ μž‘μ„±, Browser 뢄석, Notion 연동 | +| **Code** | 6-7 | GTM Toolkit 연계, Python 슀크립트, API μžλ™ν™” | + +## Quick Start + +### Claude Desktop +1. `desktop/SKILL.md`λ₯Ό Claude Desktop 섀정에 μΆ”κ°€ +2. "GTM νƒœκΉ… κ³„νš μž‘μ„±ν•΄μ€˜" λ“±μœΌλ‘œ μ‹œμž‘ +3. Phase 1-5 μ›Œν¬ν”Œλ‘œμš° μžλ™ μ§„ν–‰ + +### Claude Code +1. `code/CLAUDE.md` λ””λ ‰ν† λ¦¬μ—μ„œ μž‘μ—… +2. D.intel GTM Toolkit 클둠 +3. Phase 6-7 μžλ™ν™” μž‘μ—… μˆ˜ν–‰ + +## Key Features + +### DataLayer & Events +- GA4 ꢌμž₯ 이벀트 기반 μŠ€ν‚€λ§ˆ +- GA4, Meta, Kakao, Google Ads ν”Œλž«νΌ λ§€ν•‘ +- μΌκ΄€λœ 넀이밍 κ·œμΉ™ + +### Server-side GTM +- GCP Cloud Run, Stape.io, Google Tag Gateway μ˜΅μ…˜ +- 1st-party μΏ ν‚€, Privacy κ°•ν™” + +### Automation +- D.intelligence GTM Toolkit 연계 +- Container 뢄석, 버전 비ꡐ, λ―Έμ‚¬μš© μš”μ†Œ 탐지 +- Notion μžλ™ μ €μž₯ + +## Site Type Support + +| Site Type | Key Events | +|-----------|------------| +| E-commerce | view_item, add_to_cart, purchase | +| Lead Gen | generate_lead, form_submit | +| SaaS | sign_up, subscription_* | +| Media | article_view, scroll, video_* | +| B2B | demo_request, pricing_view | + +## Related Resources + +- [D.intelligence GTM Toolkit](https://github.com/ourdigital/dintel-gtm-toolkit) +- [GTM Knowledge Base (Notion)](https://www.notion.so/dintelligence/2cf581e58a1e80c8b358f1625356e931) + +## Triggers + +이 μŠ€ν‚¬μ€ λ‹€μŒ ν‚€μ›Œλ“œμ— λ°˜μ‘ν•©λ‹ˆλ‹€: + +- GTM νƒœκΉ… κ³„νš, Tagging Plan μž‘μ„±, 이벀트 섀계 +- DataLayer μŠ€ν‚€λ§ˆ 섀계, dataLayer κ΅¬ν˜„ κ°€μ΄λ“œ +- μ‚¬μš©μž 행동 뢄석, User Behaviour Modeling, KPI μ •μ˜ +- Event Taxonomy, 이벀트 νƒμ†Œλ…Έλ―Έ, 이벀트 λͺ…λͺ… κ·œμΉ™ +- GTM κ΅¬ν˜„ κ°€μ΄λ“œ, νƒœκ·Έ μ„€μ • 체크리슀트 +- Server-side GTM, sGTM, Stape +- GTM 감사, 진단, audit diff --git a/custom-skills/22-gtm-guardian/code/CLAUDE.md b/custom-skills/22-gtm-guardian/code/CLAUDE.md new file mode 100644 index 0000000..b4ba91e --- /dev/null +++ b/custom-skills/22-gtm-guardian/code/CLAUDE.md @@ -0,0 +1,168 @@ +# 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**: ν•œκ΅­ 결제 μˆ˜λ‹¨ (카카였페이, λ„€μ΄λ²„νŽ˜μ΄, ν† μŠ€) 지원 diff --git a/custom-skills/22-gtm-guardian/code/references/datalayer-schema.md b/custom-skills/22-gtm-guardian/code/references/datalayer-schema.md new file mode 100644 index 0000000..2ec93bd --- /dev/null +++ b/custom-skills/22-gtm-guardian/code/references/datalayer-schema.md @@ -0,0 +1,193 @@ +# DataLayer Schema Reference + +GA4 ꢌμž₯ 이벀트 기반 DataLayer μŠ€ν‚€λ§ˆ μ •μ˜. + +## Core Principles + +1. GTM μŠ€λ‹ˆνŽ« 이전에 dataLayer μ΄ˆκΈ°ν™” +2. 이벀트 λ°œμƒ μ‹œμ μ— push (사전 μ•„λ‹˜) +3. ecommerce κ°μ²΄λŠ” push μ „ clear ν•„μˆ˜ +4. PII 데이터 직접 μˆ˜μ§‘ κΈˆμ§€ + +## Base Structure + +### Page Load +```javascript +window.dataLayer = window.dataLayer || []; +dataLayer.push({ + 'event': 'page_data', + 'page': { + 'type': 'home|category|product|cart|checkout|thankyou|content|search', + 'name': 'Page Name', + 'category': 'Category/Subcategory', + 'language': 'ko' + }, + 'user': { + 'status': 'logged_in|logged_out', + 'id': 'hashed_user_id', // SHA256, 둜그인 μ‹œμ—λ§Œ + 'type': 'new|returning|member|guest', + 'loginMethod': 'email|kakao|naver|google' + } +}); +``` + +## E-commerce Events + +### view_item +```javascript +dataLayer.push({ ecommerce: null }); +dataLayer.push({ + 'event': 'view_item', + 'ecommerce': { + 'currency': 'KRW', + 'value': 29000, + 'items': [{ + 'item_id': 'SKU_12345', + 'item_name': 'Product Name', + 'item_brand': 'Brand Name', + 'item_category': 'Category', + 'item_variant': 'Blue / Large', + 'price': 29000, + 'quantity': 1 + }] + } +}); +``` + +### add_to_cart +```javascript +dataLayer.push({ ecommerce: null }); +dataLayer.push({ + 'event': 'add_to_cart', + 'ecommerce': { + 'currency': 'KRW', + 'value': 29000, + 'items': [{ + 'item_id': 'SKU_12345', + 'item_name': 'Product Name', + 'price': 29000, + 'quantity': 1 + }] + } +}); +``` + +### begin_checkout +```javascript +dataLayer.push({ ecommerce: null }); +dataLayer.push({ + 'event': 'begin_checkout', + 'ecommerce': { + 'currency': 'KRW', + 'value': 58000, + 'coupon': 'WELCOME10', + 'items': [/* cart items */] + } +}); +``` + +### purchase +```javascript +dataLayer.push({ ecommerce: null }); +dataLayer.push({ + 'event': 'purchase', + 'ecommerce': { + 'transaction_id': 'T_20250115_001', + 'affiliation': 'Store Name', + 'value': 53000, + 'tax': 4818, + 'shipping': 3000, + 'currency': 'KRW', + 'coupon': 'WELCOME10', + 'items': [{ + 'item_id': 'SKU_12345', + 'item_name': 'Product Name', + 'price': 29000, + 'quantity': 1 + }] + } +}); +``` + +## Lead Gen Events + +### generate_lead +```javascript +dataLayer.push({ + 'event': 'generate_lead', + 'currency': 'KRW', + 'value': 50000, + 'lead': { + 'source': 'contact_form|landing_page', + 'type': 'inquiry|quote_request' + } +}); +``` + +### form_submit +```javascript +dataLayer.push({ + 'event': 'form_submit', + 'form': { + 'id': 'contact_form', + 'name': 'Contact Us Form', + 'type': 'contact', + 'success': true + } +}); +``` + +## Engagement Events + +### login / sign_up +```javascript +dataLayer.push({ + 'event': 'login', // or 'sign_up' + 'method': 'email|kakao|naver|google' +}); +``` + +### search +```javascript +dataLayer.push({ + 'event': 'search', + 'search_term': 'user search query', + 'search': { + 'results_count': 42, + 'category': 'product|content' + } +}); +``` + +## Item Object Reference + +| Parameter | Type | Required | Description | +|-----------|------|----------|-------------| +| item_id | string | Yes | SKU | +| item_name | string | Yes | μƒν’ˆλͺ… | +| price | number | Yes | 단가 | +| quantity | number | Yes | μˆ˜λŸ‰ | +| item_brand | string | No | λΈŒλžœλ“œλͺ… | +| item_category | string | No | μΉ΄ν…Œκ³ λ¦¬ | +| item_category2-5 | string | No | ν•˜μœ„ μΉ΄ν…Œκ³ λ¦¬ | +| item_variant | string | No | μ˜΅μ…˜ | +| coupon | string | No | 쿠폰 μ½”λ“œ | +| discount | number | No | 할인 κΈˆμ•‘ | +| index | number | No | λͺ©λ‘ μœ„μΉ˜ | + +## Validation Rules + +```javascript +// βœ… Correct +'price': 29000 // number +'quantity': 1 // number +'currency': 'KRW' // uppercase + +// ❌ Wrong +'price': '29000' // string +'currency': 'krw' // lowercase +``` + +### Array Limits +- items[]: μ΅œλŒ€ 200개 +- 초과 μ‹œ λΆ„ν•  전솑 diff --git a/custom-skills/22-gtm-guardian/code/references/naming-conventions.md b/custom-skills/22-gtm-guardian/code/references/naming-conventions.md new file mode 100644 index 0000000..76129d2 --- /dev/null +++ b/custom-skills/22-gtm-guardian/code/references/naming-conventions.md @@ -0,0 +1,130 @@ +# GTM Naming Conventions + +μΌκ΄€λœ GTM μ»¨ν…Œμ΄λ„ˆ 관리λ₯Ό μœ„ν•œ 넀이밍 κ·œμΉ™. + +## Tag Naming + +### Pattern +``` +[Platform] - [Type] - [Description] +``` + +### Examples +| Platform | Type | Description | Tag Name | +|----------|------|-------------|----------| +| GA4 | Config | Main | GA4 - Config - Main | +| GA4 | Event | purchase | GA4 - Event - purchase | +| GAds | Conversion | Purchase | GAds - Conversion - Purchase | +| Meta | Event | Purchase | Meta - Event - Purchase | +| Kakao | Event | purchase | Kakao - Event - purchase | + +## Trigger Naming + +### Pattern +``` +[Type] - [Condition] - [Context] +``` + +### Type Codes +| Code | Type | Example | +|------|------|---------| +| PV | Page View | PV - All Pages | +| DL | DataLayer Event | DL - purchase | +| Click | Click | Click - CTA Button | +| Form | Form Submit | Form - Contact | +| Scroll | Scroll Depth | Scroll - 75% | +| Vis | Element Visibility | Vis - Video Player | + +### Examples +``` +PV - All Pages +PV - Thank You Page +DL - purchase +DL - add_to_cart +Click - CTA Button - Hero +Form - Contact Form +Scroll - 90% +``` + +## Variable Naming + +### Pattern +``` +[Type] - [Name/Path] +``` + +### Type Codes +| Code | Type | Example | +|------|------|---------| +| DLV | DataLayer Variable | DLV - ecommerce.value | +| CJS | Custom JavaScript | CJS - Item IDs Array | +| Const | Constant | Const - GA4 Measurement ID | +| LT | Lookup Table | LT - Page Type Mapping | +| URL | URL Variable | URL - Path | +| DOM | DOM Element | DOM - Product Title | + +### Examples +``` +DLV - event +DLV - ecommerce.transaction_id +DLV - ecommerce.items +CJS - Items for Meta +CJS - Formatted Price +Const - GA4 Measurement ID +Const - Meta Pixel ID +LT - Payment Method Mapping +``` + +## Folder Structure + +``` +πŸ“ 01. Configuration +πŸ“ 02. GA4 Events +πŸ“ 03. Google Ads +πŸ“ 04. Meta Pixel +πŸ“ 05. Kakao Pixel +πŸ“ 06. Other Platforms +πŸ“ 07. Utilities +πŸ“ 99. Deprecated +``` + +## Built-in Variables to Enable + +``` +Pages: βœ… Page URL, Path, Hostname, Referrer +Utilities: βœ… Event, Container ID, Random Number +Clicks: βœ… Element, Classes, ID, URL, Text +Forms: βœ… Element, Classes, ID, URL, Text +History: βœ… New/Old History Fragment/State +Videos: βœ… All YouTube variables +Scrolling: βœ… Depth Threshold, Units, Direction +Visibility: βœ… Percent Visible, On-Screen Duration +``` + +## Anti-patterns + +``` +❌ Tag 1, New Tag, Test +❌ GA4 purchase event (일관성 μ—†μŒ) +❌ G4-E-Pch (κ³Όλ„ν•œ μ•½μ–΄) +❌ Very Long Tag Name for Purchase Complete Event (λ„ˆλ¬΄ κΉ€) + +βœ… GA4 - Event - purchase +βœ… DL - purchase +βœ… CJS - Items for Meta +``` + +## Version Notes + +``` +v[Major].[Minor] - [Description] +예: v12.1 - Added form_submit event + +## Changes +- Added: +- Modified: +- Removed: + +## Reason +[λ³€κ²½ 이유] +``` diff --git a/custom-skills/22-gtm-guardian/code/references/phase6-audit.md b/custom-skills/22-gtm-guardian/code/references/phase6-audit.md new file mode 100644 index 0000000..fd1c26b --- /dev/null +++ b/custom-skills/22-gtm-guardian/code/references/phase6-audit.md @@ -0,0 +1,215 @@ +# Phase 6: Progressive Audit & Update + +μ„€μ •λœ GTM Container에 λŒ€ν•œ 주기적 진단, μœ νš¨μ„± 검증, λ§ˆμ΄λ„ˆ μ—…λ°μ΄νŠΈ 및 νƒœκ·Έ μΆ”κ°€. + +## Objectives + +1. GTM μ»¨ν…Œμ΄λ„ˆ 건강 μƒνƒœ 점검 +2. νƒœκ·Έ λ°œν™” 및 데이터 μ •ν•©μ„± 검증 +3. μ΅œμ‹  μš”κ΅¬μ‚¬ν•­ 반영 μ—…λ°μ΄νŠΈ +4. D.intelligence GTM Toolkit 연계 μžλ™ν™” + +## Audit Schedule + +| Frequency | Scope | Trigger | +|-----------|-------|---------| +| Weekly | Tag firing validation | μžλ™ μŠ€μΌ€μ€„ | +| Monthly | Full container review | μ›”κ°„ 리포트 | +| Quarterly | Architecture review | λΆ„κΈ° 회의 | +| Ad-hoc | Issue investigation | 이슈 λ°œμƒ μ‹œ | + +## Audit Checklist + +### 1. Container Health Check +- [ ] 버전 νžˆμŠ€ν† λ¦¬ 확인 (졜근 변경사항) +- [ ] λ―Έμ‚¬μš© νƒœκ·Έ/트리거/λ³€μˆ˜ 식별 +- [ ] λͺ…λͺ… κ·œμΉ™ μ€€μˆ˜ μ—¬λΆ€ +- [ ] 폴더 ꡬ쑰 정리 μƒνƒœ + +### 2. Tag Firing Validation +- [ ] λͺ¨λ“  P1 νƒœκ·Έ 정상 λ°œν™” +- [ ] 트리거 쑰건 μ •ν™•μ„± +- [ ] λ³€μˆ˜ κ°’ μ •ν™•μ„± +- [ ] 차단 트리거 μž‘λ™ + +### 3. Data Quality +- [ ] GA4 Realtime 데이터 확인 +- [ ] μ „ν™˜ 데이터 μ •ν•©μ„± +- [ ] νŒŒλΌλ―Έν„° κ°’ 검증 +- [ ] μ΄μƒμΉ˜ 탐지 + +### 4. Platform Sync +- [ ] GA4 ↔ GTM 동기화 +- [ ] Google Ads μ „ν™˜ 데이터 +- [ ] Meta Events Manager μƒνƒœ +- [ ] Kakao Pixel μƒνƒœ + +## 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 | λ°œν™” μƒνƒœ μžλ™ 검증 | μ •κΈ° 감사 | + +### Integration Workflow + +``` +1. GTM Container Export + └── JSON 파일 λ‹€μš΄λ‘œλ“œ + +2. D.intel Toolkit Analysis + β”œβ”€β”€ python analyze_container.py container.json + β”œβ”€β”€ Dependency graph 생성 + └── Issue detection + +3. Report Generation + └── Markdown/HTML 리포트 + +4. GTM Guardian Update + └── Notion에 리포트 μ €μž₯ +``` + +### Sample Toolkit Commands + +```bash +# Container 뢄석 +python analyze_container.py GTM-XXXXXX.json --output report.md + +# 버전 비ꡐ +python diff_versions.py v1.json v2.json --output diff.md + +# νƒœκ·Έ 검증 +python validate_tags.py container.json --events events.csv + +# λ―Έμ‚¬μš© μš”μ†Œ 탐지 +python find_unused.py container.json --type all +``` + +## Audit Report Template + +```markdown +# GTM Audit Report + +## Summary +- **Container**: GTM-XXXXXX +- **Audit Date**: YYYY-MM-DD +- **Version Reviewed**: XX +- **Overall Status**: βœ… Healthy / ⚠️ Needs Attention / ❌ Critical + +## Findings + +### βœ… Passing +- [ν•­λͺ©] + +### ⚠️ Warnings +| Issue | Impact | Recommendation | +|-------|--------|----------------| + +### ❌ Critical +| Issue | Impact | Action Required | +|-------|--------|-----------------| + +## Tag Firing Status + +| Tag | Expected | Actual | Status | +|-----|----------|--------|--------| +| GA4 - Event - purchase | Thank You | Thank You | βœ… | + +## Data Quality Check + +| Metric | Expected | Actual | Variance | +|--------|----------|--------|----------| +| Daily Purchases | ~50 | 48 | -4% | + +## Recommendations +1. +2. + +## Next Steps +- [ ] +- [ ] + +## Appendix +- Container JSON snapshot +- D.intel Toolkit output +``` + +## Update Procedures + +### Minor Update (νƒœκ·Έ μˆ˜μ •) +``` +1. λ³€κ²½ ν•„μš” νƒœκ·Έ 식별 +2. Preview λͺ¨λ“œμ—μ„œ μˆ˜μ • +3. ν…ŒμŠ€νŠΈ μ™„λ£Œ +4. Publish with version note +5. Notion λ¬Έμ„œ μ—…λ°μ΄νŠΈ +``` + +### Major Update (μ‹ κ·œ νƒœκ·Έ μΆ”κ°€) +``` +1. Phase 3-4 λ¬Έμ„œ μ—…λ°μ΄νŠΈ +2. DataLayer μš”κ΅¬μ‚¬ν•­ κ°œλ°œνŒ€ 전달 +3. GTM νƒœκ·Έ/트리거/λ³€μˆ˜ μ„€μ • +4. QA 체크리슀트 μˆ˜ν–‰ +5. 단계적 배포 +6. Notion λ¬Έμ„œ μ—…λ°μ΄νŠΈ +``` + +### Emergency Fix +``` +1. 이슈 원인 νŒŒμ•… +2. μ΅œμ†Œ λ³€κ²½μœΌλ‘œ μˆ˜μ • +3. Publish (emergency version note) +4. κ·Όλ³Έ 원인 뢄석 +5. 영ꡬ μˆ˜μ • κ³„νš +``` + +## Versioning Best Practices + +### Version Naming +``` +v[Major].[Minor] - [Description] +예: v12.1 - Added form_submit event +``` + +### Version Notes Template +``` +## Changes +- Added: [μƒˆλ‘œ μΆ”κ°€λœ ν•­λͺ©] +- Modified: [μˆ˜μ •λœ ν•­λͺ©] +- Removed: [μ‚­μ œλœ ν•­λͺ©] + +## Reason +[λ³€κ²½ 이유] + +## Testing +- [ν…ŒμŠ€νŠΈ ν•­λͺ© 및 κ²°κ³Ό] + +## Rollback Plan +[λ‘€λ°± ν•„μš” μ‹œ 절차] +``` + +## Monitoring Setup + +### GA4 Alerts +- 일일 μ „ν™˜ 수 급감 (>30%) +- μ„Έμ…˜ 수 급감 (>50%) +- 이벀트 μˆ˜μ§‘ 였λ₯˜ + +### Custom Monitoring +- DataLayer 였λ₯˜ λ‘œκΉ… +- Tag Manager 였λ₯˜ 좔적 +- μ„œλ²„ μ‚¬μ΄λ“œ νƒœκ·Έ μƒνƒœ (sGTM μ‹œ) + +## Next Phase + +주기적 감사 μ™„λ£Œ ν›„ β†’ Phase 7: Lookup App (ν•„μš” μ‹œ) diff --git a/custom-skills/22-gtm-guardian/code/references/phase7-lookup-app.md b/custom-skills/22-gtm-guardian/code/references/phase7-lookup-app.md new file mode 100644 index 0000000..0350783 --- /dev/null +++ b/custom-skills/22-gtm-guardian/code/references/phase7-lookup-app.md @@ -0,0 +1,283 @@ +# Phase 7: Event Lookup & Parameter Library Web App + +Google Apps Scriptλ₯Ό ν™œμš©ν•œ Event Taxonomy Sheet 기반 업무 μ§€μ›μš© μ•± 배포. + +## Objectives + +1. Event Taxonomy 데이터 쑰회 μ•± +2. μ‹€μ‹œκ°„ νŒŒλΌλ―Έν„° μ°Έμ‘° 도ꡬ +3. λΉ„κ°œλ°œμžμš© Self-service 도ꡬ +4. νŒ€ κ°„ μΌκ΄€λœ 이벀트 정보 곡유 + +## App Architecture + +``` +β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” +β”‚ Google Sheets │────▢│ Apps Script │────▢│ Web App β”‚ +β”‚ (Taxonomy DB) β”‚ β”‚ (Backend) β”‚ β”‚ (Frontend) β”‚ +β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ +``` + +## Google Sheets Data Source + +### Required Sheets +- Events Master +- Parameters Reference +- Custom Definitions +- Platform Mapping + +### Column Requirements +β†’ Phase 4 μ°Έμ‘°: [phase4-taxonomy.md](phase4-taxonomy.md) + +## Apps Script Setup + +### 1. Project Creation +``` +1. Google Sheets μ—΄κΈ° +2. Extensions > Apps Script +3. ν”„λ‘œμ νŠΈ 이름 μ„€μ • +``` + +### 2. Core Functions + +#### Data Retrieval +```javascript +function getEventsData() { + const sheet = SpreadsheetApp.getActiveSpreadsheet() + .getSheetByName('Events Master'); + const data = sheet.getDataRange().getValues(); + const headers = data[0]; + + return data.slice(1).map(row => { + const obj = {}; + headers.forEach((header, i) => { + obj[header] = row[i]; + }); + return obj; + }); +} + +function getParametersData() { + const sheet = SpreadsheetApp.getActiveSpreadsheet() + .getSheetByName('Parameters Reference'); + const data = sheet.getDataRange().getValues(); + const headers = data[0]; + + return data.slice(1).map(row => { + const obj = {}; + headers.forEach((header, i) => { + obj[header] = row[i]; + }); + return obj; + }); +} +``` + +#### Search Function +```javascript +function searchEvents(query) { + const events = getEventsData(); + const searchTerm = query.toLowerCase(); + + return events.filter(event => + event.event_name.toLowerCase().includes(searchTerm) || + event.event_category.toLowerCase().includes(searchTerm) || + event.notes.toLowerCase().includes(searchTerm) + ); +} + +function getEventDetails(eventName) { + const events = getEventsData(); + const params = getParametersData(); + + const event = events.find(e => e.event_name === eventName); + if (!event) return null; + + const eventParams = event.parameters.split(',').map(p => p.trim()); + const paramDetails = params.filter(p => + eventParams.includes(p.parameter_name) + ); + + return { + event: event, + parameters: paramDetails + }; +} +``` + +### 3. Web App Handler + +```javascript +function doGet(e) { + return HtmlService.createHtmlOutputFromFile('index') + .setTitle('GTM Event Lookup') + .setXFrameOptionsMode(HtmlService.XFrameOptionsMode.ALLOWALL); +} + +function doPost(e) { + const action = e.parameter.action; + + switch(action) { + case 'search': + return ContentService.createTextOutput( + JSON.stringify(searchEvents(e.parameter.query)) + ).setMimeType(ContentService.MimeType.JSON); + + case 'details': + return ContentService.createTextOutput( + JSON.stringify(getEventDetails(e.parameter.eventName)) + ).setMimeType(ContentService.MimeType.JSON); + + default: + return ContentService.createTextOutput( + JSON.stringify({error: 'Invalid action'}) + ).setMimeType(ContentService.MimeType.JSON); + } +} +``` + +### 4. HTML Frontend (index.html) + +```html + + + + + + + +

🏷️ GTM Event Lookup

+ +
+ + + + +``` + +## Deployment + +### 1. Deploy as Web App +``` +1. Deploy > New deployment +2. Type: Web app +3. Execute as: Me +4. Access: Anyone within organization (λ˜λŠ” Anyone) +5. Deploy +``` + +### 2. Get Web App URL +``` +배포 ν›„ μ œκ³΅λ˜λŠ” URL 볡사 +https://script.google.com/macros/s/[ID]/exec +``` + +### 3. Share with Team +- URL을 Notion/Slack에 곡유 +- 뢁마크 ꢌμž₯ + +## Features Roadmap + +### Phase 1 (MVP) +- [x] 이벀트 검색 +- [x] νŒŒλΌλ―Έν„° 쑰회 +- [x] μš°μ„ μˆœμœ„ ν•„ν„° + +### Phase 2 +- [ ] DataLayer μ½”λ“œ μŠ€λ‹ˆνŽ« 볡사 +- [ ] ν”Œλž«νΌλ³„ μ½”λ“œ μ˜ˆμ‹œ +- [ ] 졜근 쑰회 νžˆμŠ€ν† λ¦¬ + +### Phase 3 +- [ ] 이벀트 μΆ”κ°€/μˆ˜μ • 폼 +- [ ] λ³€κ²½ 이λ ₯ 좔적 +- [ ] Slack μ•Œλ¦Ό 연동 + +## Maintenance + +### Data Update +1. Google Sheets 원본 데이터 μˆ˜μ • +2. Web App μžλ™ 반영 (μ‹€μ‹œκ°„) + +### Code Update +1. Apps Script μˆ˜μ • +2. Deploy > Manage deployments +3. New version 배포 + +### Backup +- Google Sheets μžλ™ 버전 νžˆμŠ€ν† λ¦¬ +- 주기적 μˆ˜λ™ λ°±μ—… ꢌμž₯ + +## Access Control + +| Role | Access Level | +|------|--------------| +| Admin | μ‹œνŠΈ νŽΈμ§‘ + 슀크립트 μˆ˜μ • | +| Editor | μ‹œνŠΈ νŽΈμ§‘ | +| Viewer | Web App 쑰회만 | + +## Troubleshooting + +| Issue | Solution | +|-------|----------| +| μ•± λ‘œλ”© 느림 | 데이터 캐싱 κ΅¬ν˜„ | +| 검색 κ²°κ³Ό μ—†μŒ | 검색어 확인, 데이터 쑴재 확인 | +| κΆŒν•œ 였λ₯˜ | 배포 μ„€μ •μ—μ„œ μ ‘κ·Ό κΆŒν•œ 확인 | +| 데이터 미반영 | μ‹œνŠΈ μƒˆλ‘œκ³ μΉ¨, μΊμ‹œ 클리어 | + +## Integration with Notion + +Web App URL을 Notion에 embed: +``` +/embed [Web App URL] +``` + +λ˜λŠ” iframe으둜 직접 μ‚½μž…. diff --git a/custom-skills/22-gtm-guardian/code/references/platform-mapping.md b/custom-skills/22-gtm-guardian/code/references/platform-mapping.md new file mode 100644 index 0000000..e8bbc18 --- /dev/null +++ b/custom-skills/22-gtm-guardian/code/references/platform-mapping.md @@ -0,0 +1,125 @@ +# Platform Event Mapping Reference + +GA4, Google Ads, Meta Pixel, Kakao Pixel κ°„ 이벀트 λ§€ν•‘. + +## E-commerce Events + +| User Action | GA4 | Meta | Kakao | Google Ads | +|-------------|-----|------|-------|------------| +| μƒν’ˆ λͺ©λ‘ 쑰회 | view_item_list | ViewContent | viewContent | - | +| μƒν’ˆ 상세 쑰회 | view_item | ViewContent | viewContent | - | +| μƒν’ˆ 검색 | search | Search | search | - | +| μž₯λ°”κ΅¬λ‹ˆ λ‹΄κΈ° | add_to_cart | AddToCart | addToCart | - | +| μœ„μ‹œλ¦¬μŠ€νŠΈ | add_to_wishlist | AddToWishlist | addToWishlist | - | +| 결제 μ‹œμž‘ | begin_checkout | InitiateCheckout | beginCheckout | - | +| 배솑정보 μž…λ ₯ | add_shipping_info | - | - | - | +| κ²°μ œμ •λ³΄ μž…λ ₯ | add_payment_info | AddPaymentInfo | addPaymentInfo | - | +| ꡬ맀 μ™„λ£Œ | purchase | Purchase | purchase | purchase | + +## Lead Gen Events + +| User Action | GA4 | Meta | Kakao | Google Ads | +|-------------|-----|------|-------|------------| +| νšŒμ›κ°€μž… | sign_up | CompleteRegistration | completeRegistration | sign_up | +| 둜그인 | login | - | login | - | +| λ¦¬λ“œ 생성 | generate_lead | Lead | participation | submit_lead_form | + +## Engagement Events + +| User Action | GA4 | Meta | Kakao | Google Ads | +|-------------|-----|------|-------|------------| +| νŽ˜μ΄μ§€ 쑰회 | page_view | PageView | pageView | page_view | +| 검색 | search | Search | search | - | +| 곡유 | share | - | - | - | + +## Parameter Transformation + +### GA4 β†’ Meta +```javascript +// GA4 items[] β†’ Meta content_ids[] +const contentIds = items.map(item => item.item_id); + +// Meta Purchase +fbq('track', 'Purchase', { + content_ids: contentIds, + content_type: 'product', + value: ecommerce.value, + currency: 'KRW', + num_items: items.length +}); +``` + +### GA4 β†’ Kakao +```javascript +// GA4 items[] β†’ Kakao products[] +const products = items.map(item => ({ + id: item.item_id, + name: item.item_name, + price: item.price, + quantity: item.quantity +})); + +// Kakao purchase +kakaoPixel('PIXEL_ID').purchase({ + total_price: ecommerce.value, + currency: 'KRW', + products: products +}); +``` + +## GTM Variables + +### CJS - Item IDs for Meta +```javascript +function() { + var items = {{DLV - ecommerce.items}} || []; + return items.map(function(item) { + return item.item_id; + }); +} +``` + +### CJS - Products for Kakao +```javascript +function() { + var items = {{DLV - ecommerce.items}} || []; + return items.map(function(item) { + return { + id: item.item_id, + name: item.item_name, + price: item.price, + quantity: item.quantity + }; + }); +} +``` + +## Deduplication + +### Event ID Pattern +```javascript +var eventId = 'evt_' + Date.now() + '_' + Math.random().toString(36).substr(2, 9); + +// Client-side +fbq('track', 'Purchase', {...}, {eventID: eventId}); + +// Server-side (CAPI) +// λ™μΌν•œ eventId μ‚¬μš© β†’ Meta μžλ™ 쀑볡 제거 +``` + +## Platform-specific Notes + +### Meta Pixel +- content_type: 'product' (μƒν’ˆ) / 'product_group' (λ³€ν˜•) +- currency: ISO 4217 ν•„μˆ˜ +- value: 숫자 (μ†Œμˆ˜μ  κ°€λŠ₯) + +### Kakao Pixel +- Server-side 미지원 (Client-only) +- products[]: μ΅œλŒ€ 10개 ꢌμž₯ +- total_price: 숫자 + +### Google Ads +- Enhanced Conversions ꢌμž₯ +- transaction_id ν•„μˆ˜ (쀑볡 제거용) +- value: KRW μ •μˆ˜ diff --git a/custom-skills/22-gtm-guardian/code/references/qa-checklist.md b/custom-skills/22-gtm-guardian/code/references/qa-checklist.md new file mode 100644 index 0000000..92bf407 --- /dev/null +++ b/custom-skills/22-gtm-guardian/code/references/qa-checklist.md @@ -0,0 +1,149 @@ +# GTM Implementation QA Checklist + +νƒœκΉ… κ΅¬ν˜„ ν’ˆμ§ˆ 검증 체크리슀트. + +## 1. Pre-Implementation + +### Documentation +- [ ] Tagging Plan 승인 μ™„λ£Œ +- [ ] DataLayer μŠ€ν‚€λ§ˆ κ°œλ°œνŒ€ 곡유 +- [ ] 이벀트 νƒμ†Œλ…Έλ―Έ ν•©μ˜ μ™„λ£Œ + +### Access +- [ ] GTM μ»¨ν…Œμ΄λ„ˆ μ ‘κ·Ό κΆŒν•œ +- [ ] GA4 속성 μ ‘κ·Ό κΆŒν•œ +- [ ] κ΄‘κ³  ν”Œλž«νΌ μ ‘κ·Ό κΆŒν•œ + +### Tools +- [ ] GTM Preview λͺ¨λ“œ 정상 +- [ ] GA4 DebugView ν™œμ„±ν™” +- [ ] Chrome DevTools μ€€λΉ„ + +## 2. DataLayer Validation + +### Base Setup +- [ ] GTM μŠ€λ‹ˆνŽ« 이전 dataLayer μ΄ˆκΈ°ν™” +- [ ] νŽ˜μ΄μ§€ λ‘œλ“œ μ‹œ κΈ°λ³Έ 데이터 push +- [ ] pageType, userId λ“± κΈ°λ³Έ λ³€μˆ˜ 쑴재 + +### Data Types +- [ ] 숫자 값이 Number νƒ€μž… +- [ ] κΈˆμ•‘μ— 톡화 μ½”λ“œ 포함 (KRW) +- [ ] transaction_id μœ λ‹ˆν¬ + +### E-commerce +- [ ] ecommerce: null μ„ ν–‰ push +- [ ] items[] λ°°μ—΄ ꡬ쑰 μ •ν™• +- [ ] ν•„μˆ˜ νŒŒλΌλ―Έν„° μ™„λΉ„ + +### Console Check +```javascript +console.log(window.dataLayer); +dataLayer.filter(e => e.event === 'purchase'); +``` + +## 3. Tag Firing + +### GA4 +| Tag | Trigger | Status | +|-----|---------|--------| +| Config | All Pages | [ ] | +| view_item | Product page | [ ] | +| add_to_cart | Add button | [ ] | +| begin_checkout | Checkout start | [ ] | +| purchase | Thank you | [ ] | + +### Google Ads +| Conversion | Trigger | Status | +|------------|---------|--------| +| Purchase | DL - purchase | [ ] | +| Lead | DL - generate_lead | [ ] | + +### Meta Pixel +| Event | Trigger | Status | +|-------|---------|--------| +| PageView | All Pages | [ ] | +| ViewContent | Product | [ ] | +| AddToCart | Add | [ ] | +| Purchase | Thank you | [ ] | + +### Kakao Pixel +| Event | Trigger | Status | +|-------|---------|--------| +| pageView | All Pages | [ ] | +| purchase | Thank you | [ ] | + +## 4. Network Validation + +### Endpoints +``` +GA4: google-analytics.com/g/collect +GAds: googleads.g.doubleclick.net/pagead/conversion/ +Meta: facebook.com/tr/ +``` + +### Check Points +- [ ] μš”μ²­ 전솑됨 +- [ ] νŒŒλΌλ―Έν„° μ •ν™• +- [ ] 응닡 성곡 (200/204) + +## 5. Cross-browser Testing + +### Desktop +- [ ] Chrome +- [ ] Safari +- [ ] Firefox +- [ ] Edge + +### Mobile +- [ ] iOS Safari +- [ ] iOS Chrome +- [ ] Android Chrome + +## 6. Data Validation (Platform) + +### GA4 +- [ ] Realtime λ³΄κ³ μ„œ 이벀트 ν‘œμ‹œ +- [ ] νŒŒλΌλ―Έν„° μ •ν™•νžˆ μˆ˜μ§‘ +- [ ] E-commerce λ³΄κ³ μ„œ μ •ν™• + +### Google Ads +- [ ] μ „ν™˜ μ•‘μ…˜ 데이터 μœ μž… +- [ ] μ „ν™˜ κ°’ μ •ν™• + +### Meta +- [ ] Events Manager μˆ˜μ‹  확인 +- [ ] Event match quality 확인 + +## 7. Edge Cases + +- [ ] 빈 μž₯λ°”κ΅¬λ‹ˆ 결제 μ‹œμž‘ 처리 +- [ ] 0개 ꡬ맀 처리 +- [ ] 쿠폰 μ—†λŠ” ꡬ맀 +- [ ] 게슀트 체크아웃 +- [ ] μƒˆλ‘œκ³ μΉ¨ μ‹œ 쀑볡 λ°©μ§€ +- [ ] λ’€λ‘œκ°€κΈ° μ‹œ 처리 + +## 8. Performance & Privacy + +### Performance +- [ ] νƒœκ·Έ λ‘œλ”©μ΄ λ Œλ”λ§ 차단 μ•ˆ 함 +- [ ] 비동기 λ‘œλ”© + +### Privacy +- [ ] λ™μ˜ 없이 νƒœκ·Έ λ―Έλ°œν™” (CMP μ‹œ) +- [ ] PII 직접 μˆ˜μ§‘ μ—†μŒ + +## Sign-off + +| Role | Name | Date | βœ“ | +|------|------|------|---| +| QA Lead | | | | +| Analytics Lead | | | | +| Dev Lead | | | | + +## Issues Log + +| # | Issue | Severity | Status | +|---|-------|----------|--------| +| 1 | | High/Med/Low | Open/Resolved | diff --git a/custom-skills/22-gtm-guardian/code/scripts/README.md b/custom-skills/22-gtm-guardian/code/scripts/README.md new file mode 100644 index 0000000..8e28ee6 --- /dev/null +++ b/custom-skills/22-gtm-guardian/code/scripts/README.md @@ -0,0 +1,32 @@ +# GTM Guardian Scripts + +이 λ””λ ‰ν† λ¦¬λŠ” GTM Guardian Code μŠ€ν‚¬μ˜ μžλ™ν™” 슀크립트 μ €μž₯μ†Œμž…λ‹ˆλ‹€. + +## D.intelligence GTM Toolkit + +메인 뢄석 λ„κ΅¬λŠ” 별도 λ ˆν¬μ§€ν† λ¦¬μ—μ„œ κ΄€λ¦¬λ©λ‹ˆλ‹€: + +```bash +git clone https://github.com/ourdigital/dintel-gtm-toolkit.git +``` + +## μ‚¬μš©λ²• + +GTM Toolkit 클둠 ν›„: + +```bash +# 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 +``` + +## ν–₯ν›„ μΆ”κ°€ μ˜ˆμ • + +- GTM Container Export μžλ™ν™” 슀크립트 +- Notion 리포트 μ—…λ‘œλ“œ 슀크립트 +- μ •κΈ° 감사 μžλ™ν™” (cron job) diff --git a/custom-skills/22-gtm-guardian/desktop/SKILL.md b/custom-skills/22-gtm-guardian/desktop/SKILL.md new file mode 100644 index 0000000..e780827 --- /dev/null +++ b/custom-skills/22-gtm-guardian/desktop/SKILL.md @@ -0,0 +1,121 @@ +--- +name: gtm-guardian +description: | + Google Tag Manager νƒœκΉ… μ „λž΅ μˆ˜λ¦½λΆ€ν„° κ΅¬ν˜„κΉŒμ§€ 7단계 μ›Œν¬ν”Œλ‘œμš°λ₯Ό μ§€μ›ν•˜λŠ” SMART Tool. + + Triggers: + - GTM νƒœκΉ… κ³„νš, Tagging Plan μž‘μ„±, 이벀트 섀계 + - DataLayer μŠ€ν‚€λ§ˆ 섀계, dataLayer κ΅¬ν˜„ κ°€μ΄λ“œ + - μ‚¬μš©μž 행동 뢄석, User Behaviour Modeling, KPI μ •μ˜ + - Event Taxonomy, 이벀트 νƒμ†Œλ…Έλ―Έ, 이벀트 λͺ…λͺ… κ·œμΉ™ + - GTM κ΅¬ν˜„ κ°€μ΄λ“œ, νƒœκ·Έ μ„€μ • 체크리슀트 + - Server-side GTM, sGTM, Stape, Google Tag Gateway + - GA4 이벀트, Meta Pixel, Kakao Pixel, Google Ads μ „ν™˜ 좔적 +--- + +# GTM Guardian (Desktop) + +GTM(Google Tag Manager) νƒœκΉ… μ „λž΅ μˆ˜λ¦½λΆ€ν„° κ΅¬ν˜„κΉŒμ§€μ˜ 전체 라이프사이클을 μ§€μ›ν•˜λŠ” 7단계 μ›Œν¬ν”Œλ‘œμš° μŠ€ν‚¬. + +**Desktop λ²”μœ„**: Phase 1-5 (뢄석, 섀계, λ¬Έμ„œ μž‘μ„±, Browser 뢄석, Notion 연동) + +## 7-Phase Workflow Overview + +| Phase | Name | Output | Tools | +|-------|------|--------|-------| +| 1 | Web/App Analysis | DOM 뢄석 리포트 | Browser MCP | +| 2 | User Behaviour & KPI | 행동 흐름도, KPI μ •μ˜μ„œ | Notion MCP | +| 3 | Tagging Plan | νƒœκΉ… κ³„νšμ„œ | templates/ | +| 4 | Event Taxonomy | 이벀트 νƒμ†Œλ…Έλ―Έ μ‹œνŠΈ | Google Sheets | +| 5 | Implementation Guide | κ΅¬ν˜„ κ°€μ΄λ“œ, 체크리슀트 | Notion MCP | +| 6 | Progressive Audit | 진단 리포트 | **β†’ Claude Code** | +| 7 | Lookup App | 이벀트 쑰회 μ•± | **β†’ Claude Code** | + +## Quick Start + +``` +μ‚¬μš©μž μš”μ²­ 뢄석 β†’ Phase 식별 β†’ ν•΄λ‹Ή Phase μ›Œν¬ν”Œλ‘œμš° μ‹€ν–‰ β†’ Notion μ €μž₯ +``` + +### Phase 식별 κ°€μ΄λ“œ + +| ν‚€μ›Œλ“œ | Phase | Reference | +|--------|-------|-----------| +| "μ‚¬μ΄νŠΈ 뢄석", "DOM", "μš”μ†Œ 뢄석" | 1 | [phase1-analysis.md](references/phase1-analysis.md) | +| "행동 뢄석", "KPI", "μ „ν™˜ μ •μ˜" | 2 | [phase2-behaviour.md](references/phase2-behaviour.md) | +| "νƒœκΉ… κ³„νš", "Tagging Plan" | 3 | [phase3-tagging-plan.md](references/phase3-tagging-plan.md) | +| "이벀트 νƒμ†Œλ…Έλ―Έ", "λͺ…λͺ… κ·œμΉ™" | 4 | [phase4-taxonomy.md](references/phase4-taxonomy.md) | +| "κ΅¬ν˜„ κ°€μ΄λ“œ", "체크리슀트" | 5 | [phase5-implementation.md](references/phase5-implementation.md) | +| "진단", "감사", "μ—…λ°μ΄νŠΈ" | 6 | β†’ Claude Code ꢌμž₯ | +| "쑰회 μ•±", "Lookup" | 7 | β†’ Claude Code ꢌμž₯ | + +## Core References + +### DataLayer & Events +- [datalayer-schema.md](references/datalayer-schema.md) - GA4 ꢌμž₯ 이벀트 기반 DataLayer μŠ€ν‚€λ§ˆ +- [platform-mapping.md](references/platform-mapping.md) - GA4, Meta, Kakao, Google Ads 이벀트 λ§€ν•‘ +- [naming-conventions.md](references/naming-conventions.md) - νƒœκ·Έ/트리거/λ³€μˆ˜ 넀이밍 κ·œμΉ™ + +### Server-side GTM +- [sgtm-guide.md](references/sgtm-guide.md) - sGTM μ•„ν‚€ν…μ²˜ 및 Stape μ„€μ • + +### Implementation +- [qa-checklist.md](references/qa-checklist.md) - κ΅¬ν˜„ QA 체크리슀트 + +### Templates +- [tagging-plan-template.md](templates/tagging-plan-template.md) - νƒœκΉ… κ³„νšμ„œ ν…œν”Œλ¦Ώ +- [event-taxonomy-template.csv](templates/event-taxonomy-template.csv) - 이벀트 νƒμ†Œλ…Έλ―Έ μ‹œνŠΈ ν…œν”Œλ¦Ώ + +## Notion Integration + +μ‚°μΆœλ¬Ό μ €μž₯ λŒ€μƒ: [GTM Knowledge Base](https://www.notion.so/dintelligence/2cf581e58a1e80c8b358f1625356e931) + +### μ €μž₯ μ›Œν¬ν”Œλ‘œμš° (MCP) +1. `notion/API-post-search`둜 λŒ€μƒ νŽ˜μ΄μ§€/DB 탐색 +2. Phase별 ν…œν”Œλ¦Ώ μ μš©ν•˜μ—¬ μ½˜ν…μΈ  ꡬ성 +3. `notion/API-post-page`둜 νŽ˜μ΄μ§€ 생성 +4. μƒμœ„ νŽ˜μ΄μ§€μ— 링크 μΆ”κ°€ + +### Page Naming Convention +``` +[Phase#] - [Project] - [Type] - [Date] +예: P3 - ClientA - Tagging Plan - 2025-01 +``` + +## Site Type Patterns + +| Site Type | Key Events | Focus Areas | +|-----------|------------|-------------| +| E-commerce | view_item, add_to_cart, purchase | Transaction, ROAS | +| Lead Gen | generate_lead, form_submit | Form tracking, Lead value | +| SaaS | sign_up, subscription_* | Activation, Retention | +| Media | article_view, scroll, video_* | Engagement depth | +| B2B | demo_request, pricing_view | Funnel progression | + +## Execution Principles + +1. **Phase μˆœμ„œ μ€€μˆ˜**: μ„ ν–‰ Phase μ™„λ£Œ ν›„ λ‹€μŒ 단계 +2. **λ¬Έμ„œν™” μš°μ„ **: λͺ¨λ“  결정사항 Notion에 기둝 +3. **점진적 κ΅¬ν˜„**: 핡심 이벀트 β†’ ν™•μž₯ 이벀트 +4. **검증 ν•„μˆ˜**: κ΅¬ν˜„ ν›„ QA 체크리슀트 μˆ˜ν–‰ +5. **버전 관리**: GTM μ»¨ν…Œμ΄λ„ˆ 버전 및 λ¬Έμ„œ 버전 좔적 + +## Browser Analysis (Phase 1) + +Browser MCP λ˜λŠ” Firecrawl MCPλ₯Ό ν™œμš©ν•œ DOM 뢄석: + +``` +1. νŽ˜μ΄μ§€ λ Œλ”λ§ ν›„ DOM 뢄석 +2. μ£Όμš” μš”μ†Œ 식별 (CTA, 폼, μƒν’ˆ λͺ©λ‘) +3. κΈ°μ‘΄ dataLayer μƒνƒœ 확인 +4. 트리거 κ°€λŠ₯ μš”μ†Œ λ¬Έμ„œν™” +``` + +## Error Handling + +| Issue | Resolution | +|-------|------------| +| DataLayer λ―Έκ΅¬ν˜„ | κ°œλ°œνŒ€ κ°€μ΄λ“œ 제곡, μš°μ„ μˆœμœ„ νƒœκ·Έλ‘œ μ‹œμž‘ | +| 이벀트 λˆ„λ½ | Phase 1-2 μž¬κ²€ν†  | +| νƒœκ·Έ λ―Έλ°œν™” | Phase 5 체크리슀트, GTM Preview 디버깅 | +| 데이터 μ •ν•©μ„± 였λ₯˜ | GA4 DebugView 검증 | diff --git a/custom-skills/22-gtm-guardian/desktop/references/datalayer-schema.md b/custom-skills/22-gtm-guardian/desktop/references/datalayer-schema.md new file mode 100644 index 0000000..2ec93bd --- /dev/null +++ b/custom-skills/22-gtm-guardian/desktop/references/datalayer-schema.md @@ -0,0 +1,193 @@ +# DataLayer Schema Reference + +GA4 ꢌμž₯ 이벀트 기반 DataLayer μŠ€ν‚€λ§ˆ μ •μ˜. + +## Core Principles + +1. GTM μŠ€λ‹ˆνŽ« 이전에 dataLayer μ΄ˆκΈ°ν™” +2. 이벀트 λ°œμƒ μ‹œμ μ— push (사전 μ•„λ‹˜) +3. ecommerce κ°μ²΄λŠ” push μ „ clear ν•„μˆ˜ +4. PII 데이터 직접 μˆ˜μ§‘ κΈˆμ§€ + +## Base Structure + +### Page Load +```javascript +window.dataLayer = window.dataLayer || []; +dataLayer.push({ + 'event': 'page_data', + 'page': { + 'type': 'home|category|product|cart|checkout|thankyou|content|search', + 'name': 'Page Name', + 'category': 'Category/Subcategory', + 'language': 'ko' + }, + 'user': { + 'status': 'logged_in|logged_out', + 'id': 'hashed_user_id', // SHA256, 둜그인 μ‹œμ—λ§Œ + 'type': 'new|returning|member|guest', + 'loginMethod': 'email|kakao|naver|google' + } +}); +``` + +## E-commerce Events + +### view_item +```javascript +dataLayer.push({ ecommerce: null }); +dataLayer.push({ + 'event': 'view_item', + 'ecommerce': { + 'currency': 'KRW', + 'value': 29000, + 'items': [{ + 'item_id': 'SKU_12345', + 'item_name': 'Product Name', + 'item_brand': 'Brand Name', + 'item_category': 'Category', + 'item_variant': 'Blue / Large', + 'price': 29000, + 'quantity': 1 + }] + } +}); +``` + +### add_to_cart +```javascript +dataLayer.push({ ecommerce: null }); +dataLayer.push({ + 'event': 'add_to_cart', + 'ecommerce': { + 'currency': 'KRW', + 'value': 29000, + 'items': [{ + 'item_id': 'SKU_12345', + 'item_name': 'Product Name', + 'price': 29000, + 'quantity': 1 + }] + } +}); +``` + +### begin_checkout +```javascript +dataLayer.push({ ecommerce: null }); +dataLayer.push({ + 'event': 'begin_checkout', + 'ecommerce': { + 'currency': 'KRW', + 'value': 58000, + 'coupon': 'WELCOME10', + 'items': [/* cart items */] + } +}); +``` + +### purchase +```javascript +dataLayer.push({ ecommerce: null }); +dataLayer.push({ + 'event': 'purchase', + 'ecommerce': { + 'transaction_id': 'T_20250115_001', + 'affiliation': 'Store Name', + 'value': 53000, + 'tax': 4818, + 'shipping': 3000, + 'currency': 'KRW', + 'coupon': 'WELCOME10', + 'items': [{ + 'item_id': 'SKU_12345', + 'item_name': 'Product Name', + 'price': 29000, + 'quantity': 1 + }] + } +}); +``` + +## Lead Gen Events + +### generate_lead +```javascript +dataLayer.push({ + 'event': 'generate_lead', + 'currency': 'KRW', + 'value': 50000, + 'lead': { + 'source': 'contact_form|landing_page', + 'type': 'inquiry|quote_request' + } +}); +``` + +### form_submit +```javascript +dataLayer.push({ + 'event': 'form_submit', + 'form': { + 'id': 'contact_form', + 'name': 'Contact Us Form', + 'type': 'contact', + 'success': true + } +}); +``` + +## Engagement Events + +### login / sign_up +```javascript +dataLayer.push({ + 'event': 'login', // or 'sign_up' + 'method': 'email|kakao|naver|google' +}); +``` + +### search +```javascript +dataLayer.push({ + 'event': 'search', + 'search_term': 'user search query', + 'search': { + 'results_count': 42, + 'category': 'product|content' + } +}); +``` + +## Item Object Reference + +| Parameter | Type | Required | Description | +|-----------|------|----------|-------------| +| item_id | string | Yes | SKU | +| item_name | string | Yes | μƒν’ˆλͺ… | +| price | number | Yes | 단가 | +| quantity | number | Yes | μˆ˜λŸ‰ | +| item_brand | string | No | λΈŒλžœλ“œλͺ… | +| item_category | string | No | μΉ΄ν…Œκ³ λ¦¬ | +| item_category2-5 | string | No | ν•˜μœ„ μΉ΄ν…Œκ³ λ¦¬ | +| item_variant | string | No | μ˜΅μ…˜ | +| coupon | string | No | 쿠폰 μ½”λ“œ | +| discount | number | No | 할인 κΈˆμ•‘ | +| index | number | No | λͺ©λ‘ μœ„μΉ˜ | + +## Validation Rules + +```javascript +// βœ… Correct +'price': 29000 // number +'quantity': 1 // number +'currency': 'KRW' // uppercase + +// ❌ Wrong +'price': '29000' // string +'currency': 'krw' // lowercase +``` + +### Array Limits +- items[]: μ΅œλŒ€ 200개 +- 초과 μ‹œ λΆ„ν•  전솑 diff --git a/custom-skills/22-gtm-guardian/desktop/references/naming-conventions.md b/custom-skills/22-gtm-guardian/desktop/references/naming-conventions.md new file mode 100644 index 0000000..76129d2 --- /dev/null +++ b/custom-skills/22-gtm-guardian/desktop/references/naming-conventions.md @@ -0,0 +1,130 @@ +# GTM Naming Conventions + +μΌκ΄€λœ GTM μ»¨ν…Œμ΄λ„ˆ 관리λ₯Ό μœ„ν•œ 넀이밍 κ·œμΉ™. + +## Tag Naming + +### Pattern +``` +[Platform] - [Type] - [Description] +``` + +### Examples +| Platform | Type | Description | Tag Name | +|----------|------|-------------|----------| +| GA4 | Config | Main | GA4 - Config - Main | +| GA4 | Event | purchase | GA4 - Event - purchase | +| GAds | Conversion | Purchase | GAds - Conversion - Purchase | +| Meta | Event | Purchase | Meta - Event - Purchase | +| Kakao | Event | purchase | Kakao - Event - purchase | + +## Trigger Naming + +### Pattern +``` +[Type] - [Condition] - [Context] +``` + +### Type Codes +| Code | Type | Example | +|------|------|---------| +| PV | Page View | PV - All Pages | +| DL | DataLayer Event | DL - purchase | +| Click | Click | Click - CTA Button | +| Form | Form Submit | Form - Contact | +| Scroll | Scroll Depth | Scroll - 75% | +| Vis | Element Visibility | Vis - Video Player | + +### Examples +``` +PV - All Pages +PV - Thank You Page +DL - purchase +DL - add_to_cart +Click - CTA Button - Hero +Form - Contact Form +Scroll - 90% +``` + +## Variable Naming + +### Pattern +``` +[Type] - [Name/Path] +``` + +### Type Codes +| Code | Type | Example | +|------|------|---------| +| DLV | DataLayer Variable | DLV - ecommerce.value | +| CJS | Custom JavaScript | CJS - Item IDs Array | +| Const | Constant | Const - GA4 Measurement ID | +| LT | Lookup Table | LT - Page Type Mapping | +| URL | URL Variable | URL - Path | +| DOM | DOM Element | DOM - Product Title | + +### Examples +``` +DLV - event +DLV - ecommerce.transaction_id +DLV - ecommerce.items +CJS - Items for Meta +CJS - Formatted Price +Const - GA4 Measurement ID +Const - Meta Pixel ID +LT - Payment Method Mapping +``` + +## Folder Structure + +``` +πŸ“ 01. Configuration +πŸ“ 02. GA4 Events +πŸ“ 03. Google Ads +πŸ“ 04. Meta Pixel +πŸ“ 05. Kakao Pixel +πŸ“ 06. Other Platforms +πŸ“ 07. Utilities +πŸ“ 99. Deprecated +``` + +## Built-in Variables to Enable + +``` +Pages: βœ… Page URL, Path, Hostname, Referrer +Utilities: βœ… Event, Container ID, Random Number +Clicks: βœ… Element, Classes, ID, URL, Text +Forms: βœ… Element, Classes, ID, URL, Text +History: βœ… New/Old History Fragment/State +Videos: βœ… All YouTube variables +Scrolling: βœ… Depth Threshold, Units, Direction +Visibility: βœ… Percent Visible, On-Screen Duration +``` + +## Anti-patterns + +``` +❌ Tag 1, New Tag, Test +❌ GA4 purchase event (일관성 μ—†μŒ) +❌ G4-E-Pch (κ³Όλ„ν•œ μ•½μ–΄) +❌ Very Long Tag Name for Purchase Complete Event (λ„ˆλ¬΄ κΉ€) + +βœ… GA4 - Event - purchase +βœ… DL - purchase +βœ… CJS - Items for Meta +``` + +## Version Notes + +``` +v[Major].[Minor] - [Description] +예: v12.1 - Added form_submit event + +## Changes +- Added: +- Modified: +- Removed: + +## Reason +[λ³€κ²½ 이유] +``` diff --git a/custom-skills/22-gtm-guardian/desktop/references/phase1-analysis.md b/custom-skills/22-gtm-guardian/desktop/references/phase1-analysis.md new file mode 100644 index 0000000..e7ddc03 --- /dev/null +++ b/custom-skills/22-gtm-guardian/desktop/references/phase1-analysis.md @@ -0,0 +1,115 @@ +# Phase 1: Web/App Analysis + +μ›Ήμ‚¬μ΄νŠΈ λ˜λŠ” μ•±μ˜ νƒœκΉ… κ°€λŠ₯ μš”μ†Œλ₯Ό λΆ„μ„ν•˜μ—¬ DOM ꡬ쑰, 동적 μš”μ†Œ, 트리거 포인트λ₯Ό νŒŒμ•…. + +## Objectives + +1. Rendered HTML μ†ŒμŠ€ 뢄석 +2. DOM ꡬ쑰 및 μ£Όμš” μš”μ†Œ 식별 +3. 동적 μš”μ†Œ 및 SPA λ™μž‘ νŒŒμ•… +4. 트리거 ꡬ성 κ°€λŠ₯ μš”μ†Œ λ„μΆœ + +## Analysis Checklist + +### 1. Page Structure +- [ ] νŽ˜μ΄μ§€ μœ ν˜• λΆ„λ₯˜ (home, category, product, cart, checkout, thankyou) +- [ ] URL νŒ¨ν„΄ 뢄석 (path, query params) +- [ ] νŽ˜μ΄μ§€ ν…œν”Œλ¦Ώ ꡬ쑰 νŒŒμ•… + +### 2. Interactive Elements +- [ ] CTA λ²„νŠΌ (class, id, data-* attributes) +- [ ] 폼 μš”μ†Œ (form id, input names) +- [ ] λ„€λΉ„κ²Œμ΄μ…˜ 링크 +- [ ] μ•„μ½”λ””μ–Έ/νƒ­/λͺ¨λ‹¬ μš”μ†Œ + +### 3. E-commerce Elements (ν•΄λ‹Ή μ‹œ) +- [ ] μƒν’ˆ λͺ©λ‘ μ»¨ν…Œμ΄λ„ˆ +- [ ] μƒν’ˆ μΉ΄λ“œ ꡬ쑰 (SKU, price, name μœ„μΉ˜) +- [ ] μž₯λ°”κ΅¬λ‹ˆ λ²„νŠΌ +- [ ] 결제 λ²„νŠΌ +- [ ] μ£Όλ¬Έ μ™„λ£Œ 정보 μœ„μΉ˜ + +### 4. Dynamic Content +- [ ] SPA/Ajax λ‘œλ”© νŒ¨ν„΄ +- [ ] Infinite scroll +- [ ] Dynamic pricing +- [ ] User-dependent content + +## Browser Analysis Steps + +``` +1. DevTools Consoleμ—μ„œ dataLayer 확인 + > window.dataLayer + +2. DOM ꡬ쑰 뢄석 + > document.querySelectorAll('[data-gtm]') + > document.querySelectorAll('form') + > document.querySelectorAll('[class*="cta"], [class*="button"]') + +3. λ„€νŠΈμ›Œν¬ νƒ­μ—μ„œ κΈ°μ‘΄ νƒœκ·Έ 확인 + > google-analytics.com, googletagmanager.com μš”μ²­ ν•„ν„° + +4. 이벀트 λ¦¬μŠ€λ„ˆ 확인 + > getEventListeners(document.querySelector('#element')) +``` + +## Output Template + +```markdown +# [μ‚¬μ΄νŠΈλͺ…] DOM Analysis Report + +## Site Overview +- **URL**: +- **Type**: E-commerce / Lead Gen / SaaS / Media / B2B +- **Framework**: WordPress / React / Vue / Custom + +## Page Types Identified +| Page Type | URL Pattern | Key Elements | +|-----------|-------------|--------------| +| Home | / | hero_cta, featured_products | +| Product | /product/* | add_to_cart, product_details | + +## Taggable Elements +### Buttons & CTAs +| Element | Selector | Current ID/Class | Recommended Trigger | +|---------|----------|------------------|---------------------| +| Add to Cart | .add-to-cart | N/A | Click - Class Match | + +### Forms +| Form | ID/Name | Fields | Submit Button | +|------|---------|--------|---------------| + +### Dynamic Elements +| Element | Type | Loading Pattern | Trigger Strategy | +|---------|------|-----------------|------------------| + +## Existing GTM/Analytics +- [ ] GTM Container: GTM-XXXXXX +- [ ] GA4: G-XXXXXXXX +- [ ] Other pixels: + +## Recommendations +1. +2. +``` + +## Common Patterns + +### WordPress/WooCommerce +- Product: `.single-product`, `add_to_cart` class +- Cart: `.woocommerce-cart-form` +- Checkout: `.woocommerce-checkout` + +### Shopify +- Product: data-product-id attribute +- Cart: form[action="/cart/add"] +- Checkout: checkout.shopify.com 별도 도메인 + +### React/SPA +- History API λ³€κ²½ 감지 ν•„μš” +- Custom Event 트리거 ν™œμš© +- MutationObserver κ³ λ € + +## Next Phase + +뢄석 μ™„λ£Œ ν›„ β†’ Phase 2: User Behaviour Modeling diff --git a/custom-skills/22-gtm-guardian/desktop/references/phase2-behaviour.md b/custom-skills/22-gtm-guardian/desktop/references/phase2-behaviour.md new file mode 100644 index 0000000..fd4c281 --- /dev/null +++ b/custom-skills/22-gtm-guardian/desktop/references/phase2-behaviour.md @@ -0,0 +1,167 @@ +# Phase 2: User Behaviour Modeling & KPI Definition + +μ‚¬μš©μžμ˜ μ›Ή/μ•± μ‚¬μš© 흐름을 λΆ„μ„ν•˜κ³ , 쀑점 관리 행동과 KPIλ₯Ό μ •μ˜. + +## Objectives + +1. μ‚¬μš©μž μ—¬μ •(User Journey) λ§€ν•‘ +2. 핡심 μ „ν™˜ 포인트(Conversion Points) 식별 +3. KPI 및 μΈ‘μ • μ§€ν‘œ μ •μ˜ +4. 이벀트 μš°μ„ μˆœμœ„ κ²°μ • + +## User Journey Framework + +### Standard Funnel Stages +``` +Awareness β†’ Interest β†’ Consideration β†’ Intent β†’ Purchase β†’ Loyalty + ↓ ↓ ↓ ↓ ↓ ↓ + Landing Browse View Item Add Cart Checkout Repeat +``` + +### Site Type별 Journey + +#### E-commerce +``` +Landing β†’ Category β†’ Product View β†’ Add to Cart β†’ Checkout β†’ Purchase + ↓ + Wishlist/Compare +``` + +#### Lead Generation +``` +Landing β†’ Content Browse β†’ Form View β†’ Form Start β†’ Form Submit β†’ Thank You + ↓ + Chat/Call CTA +``` + +#### SaaS +``` +Landing β†’ Pricing β†’ Sign Up Start β†’ Email Verify β†’ Onboarding β†’ Activation + ↓ + Demo Request +``` + +## Conversion Points Definition + +### Macro Conversions (Hard) +| Conversion | Business Value | Typical Events | +|------------|----------------|----------------| +| Purchase | Revenue | purchase | +| Lead Submit | Lead value | generate_lead | +| Sign Up | LTV estimate | sign_up | +| Subscription | MRR | subscribe | + +### Micro Conversions (Soft) +| Conversion | Intent Signal | Typical Events | +|------------|---------------|----------------| +| Add to Cart | Purchase intent | add_to_cart | +| Form Start | Engagement | form_start | +| Video Complete | Content consumption | video_complete | +| Scroll 75% | Page engagement | scroll | + +## KPI Framework + +### SMART KPI Template +``` +Metric: [이름] +Definition: [μ •μ˜] +Formula: [계산식] +Target: [λͺ©ν‘œκ°’] +Tracking Event: [κ΄€λ ¨ 이벀트] +``` + +### Standard E-commerce KPIs +| KPI | Formula | Events Required | +|-----|---------|-----------------| +| Conversion Rate | transactions / sessions | purchase, session_start | +| AOV | revenue / transactions | purchase | +| Cart Abandonment | 1 - (purchases / carts) | add_to_cart, purchase | +| Product View Rate | product_views / sessions | view_item | + +### Lead Gen KPIs +| KPI | Formula | Events Required | +|-----|---------|-----------------| +| Lead Conversion Rate | leads / sessions | generate_lead | +| Form Completion Rate | submits / form_starts | form_start, form_submit | +| Cost per Lead | ad_spend / leads | generate_lead + ad data | + +### Engagement KPIs +| KPI | Formula | Events Required | +|-----|---------|-----------------| +| Avg Session Duration | total_time / sessions | Enhanced Measurement | +| Pages per Session | pageviews / sessions | page_view | +| Scroll Depth | avg(scroll_percent) | scroll | + +## Event Priority Matrix + +### Priority 1 (Must Have) +- purchase / generate_lead (primary conversion) +- begin_checkout (funnel step) +- add_to_cart (intent signal) +- page_view (baseline) + +### Priority 2 (Should Have) +- view_item (product engagement) +- form_start (form engagement) +- login / sign_up (user identity) +- search (intent signal) + +### Priority 3 (Nice to Have) +- scroll_depth (engagement) +- video_progress (content consumption) +- share (virality) +- cta_click (UI interaction) + +## Output Template + +```markdown +# [ν”„λ‘œμ νŠΈλͺ…] User Behaviour & KPI Report + +## User Journey Map +[Mermaid diagram λ˜λŠ” ν…μŠ€νŠΈ ν”Œλ‘œμš°μ°¨νŠΈ] + +## Conversion Points +### Macro Conversions +| Conversion | Value | Priority | Event | +|------------|-------|----------|-------| + +### Micro Conversions +| Conversion | Signal | Priority | Event | +|------------|--------|----------|-------| + +## KPI Definition +### Primary KPIs +| KPI | Formula | Target | Tracking | +|-----|---------|--------|----------| + +### Secondary KPIs +| KPI | Formula | Target | Tracking | +|-----|---------|--------|----------| + +## Event Priority List +### Must Track (P1) +- +### Should Track (P2) +- +### Nice to Track (P3) +- + +## Custom Dimensions Required +| Dimension | Scope | Values | Purpose | +|-----------|-------|--------|---------| + +## Custom Metrics Required +| Metric | Type | Unit | Purpose | +|--------|------|------|---------| +``` + +## Stakeholder Input Needed + +- Marketing: 캠페인 λͺ©ν‘œ, μ „ν™˜ κ°€μΉ˜ +- Sales: Lead qualification criteria +- Product: 핡심 μ‚¬μš©μž μ•‘μ…˜ +- Analytics: λ¦¬ν¬νŒ… μš”κ΅¬μ‚¬ν•­ + +## Next Phase + +KPI μ •μ˜ μ™„λ£Œ ν›„ β†’ Phase 3: Tagging Plan Design diff --git a/custom-skills/22-gtm-guardian/desktop/references/phase3-tagging-plan.md b/custom-skills/22-gtm-guardian/desktop/references/phase3-tagging-plan.md new file mode 100644 index 0000000..dc98161 --- /dev/null +++ b/custom-skills/22-gtm-guardian/desktop/references/phase3-tagging-plan.md @@ -0,0 +1,169 @@ +# Phase 3: Tagging Plan Design + +μ‚¬μš©μž 행동 흐름에 맞좘 맞좀 이벀트 μ •μ˜, λͺ…λͺ… κ·œμΉ™, νŒŒλΌλ―Έν„°, 맞좀 μΈ‘μ • κΈ°μ€€/μ§€ν‘œ 섀계. + +## Objectives + +1. Custom Event μ •μ˜ +2. 이벀트 λͺ…λͺ… κ·œμΉ™ 수립 +3. ν™˜κ²½ λ³€μˆ˜ 및 νŒŒλΌλ―Έν„° μ •μ˜ +4. Custom Dimensions/Metrics 섀계 +5. DataLayer μŠ€ν‚€λ§ˆ 연계 + +## Tagging Plan Document Structure + +### 1. Executive Summary +``` +Project: [ν”„λ‘œμ νŠΈλͺ…] +Client: [ν΄λΌμ΄μ–ΈνŠΈλͺ…] +Website/App: [URL/μ•±λͺ…] +Version: 1.0 +Last Updated: YYYY-MM-DD +Author: [μž‘μ„±μž] +``` + +### 2. Measurement Objectives +| Priority | Objective | KPI | Target | +|----------|-----------|-----|--------| +| P1 | ꡬ맀 μ „ν™˜ 좔적 | Conversion Rate | 3% | +| P2 | μž₯λ°”κ΅¬λ‹ˆ μ΄νƒˆ 뢄석 | Cart Abandonment | < 70% | + +### 3. Event Naming Convention + +#### Pattern +``` +[domain]_[action]_[object] +``` + +#### Rules +- μ†Œλ¬Έμž, μ–Έλ”μŠ€μ½”μ–΄ μ‚¬μš© +- GA4 ꢌμž₯ 이벀트 μš°μ„  μ‚¬μš© +- μ»€μŠ€ν…€ μ΄λ²€νŠΈλŠ” μ ‘λ‘μ–΄λ‘œ ꡬ뢄: `custom_` + +#### Examples +| Action | Event Name | Type | +|--------|------------|------| +| μƒν’ˆ 쑰회 | view_item | Recommended | +| μž₯λ°”κ΅¬λ‹ˆ λ‹΄κΈ° | add_to_cart | Recommended | +| μœ„μ‹œλ¦¬μŠ€νŠΈ | add_to_wishlist | Recommended | +| CTA 클릭 | custom_cta_click | Custom | +| νƒ­ μ „ν™˜ | custom_tab_change | Custom | + +### 4. Parameter Design + +#### Standard Parameters (GA4 Recommended) +| Parameter | Type | Required | Example | +|-----------|------|----------|---------| +| currency | string | Yes | "KRW" | +| value | number | Yes | 29000 | +| items | array | Yes | [...] | +| transaction_id | string | purchase only | "T_12345" | + +#### Custom Parameters +| Parameter | Type | Scope | Description | +|-----------|------|-------|-------------| +| user_type | string | event | new/returning | +| page_type | string | event | home/product/cart | +| login_method | string | event | kakao/naver/email | + +### 5. Custom Dimensions + +| Name | Scope | Values | GA4 Configuration | +|------|-------|--------|-------------------| +| User Type | User | new, returning | user_type | +| Membership Level | User | bronze, silver, gold | membership_level | +| Page Type | Event | home, category, product, cart, checkout | page_type | + +### 6. Custom Metrics + +| Name | Unit | Description | Event Source | +|------|------|-------------|--------------| +| Wishlist Adds | Count | μœ„μ‹œλ¦¬μŠ€νŠΈ μΆ”κ°€ 수 | add_to_wishlist | +| Form Starts | Count | 폼 μ‹œμž‘ 수 | form_start | + +### 7. Environment Configuration + +```javascript +// ν™˜κ²½ λ³€μˆ˜ μ„€μ • +const GTM_CONFIG = { + development: { + gtmId: 'GTM-DEV123', + ga4Id: 'G-DEV456', + debugMode: true + }, + staging: { + gtmId: 'GTM-STG123', + ga4Id: 'G-STG456', + debugMode: true + }, + production: { + gtmId: 'GTM-PROD123', + ga4Id: 'G-PROD456', + debugMode: false + } +}; +``` + +### 8. Platform Mapping + +| Action | GA4 | Meta | Kakao | Google Ads | +|--------|-----|------|-------|------------| +| μƒν’ˆ 쑰회 | view_item | ViewContent | viewContent | - | +| μž₯λ°”κ΅¬λ‹ˆ | add_to_cart | AddToCart | addToCart | - | +| ꡬ맀 μ™„λ£Œ | purchase | Purchase | purchase | purchase | + +β†’ 상세 λ§€ν•‘: [platform-mapping.md](platform-mapping.md) + +### 9. DataLayer Requirements + +β†’ 상세 μŠ€ν‚€λ§ˆ: [datalayer-schema.md](datalayer-schema.md) + +## Tagging Plan Template + +```markdown +# [Project] Tagging Plan v1.0 + +## 1. Overview +### 1.1 Project Information +### 1.2 Measurement Objectives +### 1.3 Key Conversions + +## 2. Event Specification +### 2.1 Recommended Events +### 2.2 Custom Events +### 2.3 Parameter Reference + +## 3. DataLayer Specification +### 3.1 Page Load Data +### 3.2 E-commerce Events +### 3.3 Engagement Events + +## 4. Tag Configuration +### 4.1 GA4 Tags +### 4.2 Google Ads Tags +### 4.3 Meta Pixel Tags +### 4.4 Kakao Pixel Tags + +## 5. Implementation Notes +### 5.1 Developer Requirements +### 5.2 QA Checklist +### 5.3 Timeline + +## Appendix +- A. Naming Conventions +- B. Platform Event Mapping +- C. Change Log +``` + +## Quality Checklist + +- [ ] λͺ¨λ“  P1 이벀트 μ •μ˜λ¨ +- [ ] 이벀트 λͺ…λͺ… κ·œμΉ™ 일관성 +- [ ] ν•„μˆ˜ νŒŒλΌλ―Έν„° μ •μ˜ μ™„λ£Œ +- [ ] Custom Dimensions scope 적절 +- [ ] ν”Œλž«νΌλ³„ λ§€ν•‘ μ™„λ£Œ +- [ ] DataLayer μŠ€ν‚€λ§ˆμ™€ μ •ν•©μ„± 확인 + +## Next Phase + +Tagging Plan μ™„λ£Œ ν›„ β†’ Phase 4: Event Taxonomy Design diff --git a/custom-skills/22-gtm-guardian/desktop/references/phase4-taxonomy.md b/custom-skills/22-gtm-guardian/desktop/references/phase4-taxonomy.md new file mode 100644 index 0000000..dbcbc74 --- /dev/null +++ b/custom-skills/22-gtm-guardian/desktop/references/phase4-taxonomy.md @@ -0,0 +1,159 @@ +# Phase 4: Event Taxonomy Design + +이벀트 λͺ…λͺ… κ·œμΉ™, νƒœκ·Έ 이름, 트리거 쑰건, νŒŒλΌλ―Έν„°, 맞좀 μΈ‘μ • κΈ°μ€€/μ§€ν‘œλ₯Ό ꡬ글 μ‹œνŠΈλ‘œ 체계화. + +## Objectives + +1. 이벀트 νƒμ†Œλ…Έλ―Έ μ‹œνŠΈ ꡬ쑰화 +2. νƒœκ·Έ/트리거/λ³€μˆ˜ λͺ…λͺ… 일관성 +3. νŒŒλΌλ―Έν„° 및 μΈ‘μ • κΈ°μ€€ 연계 +4. νŒ€ κ°„ 곡유 κ°€λŠ₯ν•œ λ¬Έμ„œν™” + +## Event Taxonomy Sheet Structure + +### Sheet 1: Events Master + +| Column | Description | Example | +|--------|-------------|---------| +| event_name | 이벀트 λͺ… | purchase | +| event_category | 이벀트 μœ ν˜• | ecommerce | +| trigger_type | 트리거 μœ ν˜• | dataLayer | +| trigger_condition | 트리거 쑰건 | event equals 'purchase' | +| parameters | ν•„μˆ˜ νŒŒλΌλ―Έν„° | transaction_id, value, currency, items | +| custom_dimensions | 연계 μΈ‘μ •κΈ°μ€€ | user_type, payment_method | +| custom_metrics | 연계 μ§€ν‘œ | - | +| ga4_mapping | GA4 이벀트 | purchase (recommended) | +| meta_mapping | Meta 이벀트 | Purchase | +| kakao_mapping | Kakao 이벀트 | purchase | +| priority | μš°μ„ μˆœμœ„ | P1 | +| notes | λΉ„κ³  | 결제 μ™„λ£Œ νŽ˜μ΄μ§€μ—μ„œ λ°œν™” | + +### Sheet 2: Parameters Reference + +| Column | Description | Example | +|--------|-------------|---------| +| parameter_name | νŒŒλΌλ―Έν„° λͺ… | transaction_id | +| data_type | 데이터 νƒ€μž… | string | +| required | ν•„μˆ˜ μ—¬λΆ€ | Yes | +| scope | λ²”μœ„ | event | +| events | μ‚¬μš© 이벀트 | purchase, refund | +| ga4_param | GA4 νŒŒλΌλ―Έν„°λͺ… | transaction_id | +| datalayer_path | DL 경둜 | ecommerce.transaction_id | +| validation | 검증 κ·œμΉ™ | not empty, unique | +| example | μ˜ˆμ‹œ | "T_20250115_001" | + +### Sheet 3: Custom Definitions + +| Column | Description | Example | +|--------|-------------|---------| +| name | 이름 | User Type | +| type | μœ ν˜• | dimension / metric | +| scope | λ²”μœ„ | user / event | +| parameter | 연계 νŒŒλΌλ―Έν„° | user_type | +| values | κ°€λŠ₯ν•œ κ°’ | new, returning | +| description | μ„€λͺ… | μ‹ κ·œ/재방문 μ‚¬μš©μž ꡬ뢄 | +| ga4_index | GA4 인덱슀 | - (μžλ™μƒμ„±) | + +### Sheet 4: Tag Configuration + +| Column | Description | Example | +|--------|-------------|---------| +| tag_name | νƒœκ·Έ λͺ… | GA4 - Event - purchase | +| tag_type | νƒœκ·Έ μœ ν˜• | GA4 Event | +| platform | ν”Œλž«νΌ | GA4 | +| trigger | 트리거 λͺ… | DL - purchase | +| blocking_trigger | 차단 트리거 | Block - Internal | +| variables | μ‚¬μš© λ³€μˆ˜ | DLV - transaction_id, DLV - value | +| folder | 폴더 | 02. GA4 Events | + +### Sheet 5: Trigger Configuration + +| Column | Description | Example | +|--------|-------------|---------| +| trigger_name | 트리거 λͺ… | DL - purchase | +| trigger_type | 트리거 μœ ν˜• | Custom Event | +| event_name | 이벀트 λͺ… | purchase | +| conditions | 쑰건 | - | +| used_by | μ‚¬μš© νƒœκ·Έ | GA4 - Event - purchase | + +### Sheet 6: Variable Configuration + +| Column | Description | Example | +|--------|-------------|---------| +| variable_name | λ³€μˆ˜ λͺ… | DLV - transaction_id | +| variable_type | λ³€μˆ˜ μœ ν˜• | Data Layer Variable | +| datalayer_name | DL λ³€μˆ˜λͺ… | ecommerce.transaction_id | +| default_value | κΈ°λ³Έκ°’ | undefined | +| used_by | μ‚¬μš© νƒœκ·Έ | GA4 - Event - purchase | + +## Google Sheets Template + +### Quick Setup +1. μƒˆ Google Sheets 생성 +2. μ‹œνŠΈ νƒ­ 6개 생성 (μœ„ κ΅¬μ‘°λŒ€λ‘œ) +3. 헀더 ν–‰ κ³ μ • (View > Freeze > 1 row) +4. 쑰건뢀 μ„œμ‹ 적용 (Priority별 색상) +5. 데이터 μœ νš¨μ„± 검사 (Dropdown) + +### Dropdown Validations +``` +event_category: ecommerce, engagement, lead_gen, content +trigger_type: dataLayer, click, pageview, scroll, timer +priority: P1, P2, P3 +data_type: string, number, boolean, array, object +scope: event, user, session +``` + +### Conditional Formatting +``` +P1: Red background +P2: Yellow background +P3: Green background +``` + +## Sample Event Taxonomy + +### E-commerce Events +```csv +event_name,event_category,trigger_type,trigger_condition,parameters,priority +view_item_list,ecommerce,dataLayer,"event equals 'view_item_list'","item_list_id, item_list_name, items",P2 +view_item,ecommerce,dataLayer,"event equals 'view_item'","currency, value, items",P1 +add_to_cart,ecommerce,dataLayer,"event equals 'add_to_cart'","currency, value, items",P1 +begin_checkout,ecommerce,dataLayer,"event equals 'begin_checkout'","currency, value, items, coupon",P1 +purchase,ecommerce,dataLayer,"event equals 'purchase'","transaction_id, currency, value, items, shipping, tax",P1 +``` + +### Lead Gen Events +```csv +event_name,event_category,trigger_type,trigger_condition,parameters,priority +form_start,lead_gen,dataLayer,"event equals 'form_start'","form_id, form_name",P2 +form_submit,lead_gen,dataLayer,"event equals 'form_submit'","form_id, form_name, success",P1 +generate_lead,lead_gen,dataLayer,"event equals 'generate_lead'","currency, value, source",P1 +``` + +## Naming Convention Reference + +β†’ [naming-conventions.md](naming-conventions.md) + +### Quick Reference +| Type | Pattern | Example | +|------|---------|---------| +| Tag | [Platform] - [Type] - [Event] | GA4 - Event - purchase | +| Trigger | [Type] - [Event/Condition] | DL - purchase | +| Variable | [Type] - [Name] | DLV - transaction_id | + +## Output Delivery + +### Format Options +1. **Google Sheets** (ꢌμž₯): 곡유 및 ν˜‘μ—… 용이 +2. **Excel (.xlsx)**: μ˜€ν”„λΌμΈ/λ³΄μ•ˆ μš”κ΅¬ μ‹œ +3. **CSV**: κ°œλ°œνŒ€ 연동 μ‹œ + +### Sharing +- Viewer κΆŒν•œ: λ§ˆμΌ€νŒ…νŒ€, κ²½μ˜μ§„ +- Editor κΆŒν•œ: λΆ„μ„νŒ€, κ°œλ°œνŒ€ +- 버전 νžˆμŠ€ν† λ¦¬ ν™œμš© + +## Next Phase + +Event Taxonomy μ™„λ£Œ ν›„ β†’ Phase 5: Implementation Guide diff --git a/custom-skills/22-gtm-guardian/desktop/references/phase5-implementation.md b/custom-skills/22-gtm-guardian/desktop/references/phase5-implementation.md new file mode 100644 index 0000000..7921af4 --- /dev/null +++ b/custom-skills/22-gtm-guardian/desktop/references/phase5-implementation.md @@ -0,0 +1,208 @@ +# Phase 5: Implementation Plan & Guide + +λΆ„μ„λœ μ›Ήμ‚¬μ΄νŠΈ/μ•±μ˜ μƒνƒœμ™€ νƒ€μž…, λΉ„μ¦ˆλ‹ˆμŠ€ λͺ©ν‘œμ— λ§žλŠ” νƒœκ·Έ μ„€μ • μˆœμ„œμ™€ μ „λž΅, 체크리슀트 λ„μΆœ. + +## Objectives + +1. κ΅¬ν˜„ μš°μ„ μˆœμœ„ 및 μˆœμ„œ κ²°μ • +2. κ°œλ°œνŒ€μš© DataLayer κ°€μ΄λ“œ μž‘μ„± +3. GTM μ»¨ν…Œμ΄λ„ˆ μ„€μ • κ°€μ΄λ“œ +4. QA 체크리슀트 λ„μΆœ + +## Implementation Sequence + +### Standard Sequence +``` +1. Base Setup (Week 1) + β”œβ”€β”€ GTM Container μ„€μΉ˜ + β”œβ”€β”€ GA4 Configuration Tag + └── κΈ°λ³Έ page_view 확인 + +2. DataLayer Implementation (Week 1-2) + β”œβ”€β”€ νŽ˜μ΄μ§€ 데이터 (pageType, userId λ“±) + └── E-commerce / Lead Gen 이벀트 + +3. Core Events (Week 2) + β”œβ”€β”€ P1 이벀트 νƒœκ·Έ μ„€μ • + β”œβ”€β”€ 트리거 ꡬ성 + └── λ³€μˆ˜ μ„€μ • + +4. Platform Tags (Week 2-3) + β”œβ”€β”€ Google Ads Conversion + β”œβ”€β”€ Meta Pixel + └── Kakao Pixel + +5. QA & Launch (Week 3) + β”œβ”€β”€ Preview λͺ¨λ“œ ν…ŒμŠ€νŠΈ + β”œβ”€β”€ 데이터 검증 + └── Production 배포 +``` + +### E-commerce Priority +``` +P1: purchase β†’ begin_checkout β†’ add_to_cart β†’ view_item +P2: view_item_list β†’ add_to_wishlist β†’ search +P3: select_item β†’ scroll β†’ video +``` + +### Lead Gen Priority +``` +P1: generate_lead β†’ form_submit +P2: form_start β†’ page_view (νŠΉμ • νŽ˜μ΄μ§€) +P3: cta_click β†’ scroll β†’ video +``` + +## Developer Guide Template + +### DataLayer Implementation Guide + +```markdown +# DataLayer κ΅¬ν˜„ κ°€μ΄λ“œ + +## 1. κΈ°λ³Έ μ„€μ • + +### GTM μŠ€λ‹ˆνŽ« 이전 dataLayer μ΄ˆκΈ°ν™” +```html + + + +``` + +### νŽ˜μ΄μ§€ λ‘œλ“œ μ‹œ κΈ°λ³Έ 데이터 +```javascript +dataLayer.push({ + 'event': 'page_data', + 'page': { + 'type': '[page_type]', // home, category, product, cart, checkout, thankyou + 'name': '[page_name]', + 'language': 'ko' + }, + 'user': { + 'status': '[logged_in|logged_out]', + 'id': '[hashed_user_id]', // SHA256 ν•΄μ‹œ, 둜그인 μ‹œμ—λ§Œ + 'type': '[new|returning]' + } +}); +``` + +## 2. μ΄λ²€νŠΈλ³„ κ΅¬ν˜„ + +### [이벀트λͺ…] +**λ°œν™” μ‹œμ **: [μ„€λͺ…] +**ν•„μˆ˜ νŒŒλΌλ―Έν„°**: [λͺ©λ‘] + +```javascript +dataLayer.push({ ecommerce: null }); // E-commerce 이벀트 μ‹œ ν•„μˆ˜ +dataLayer.push({ + 'event': '[event_name]', + // νŒŒλΌλ―Έν„°... +}); +``` + +## 3. ν…ŒμŠ€νŠΈ 방법 +1. Chrome DevTools Consoleμ—μ„œ dataLayer 확인 +2. GTM Preview λͺ¨λ“œμ—μ„œ 이벀트 확인 +3. GA4 DebugViewμ—μ„œ μˆ˜μ‹  확인 +``` + +## GTM Configuration Guide + +### Container Setup Checklist + +- [ ] Container ID 확인 +- [ ] Web Container νƒ€μž… 선택 +- [ ] ν™˜κ²½(Dev/Stg/Prod) μ„€μ • + +### Built-in Variables ν™œμ„±ν™” + +``` +βœ… Page URL, Page Path, Page Hostname, Referrer +βœ… Click Element, Click Classes, Click ID, Click URL, Click Text +βœ… Form Element, Form Classes, Form ID, Form URL, Form Text +βœ… Scroll Depth Threshold, Scroll Depth Units, Scroll Direction +βœ… Video Provider, Video Status, Video URL, Video Title, Video Duration, Video Percent +``` + +### Folder Structure + +``` +πŸ“ 01. Configuration +πŸ“ 02. GA4 Events +πŸ“ 03. Google Ads +πŸ“ 04. Meta Pixel +πŸ“ 05. Kakao Pixel +πŸ“ 06. Utilities +πŸ“ 99. Deprecated +``` + +### Tag Setup Order + +``` +1. Constants (Measurement IDs, Pixel IDs) +2. DataLayer Variables +3. Custom JavaScript Variables +4. Triggers (Event-based) +5. Blocking Triggers (Internal traffic) +6. Configuration Tags +7. Event Tags +``` + +## QA Checklist + +β†’ 상세 체크리슀트: [qa-checklist.md](qa-checklist.md) + +### Pre-Launch Quick Check + +#### DataLayer +- [ ] dataLayerκ°€ GTM μŠ€λ‹ˆνŽ« 이전에 μ΄ˆκΈ°ν™”λ¨ +- [ ] νŽ˜μ΄μ§€ λ‘œλ“œ μ‹œ κΈ°λ³Έ 데이터 push됨 +- [ ] 숫자 값이 Number νƒ€μž…μœΌλ‘œ 전솑됨 +- [ ] ecommerce 이벀트 μ „ null push됨 + +#### Tags +- [ ] λͺ¨λ“  P1 이벀트 νƒœκ·Έ 섀정됨 +- [ ] 트리거 쑰건 정확함 +- [ ] λ³€μˆ˜ κ°’ μ •ν™•νžˆ 맀핑됨 + +#### Testing +- [ ] Preview λͺ¨λ“œμ—μ„œ λͺ¨λ“  νƒœκ·Έ λ°œν™” 확인 +- [ ] GA4 DebugViewμ—μ„œ 데이터 μˆ˜μ‹  확인 +- [ ] Network νƒ­μ—μ„œ μš”μ²­ 확인 + +#### Cross-check +- [ ] λ°μŠ€ν¬ν†± Chrome ν…ŒμŠ€νŠΈ +- [ ] λͺ¨λ°”일 Safari ν…ŒμŠ€νŠΈ +- [ ] Internal traffic ν•„ν„° μž‘λ™ + +## Common Implementation Issues + +| Issue | Solution | +|-------|----------| +| dataLayer not defined | GTM μŠ€λ‹ˆνŽ« 이전에 μ΄ˆκΈ°ν™” | +| μˆ«μžκ°€ λ¬Έμžμ—΄λ‘œ 전솑 | λ”°μ˜΄ν‘œ 제거, parseInt/parseFloat | +| 이벀트 쀑볡 λ°œν™” | 트리거 쑰건 κ²€ν† , νŽ˜μ΄μ§€ μƒνƒœ 확인 | +| νƒœκ·Έ λ―Έλ°œν™” | Previewμ—μ„œ 트리거 쑰건 디버깅 | +| 데이터 뢈일치 | DL λ³€μˆ˜ 경둜 확인, λŒ€μ†Œλ¬Έμž 확인 | + +## Handoff Checklist + +### To Development Team +- [ ] DataLayer κ΅¬ν˜„ κ°€μ΄λ“œ 전달 +- [ ] 이벀트 νƒμ†Œλ…Έλ―Έ μ‹œνŠΈ 곡유 +- [ ] Q&A μ„Έμ…˜ μ™„λ£Œ + +### To Marketing Team +- [ ] μΈ‘μ • κ°€λŠ₯ν•œ 이벀트 λͺ©λ‘ 곡유 +- [ ] GA4 λ³΄κ³ μ„œ μ ‘κ·Ό κΆŒν•œ 확인 +- [ ] μ „ν™˜ μ„€μ • μ™„λ£Œ 확인 + +### Documentation +- [ ] Tagging Plan μ΅œμ’… 버전 μ €μž₯ +- [ ] GTM μ»¨ν…Œμ΄λ„ˆ 버전 기둝 +- [ ] Notion에 λͺ¨λ“  λ¬Έμ„œ μ—…λ‘œλ“œ + +## Next Phase + +κ΅¬ν˜„ μ™„λ£Œ ν›„ β†’ Phase 6: Progressive Audit diff --git a/custom-skills/22-gtm-guardian/desktop/references/platform-mapping.md b/custom-skills/22-gtm-guardian/desktop/references/platform-mapping.md new file mode 100644 index 0000000..e8bbc18 --- /dev/null +++ b/custom-skills/22-gtm-guardian/desktop/references/platform-mapping.md @@ -0,0 +1,125 @@ +# Platform Event Mapping Reference + +GA4, Google Ads, Meta Pixel, Kakao Pixel κ°„ 이벀트 λ§€ν•‘. + +## E-commerce Events + +| User Action | GA4 | Meta | Kakao | Google Ads | +|-------------|-----|------|-------|------------| +| μƒν’ˆ λͺ©λ‘ 쑰회 | view_item_list | ViewContent | viewContent | - | +| μƒν’ˆ 상세 쑰회 | view_item | ViewContent | viewContent | - | +| μƒν’ˆ 검색 | search | Search | search | - | +| μž₯λ°”κ΅¬λ‹ˆ λ‹΄κΈ° | add_to_cart | AddToCart | addToCart | - | +| μœ„μ‹œλ¦¬μŠ€νŠΈ | add_to_wishlist | AddToWishlist | addToWishlist | - | +| 결제 μ‹œμž‘ | begin_checkout | InitiateCheckout | beginCheckout | - | +| 배솑정보 μž…λ ₯ | add_shipping_info | - | - | - | +| κ²°μ œμ •λ³΄ μž…λ ₯ | add_payment_info | AddPaymentInfo | addPaymentInfo | - | +| ꡬ맀 μ™„λ£Œ | purchase | Purchase | purchase | purchase | + +## Lead Gen Events + +| User Action | GA4 | Meta | Kakao | Google Ads | +|-------------|-----|------|-------|------------| +| νšŒμ›κ°€μž… | sign_up | CompleteRegistration | completeRegistration | sign_up | +| 둜그인 | login | - | login | - | +| λ¦¬λ“œ 생성 | generate_lead | Lead | participation | submit_lead_form | + +## Engagement Events + +| User Action | GA4 | Meta | Kakao | Google Ads | +|-------------|-----|------|-------|------------| +| νŽ˜μ΄μ§€ 쑰회 | page_view | PageView | pageView | page_view | +| 검색 | search | Search | search | - | +| 곡유 | share | - | - | - | + +## Parameter Transformation + +### GA4 β†’ Meta +```javascript +// GA4 items[] β†’ Meta content_ids[] +const contentIds = items.map(item => item.item_id); + +// Meta Purchase +fbq('track', 'Purchase', { + content_ids: contentIds, + content_type: 'product', + value: ecommerce.value, + currency: 'KRW', + num_items: items.length +}); +``` + +### GA4 β†’ Kakao +```javascript +// GA4 items[] β†’ Kakao products[] +const products = items.map(item => ({ + id: item.item_id, + name: item.item_name, + price: item.price, + quantity: item.quantity +})); + +// Kakao purchase +kakaoPixel('PIXEL_ID').purchase({ + total_price: ecommerce.value, + currency: 'KRW', + products: products +}); +``` + +## GTM Variables + +### CJS - Item IDs for Meta +```javascript +function() { + var items = {{DLV - ecommerce.items}} || []; + return items.map(function(item) { + return item.item_id; + }); +} +``` + +### CJS - Products for Kakao +```javascript +function() { + var items = {{DLV - ecommerce.items}} || []; + return items.map(function(item) { + return { + id: item.item_id, + name: item.item_name, + price: item.price, + quantity: item.quantity + }; + }); +} +``` + +## Deduplication + +### Event ID Pattern +```javascript +var eventId = 'evt_' + Date.now() + '_' + Math.random().toString(36).substr(2, 9); + +// Client-side +fbq('track', 'Purchase', {...}, {eventID: eventId}); + +// Server-side (CAPI) +// λ™μΌν•œ eventId μ‚¬μš© β†’ Meta μžλ™ 쀑볡 제거 +``` + +## Platform-specific Notes + +### Meta Pixel +- content_type: 'product' (μƒν’ˆ) / 'product_group' (λ³€ν˜•) +- currency: ISO 4217 ν•„μˆ˜ +- value: 숫자 (μ†Œμˆ˜μ  κ°€λŠ₯) + +### Kakao Pixel +- Server-side 미지원 (Client-only) +- products[]: μ΅œλŒ€ 10개 ꢌμž₯ +- total_price: 숫자 + +### Google Ads +- Enhanced Conversions ꢌμž₯ +- transaction_id ν•„μˆ˜ (쀑볡 제거용) +- value: KRW μ •μˆ˜ diff --git a/custom-skills/22-gtm-guardian/desktop/references/qa-checklist.md b/custom-skills/22-gtm-guardian/desktop/references/qa-checklist.md new file mode 100644 index 0000000..92bf407 --- /dev/null +++ b/custom-skills/22-gtm-guardian/desktop/references/qa-checklist.md @@ -0,0 +1,149 @@ +# GTM Implementation QA Checklist + +νƒœκΉ… κ΅¬ν˜„ ν’ˆμ§ˆ 검증 체크리슀트. + +## 1. Pre-Implementation + +### Documentation +- [ ] Tagging Plan 승인 μ™„λ£Œ +- [ ] DataLayer μŠ€ν‚€λ§ˆ κ°œλ°œνŒ€ 곡유 +- [ ] 이벀트 νƒμ†Œλ…Έλ―Έ ν•©μ˜ μ™„λ£Œ + +### Access +- [ ] GTM μ»¨ν…Œμ΄λ„ˆ μ ‘κ·Ό κΆŒν•œ +- [ ] GA4 속성 μ ‘κ·Ό κΆŒν•œ +- [ ] κ΄‘κ³  ν”Œλž«νΌ μ ‘κ·Ό κΆŒν•œ + +### Tools +- [ ] GTM Preview λͺ¨λ“œ 정상 +- [ ] GA4 DebugView ν™œμ„±ν™” +- [ ] Chrome DevTools μ€€λΉ„ + +## 2. DataLayer Validation + +### Base Setup +- [ ] GTM μŠ€λ‹ˆνŽ« 이전 dataLayer μ΄ˆκΈ°ν™” +- [ ] νŽ˜μ΄μ§€ λ‘œλ“œ μ‹œ κΈ°λ³Έ 데이터 push +- [ ] pageType, userId λ“± κΈ°λ³Έ λ³€μˆ˜ 쑴재 + +### Data Types +- [ ] 숫자 값이 Number νƒ€μž… +- [ ] κΈˆμ•‘μ— 톡화 μ½”λ“œ 포함 (KRW) +- [ ] transaction_id μœ λ‹ˆν¬ + +### E-commerce +- [ ] ecommerce: null μ„ ν–‰ push +- [ ] items[] λ°°μ—΄ ꡬ쑰 μ •ν™• +- [ ] ν•„μˆ˜ νŒŒλΌλ―Έν„° μ™„λΉ„ + +### Console Check +```javascript +console.log(window.dataLayer); +dataLayer.filter(e => e.event === 'purchase'); +``` + +## 3. Tag Firing + +### GA4 +| Tag | Trigger | Status | +|-----|---------|--------| +| Config | All Pages | [ ] | +| view_item | Product page | [ ] | +| add_to_cart | Add button | [ ] | +| begin_checkout | Checkout start | [ ] | +| purchase | Thank you | [ ] | + +### Google Ads +| Conversion | Trigger | Status | +|------------|---------|--------| +| Purchase | DL - purchase | [ ] | +| Lead | DL - generate_lead | [ ] | + +### Meta Pixel +| Event | Trigger | Status | +|-------|---------|--------| +| PageView | All Pages | [ ] | +| ViewContent | Product | [ ] | +| AddToCart | Add | [ ] | +| Purchase | Thank you | [ ] | + +### Kakao Pixel +| Event | Trigger | Status | +|-------|---------|--------| +| pageView | All Pages | [ ] | +| purchase | Thank you | [ ] | + +## 4. Network Validation + +### Endpoints +``` +GA4: google-analytics.com/g/collect +GAds: googleads.g.doubleclick.net/pagead/conversion/ +Meta: facebook.com/tr/ +``` + +### Check Points +- [ ] μš”μ²­ 전솑됨 +- [ ] νŒŒλΌλ―Έν„° μ •ν™• +- [ ] 응닡 성곡 (200/204) + +## 5. Cross-browser Testing + +### Desktop +- [ ] Chrome +- [ ] Safari +- [ ] Firefox +- [ ] Edge + +### Mobile +- [ ] iOS Safari +- [ ] iOS Chrome +- [ ] Android Chrome + +## 6. Data Validation (Platform) + +### GA4 +- [ ] Realtime λ³΄κ³ μ„œ 이벀트 ν‘œμ‹œ +- [ ] νŒŒλΌλ―Έν„° μ •ν™•νžˆ μˆ˜μ§‘ +- [ ] E-commerce λ³΄κ³ μ„œ μ •ν™• + +### Google Ads +- [ ] μ „ν™˜ μ•‘μ…˜ 데이터 μœ μž… +- [ ] μ „ν™˜ κ°’ μ •ν™• + +### Meta +- [ ] Events Manager μˆ˜μ‹  확인 +- [ ] Event match quality 확인 + +## 7. Edge Cases + +- [ ] 빈 μž₯λ°”κ΅¬λ‹ˆ 결제 μ‹œμž‘ 처리 +- [ ] 0개 ꡬ맀 처리 +- [ ] 쿠폰 μ—†λŠ” ꡬ맀 +- [ ] 게슀트 체크아웃 +- [ ] μƒˆλ‘œκ³ μΉ¨ μ‹œ 쀑볡 λ°©μ§€ +- [ ] λ’€λ‘œκ°€κΈ° μ‹œ 처리 + +## 8. Performance & Privacy + +### Performance +- [ ] νƒœκ·Έ λ‘œλ”©μ΄ λ Œλ”λ§ 차단 μ•ˆ 함 +- [ ] 비동기 λ‘œλ”© + +### Privacy +- [ ] λ™μ˜ 없이 νƒœκ·Έ λ―Έλ°œν™” (CMP μ‹œ) +- [ ] PII 직접 μˆ˜μ§‘ μ—†μŒ + +## Sign-off + +| Role | Name | Date | βœ“ | +|------|------|------|---| +| QA Lead | | | | +| Analytics Lead | | | | +| Dev Lead | | | | + +## Issues Log + +| # | Issue | Severity | Status | +|---|-------|----------|--------| +| 1 | | High/Med/Low | Open/Resolved | diff --git a/custom-skills/22-gtm-guardian/desktop/references/sgtm-guide.md b/custom-skills/22-gtm-guardian/desktop/references/sgtm-guide.md new file mode 100644 index 0000000..361306a --- /dev/null +++ b/custom-skills/22-gtm-guardian/desktop/references/sgtm-guide.md @@ -0,0 +1,113 @@ +# 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 μ„€μ • +```javascript +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 + +1. **계정 생성**: stape.io +2. **Container 생성**: Region = Seoul (asia-northeast3) +3. **Custom Domain μ—°κ²°** + ``` + DNS: gtm.example.com CNAME [stape-provided-address] + ``` +4. **GTM Server Container ID μ—°κ²°** +5. **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 + +1. **Preview Mode**: GTM Server Container β†’ Preview +2. **Validation**: + - Client β†’ Server μš”μ²­ 도달 + - Server β†’ Platform 전솑 확인 + - Cookie μ„€μ • 확인 (1st-party) + - Latency < 200ms + +## Common Issues + +| Issue | Solution | +|-------|----------| +| μš”μ²­ 미도달 | CORS, Custom domain 확인 | +| Cookie λ―Έμ„€μ • | Same-site μ •μ±…, 도메인 확인 | +| Timeout | 리전 μ΅œμ ν™”, μŠ€μΌ€μΌλ§ | diff --git a/custom-skills/22-gtm-guardian/desktop/templates/event-taxonomy-template.csv b/custom-skills/22-gtm-guardian/desktop/templates/event-taxonomy-template.csv new file mode 100644 index 0000000..de7dfb3 --- /dev/null +++ b/custom-skills/22-gtm-guardian/desktop/templates/event-taxonomy-template.csv @@ -0,0 +1,25 @@ +event_name,event_category,trigger_type,trigger_condition,parameters,custom_dimensions,custom_metrics,ga4_mapping,meta_mapping,kakao_mapping,gads_mapping,priority,notes +page_view,engagement,pageview,All Pages,-,-,-,page_view (auto),PageView,pageView,-,P1,μžλ™ μˆ˜μ§‘ +view_item,ecommerce,dataLayer,event equals 'view_item',"items[], value, currency",page_type,-,view_item,ViewContent,viewContent,-,P1,μƒν’ˆ 상세 쑰회 +view_item_list,ecommerce,dataLayer,event equals 'view_item_list',"item_list_id, item_list_name, items[]",-,-,view_item_list,ViewContent,viewContent,-,P2,μƒν’ˆ λͺ©λ‘ 쑰회 +select_item,ecommerce,dataLayer,event equals 'select_item',"item_list_id, items[]",-,-,select_item,-,-,-,P3,λͺ©λ‘μ—μ„œ μƒν’ˆ 선택 +add_to_cart,ecommerce,dataLayer,event equals 'add_to_cart',"items[], value, currency",-,-,add_to_cart,AddToCart,addToCart,-,P1,μž₯λ°”κ΅¬λ‹ˆ λ‹΄κΈ° +remove_from_cart,ecommerce,dataLayer,event equals 'remove_from_cart',"items[], value, currency",-,-,remove_from_cart,-,-,-,P2,μž₯λ°”κ΅¬λ‹ˆ μ‚­μ œ +view_cart,ecommerce,dataLayer,event equals 'view_cart',"items[], value, currency",-,-,view_cart,-,-,-,P2,μž₯λ°”κ΅¬λ‹ˆ 쑰회 +add_to_wishlist,ecommerce,dataLayer,event equals 'add_to_wishlist',"items[], value, currency",-,wishlist_adds,add_to_wishlist,AddToWishlist,addToWishlist,-,P3,μœ„μ‹œλ¦¬μŠ€νŠΈ μΆ”κ°€ +begin_checkout,ecommerce,dataLayer,event equals 'begin_checkout',"items[], value, currency, coupon",-,-,begin_checkout,InitiateCheckout,beginCheckout,-,P1,결제 μ‹œμž‘ +add_shipping_info,ecommerce,dataLayer,event equals 'add_shipping_info',"items[], value, currency, shipping_tier",-,-,add_shipping_info,-,-,-,P2,배솑정보 μž…λ ₯ +add_payment_info,ecommerce,dataLayer,event equals 'add_payment_info',"items[], value, currency, payment_type",-,-,add_payment_info,AddPaymentInfo,addPaymentInfo,-,P2,κ²°μ œμ •λ³΄ μž…λ ₯ +purchase,ecommerce,dataLayer,event equals 'purchase',"transaction_id, items[], value, currency, tax, shipping, coupon",payment_method,-,purchase,Purchase,purchase,purchase,P1,ꡬ맀 μ™„λ£Œ +refund,ecommerce,dataLayer,event equals 'refund',"transaction_id, items[], value, currency",-,-,refund,-,-,-,P2,ν™˜λΆˆ +login,engagement,dataLayer,event equals 'login',method,-,-,login,-,login,-,P2,둜그인 +sign_up,engagement,dataLayer,event equals 'sign_up',method,-,-,sign_up,CompleteRegistration,completeRegistration,sign_up,P2,νšŒμ›κ°€μž… +search,engagement,dataLayer,event equals 'search',"search_term, results_count",-,-,search,Search,search,-,P2,검색 +generate_lead,lead_gen,dataLayer,event equals 'generate_lead',"value, currency, lead_source",-,-,generate_lead,Lead,participation,submit_lead_form,P1,λ¦¬λ“œ 생성 +form_start,lead_gen,dataLayer,event equals 'form_start',"form_id, form_name",-,form_starts,custom,-,-,-,P2,폼 μ‹œμž‘ +form_submit,lead_gen,dataLayer,event equals 'form_submit',"form_id, form_name, success",-,-,custom,Lead,participation,-,P1,폼 제좜 +share,engagement,dataLayer,event equals 'share',"method, content_type, item_id",-,-,share,-,-,-,P3,곡유 +cta_click,engagement,click,Click matches CTA selector,"cta_id, cta_text, cta_location",-,-,custom,-,-,-,P3,CTA 클릭 +video_start,engagement,dataLayer,event equals 'video_start',"video_title, video_id, video_duration",-,-,custom,-,-,-,P3,λΉ„λ””μ˜€ μ‹œμž‘ +video_complete,engagement,dataLayer,event equals 'video_complete',"video_title, video_id",-,-,custom,-,-,-,P3,λΉ„λ””μ˜€ μ™„λ£Œ +scroll_depth,engagement,scroll,Scroll 90%,percent,-,-,scroll (auto),-,-,-,P3,슀크둀 깊이 diff --git a/custom-skills/22-gtm-guardian/desktop/templates/tagging-plan-template.md b/custom-skills/22-gtm-guardian/desktop/templates/tagging-plan-template.md new file mode 100644 index 0000000..e260aa1 --- /dev/null +++ b/custom-skills/22-gtm-guardian/desktop/templates/tagging-plan-template.md @@ -0,0 +1,147 @@ +# [Project Name] Tagging Plan v1.0 + +## Document Information + +| Field | Value | +|-------|-------| +| Project | [ν”„λ‘œμ νŠΈλͺ…] | +| Client | [ν΄λΌμ΄μ–ΈνŠΈλͺ…] | +| Website/App | [URL] | +| Version | 1.0 | +| Last Updated | YYYY-MM-DD | +| Author | [μž‘μ„±μž] | +| Status | Draft / Review / Approved | + +--- + +## 1. Executive Summary + +### 1.1 Measurement Objectives +| Priority | Objective | KPI | Target | +|----------|-----------|-----|--------| +| P1 | | | | +| P2 | | | | +| P3 | | | | + +### 1.2 Key Conversions +| Conversion | Type | Value | Platform | +|------------|------|-------|----------| +| | Hard/Soft | | GA4, GAds, Meta | + +--- + +## 2. Event Specification + +### 2.1 GA4 Recommended Events +| Event | Trigger | Required Params | Status | +|-------|---------|-----------------|--------| +| page_view | All pages | - | βœ… | +| view_item | Product page | items[], value, currency | | +| add_to_cart | Add button | items[], value, currency | | +| begin_checkout | Checkout start | items[], value, currency | | +| purchase | Thank you | transaction_id, items[], value, currency | | + +### 2.2 Custom Events +| Event | Purpose | Trigger | Parameters | +|-------|---------|---------|------------| +| | | | | + +--- + +## 3. DataLayer Specification + +### 3.1 Page Load Data +```javascript +dataLayer.push({ + 'event': 'page_data', + 'page': { + 'type': '[page_type]', + 'name': '[page_name]' + }, + 'user': { + 'status': '[logged_in|logged_out]', + 'id': '[hashed_user_id]' + } +}); +``` + +### 3.2 E-commerce Events +β†’ See datalayer-schema.md + +--- + +## 4. Tag Configuration + +### 4.1 GA4 Tags +| Tag Name | Trigger | Variables | +|----------|---------|-----------| +| GA4 - Config - Main | All Pages | Const - GA4 ID | +| GA4 - Event - [event] | DL - [event] | DLV - ecommerce.* | + +### 4.2 Google Ads Tags +| Tag Name | Conversion ID | Label | Trigger | +|----------|---------------|-------|---------| +| | | | | + +### 4.3 Meta Pixel Tags +| Tag Name | Event | Trigger | +|----------|-------|---------| +| Meta - PageView | PageView | All Pages | +| | | | + +### 4.4 Kakao Pixel Tags +| Tag Name | Event | Trigger | +|----------|-------|---------| +| | | | + +--- + +## 5. Custom Dimensions & Metrics + +### Custom Dimensions +| Name | Scope | Parameter | Values | +|------|-------|-----------|--------| +| | User/Event | | | + +### Custom Metrics +| Name | Unit | Event Source | +|------|------|--------------| +| | Count/Currency | | + +--- + +## 6. Platform Mapping + +| GA4 Event | Meta | Kakao | Google Ads | +|-----------|------|-------|------------| +| view_item | ViewContent | viewContent | - | +| add_to_cart | AddToCart | addToCart | - | +| purchase | Purchase | purchase | purchase | + +--- + +## 7. Implementation Timeline + +| Phase | Task | Owner | Due | Status | +|-------|------|-------|-----|--------| +| 1 | DataLayer κ΅¬ν˜„ | Dev | | ☐ | +| 2 | GTM νƒœκ·Έ μ„€μ • | Analytics | | ☐ | +| 3 | QA ν…ŒμŠ€νŠΈ | QA | | ☐ | +| 4 | ν”„λ‘œλ•μ…˜ 배포 | Dev | | ☐ | + +--- + +## 8. QA Checklist +β†’ See qa-checklist.md + +--- + +## Appendix + +### A. Naming Conventions +β†’ See naming-conventions.md + +### B. Change Log +| Version | Date | Author | Changes | +|---------|------|--------|---------| +| 1.0 | | | Initial version |