Restructure skill numbering: SEO 11-30, GTM 60-69, reserve 19-28 for future skills
Renumber 12 existing skills to new ranges: - SEO: 11→13, 12→18, 13→16, 14→17, 15→14, 16→15, 17→29, 18→30, 19→12 - GTM: 20→60, 21→61, 22→62 Update cross-references in gateway architect/builder skills, GTM guardian README, CLAUDE.md (skill tables + directory layout), and AGENTS.md (domain routing ranges). Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -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개
|
||||
- 초과 시 분할 전송
|
||||
@@ -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
|
||||
[변경 이유]
|
||||
```
|
||||
@@ -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
|
||||
@@ -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
|
||||
@@ -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
|
||||
@@ -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
|
||||
@@ -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
|
||||
<script>
|
||||
window.dataLayer = window.dataLayer || [];
|
||||
</script>
|
||||
<!-- Google Tag Manager -->
|
||||
<script>...</script>
|
||||
```
|
||||
|
||||
### 페이지 로드 시 기본 데이터
|
||||
```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
|
||||
@@ -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 정수
|
||||
149
custom-skills/62-gtm-guardian/desktop/references/qa-checklist.md
Normal file
149
custom-skills/62-gtm-guardian/desktop/references/qa-checklist.md
Normal file
@@ -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 |
|
||||
113
custom-skills/62-gtm-guardian/desktop/references/sgtm-guide.md
Normal file
113
custom-skills/62-gtm-guardian/desktop/references/sgtm-guide.md
Normal file
@@ -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 | 리전 최적화, 스케일링 |
|
||||
Reference in New Issue
Block a user