关于 gtm-reporting
gtm-reporting 是一项技能,可将 Google Tag Manager 跟踪细节整理为技术文档、报告建议、受众定义和利益相关方摘要。它适用于需要记录跟踪实现,并向技术与业务受众说明分析价值的团队。
主要功能
- 01编写事件架构与实现文档
- 02分析 GA4 报告能力
- 03建议仪表板配置
- 04定义再营销受众
- 05生成技术与利益相关方摘要
适用场景
- 01记录已完成的 GTM 跟踪实现
- 02识别跟踪事件支持的 GA4 报告
- 03为营销或管理团队规划仪表板
- 04描述用于再营销的事件受众
安装
复制下面的命令,在终端中运行。
npx skills add https:/ / github.com/ aimonk2025/ google-tag-manager-automation --skill gtm-reporting安装后在 Claude Code 中输入/gtm-reporting确认已加载。
附带文件examples/sample.mdtemplate.md
详细介绍
GTM 报告 - 文档与影响分析
生成全面的文档,并分析 GTM 跟踪实施带来的报告影响。
核心使命
将技术跟踪实施转化为以业务为重点的文档,其中:
- 说明实施了哪些内容(技术文档)
- 展示现在可以获得哪些洞察(报告影响)
- 推荐要构建的具体报告(GA4 配置)
- 定义高价值受众(再营销/细分)
- 将事件转化为业务价值(利益相关者摘要)
工作流
阶段 0:加载业务背景(如有)
检查项目根目录中是否存在 gtm-context.md:
- 如果存在:静默读取,并在本次技能运行期间使用业务背景(网站类型、目标和报告相关利益方会影响执行摘要的语气和报告选择)
- 如果不存在:正常继续,并在工作流中按常规询问背景信息
该文件会在 gtm-analytics-audit 首次运行结束时自动创建。
阶段 1:加载背景信息
步骤 1.1:加载实施详情
Check for implementation artifacts:
- gtm-tracking-plan.json (from gtm-strategy)
- gtm-implementation-log.json (from gtm-implementation)
- gtm-test-results.json (from gtm-testing)
If missing → Ask user to describe what was implemented
步骤 1.2:分析实施范围
Extract key information:
- Events implemented (names, parameters)
- Elements tracked (CTAs, forms, navigation, etc.)
- Business model (SaaS, e-commerce, lead-gen)
- Primary goals (conversions, engagement, leads)
阶段 2:生成技术文档
为开发者和分析师创建全面的实施文档。
文档 2.1:事件架构文档
# GTM Tracking Implementation - Event Schema
Last Updated: [Date]
GTM Container: GTM-XXXXXX
Implementation Version: 1.0
## Events Overview
This document describes all custom events implemented in Google Tag Manager.
### Event: cta_click
**Description**: Fires when a user clicks any call-to-action button on the site
**Trigger**: Custom Event "cta_click"
**Parameters**:
| Parameter | Type | Description | Example Values | Required |
|-----------|------|-------------|----------------|----------|
| cta_location | string | Section of page where CTA is located | "hero", "pricing", "footer" | Yes |
| cta_type | string | Visual style of CTA | "primary", "secondary", "text" | No |
| cta_text | string | Text content of button | "Get Started", "Book Demo" | Yes |
| cta_destination | string | Target URL or action | "/signup", "/pricing" | Yes |
**Sample DataLayer Push**:
```javascript
{
event: 'cta_click',
cta_location: 'hero',
cta_type: 'primary',
cta_text: 'Get Started',
cta_destination: '/signup'
}
GTM 配置:
- 变量:DLV - CTA Location、DLV - CTA Type、DLV - CTA Text、DLV - CTA Destination
- 触发器:CE - CTA Click
- 标签:GA4 - CTA Click
跟踪的元素:网站上的 12 个 CTA 按钮
事件:form_submit
说明:用户提交网站上的任意表单时触发
触发器:自定义事件 "form_submit"
参数:
| 参数 | 类型 | 说明 | 示例值 | 必填 |
|---|---|---|---|---|
| form_name | 字符串 | 表单标识符 | "contact"、"newsletter"、"demo" | 是 |
| form_location | 字符串 | 表单所在的页面版块 | "hero"、"footer"、"sidebar" | 是 |
| form_type | 字符串 | 表单用途/类别 | "contact_request"、"email_capture" | 是 |
示例 DataLayer 推送:
{
event: 'form_submit',
form_name: 'newsletter',
form_location: 'footer',
form_type: 'email_capture'
}
GTM 配置:
- 变量:DLV - Form Name、DLV - Form Location、DLV - Form Type
- 触发器:CE - Form Submit
- 标签:GA4 - Form Submit
跟踪的元素:网站上的 3 个表单
[继续处理所有事件……]
**Document 2.2: Implementation Summary**
```markdown
# GTM Implementation Summary
## Overview
This document summarizes the GTM tracking implementation completed on [Date].
## Scope
**Events Implemented**: 5 custom events
**Elements Tracked**: 23 total elements
- 12 CTA buttons
- 8 navigation links
- 3 forms
**Code Changes**: 8 files modified
## Technical Stack
- Framework: Next.js 16.1.6 (App Router)
- GTM Container: GTM-XXXXXX
- GA4 Property: [Property ID]
- Implementation Method: DataLayer + GTM API
## Events Summary
| Event Name | Purpose | Elements | Priority |
|------------|---------|----------|----------|
| cta_click | Track conversion intent via CTA clicks | 12 | P0 |
| form_submit | Capture lead submissions | 3 | P0 |
| form_start | Measure form abandonment | 3 | P0 |
| navigation_click | Understand user journey | 8 | P1 |
| video_play | Measure content engagement | 1 | P1 |
## GTM Configuration
**Created via API**:
- 12 Data Layer Variables
- 5 Custom Event Triggers
- 5 GA4 Event Tags
**Container Version**: 42
**Published**: [Date]
## Files Modified
1. `app/page.tsx` - Added CTA and form tracking (4 elements)
2. `components/Navbar.tsx` - Added navigation tracking (5 elements)
3. `components/Footer.tsx` - Added navigation and form tracking (4 elements)
... [list all files]
## Testing Status
All events validated across 3 tiers:
✓ Tier 1: Browser Console (dataLayer)
✓ Tier 2: GTM Preview Mode
✓ Tier 3: GA4 DebugView
## Maintenance
**Adding New Tracking**:
1. Add analytics classes to element (js-track js-cta js-click js-location)
2. Implement dataLayer.push() in onClick handler
3. Create GTM variable/trigger/tag (or use existing)
4. Test in Preview mode
5. Publish container
**Modifying Existing Tracking**:
1. Update dataLayer.push() parameters in code
2. Update GTM tag event parameters if needed
3. Test and publish
## Support
For questions or issues, contact: [Technical Owner]
阶段 3:报告影响分析
分析通过这些跟踪现在可以生成哪些报告和洞察。
分析 3.1:已支持的 GA4 报告
# Reporting Capabilities - GA4
## New Reports Enabled by Implementation
### 1. CTA Performance Dashboard
**Purpose**: Understand which CTAs drive conversions
**Metrics**:
- CTA clicks by location (hero vs pricing vs footer)
- CTA clicks by type (primary vs secondary)
- CTA click-through rate by page
- CTA → Form submission conversion rate
**How to Build**:
1. GA4 → Explore → Free Form
2. Dimensions: Event name, CTA location, CTA type, CTA text
3. Metrics: Event count, Conversions
4. Segment: Users who clicked CTA → Users who submitted form
**Business Value**: Optimize CTA placement and copy based on conversion data
---
### 2. Form Funnel Analysis
**Purpose**: Measure form abandonment and completion
**Funnel Steps**:
1. form_start (user begins filling form)
2. form_submit (user submits form)
3. /thank-you (confirmation page view)
**Metrics**:
- Abandonment rate: (form_start - form_submit) / form_start
- Completion rate: form_submit / form_start
- Average time to complete: form_submit timestamp - form_start timestamp
**How to Build**:
1. GA4 → Explore → Funnel Exploration
2. Step 1: form_start
3. Step 2: form_submit
4. Step 3: page_view (page_location contains /thank-you)
5. Breakdown by form_name
**Business Value**: Identify form friction points and improve conversion rates
---
### 3. User Journey Mapping
**Purpose**: Understand how users navigate the site
**Path Analysis**:
- Entry page → First navigation click → Second click → Conversion
- Most common paths to pricing page
- Navigation patterns of converting vs non-converting users
**How to Build**:
1. GA4 → Explore → Path Exploration
2. Starting point: page_view OR navigation_click
3. Step types: Events and pages
4. Ending point: form_submit OR trial_start
**Business Value**: Optimize site structure and content flow based on user behavior
[Continue for all report types...]
分析 3.2:自定义仪表板
推荐具体的仪表板配置:
## Recommended Dashboards
### Executive Dashboard: Conversion Overview
**Audience**: C-suite, Marketing leadership
**Metrics** (Weekly):
- Total CTA clicks (trend)
- Form submissions (trend)
- CTA → Form conversion rate
- Top converting CTAs (by location)
- Form abandonment rate
**Format**: Looker Studio dashboard
**Value**: High-level conversion health monitoring
---
### Marketing Dashboard: Campaign Performance
**Audience**: Marketing team
**Metrics** (Daily):
- CTA clicks by traffic source (organic, paid, social)
- Form submissions by campaign
- Cost per form submission (CPC data + form_submit count)
- Landing page → CTA → Form funnel by campaign
**Format**: GA4 Custom Report
**Value**: Measure campaign ROI and optimize spend
---
### Product Dashboard: Engagement Metrics
**Audience**: Product team
**Metrics** (Weekly):
- Navigation patterns (top clicked links)
- Video engagement (play rate, completion rate)
- Feature page views → CTA clicks
- Time on site by engagement level
**Format**: GA4 Explorations
**Value**: Understand product interest and optimize content
阶段 4:受众定义
根据跟踪的事件定义高价值再营销受众。
受众 4.1:再营销受众
# Remarketing Audience Definitions
## Audience: High-Intent Visitors
**Criteria**:
- Clicked pricing CTA (cta_click where cta_destination = /pricing)
OR
- Submitted contact form (form_submit where form_type = contact_request)
Within last 7 days
**Size Estimate**: 5-10% of traffic
**Business Value**: Users showing strong purchase intent
**Remarketing Strategy**:
- Message: Case studies, testimonials, urgency ("Limited time offer")
- Channel: Google Ads, Facebook Ads
- Bid adjustment: +50% (high conversion probability)
**Expected ROI**: 3-5x higher conversion rate vs cold traffic
---
## Audience: Demo Requesters
**Criteria**:
- Clicked "Book Demo" CTA (cta_click where cta_text contains "Demo")
OR
- Submitted demo form (form_submit where form_name = demo)
Within last 14 days
**Size Estimate**: 1-3% of traffic
**Business Value**: Highest-intent audience, sales-ready
**Use Cases**:
1. Sales follow-up priority list
2. Email nurture sequence
3. Retargeting with customer success stories
**Expected ROI**: 10-20x higher conversion rate
---
## Audience: Engaged Browsers
**Criteria**:
- Viewed 3+ pages
AND
- Clicked 2+ CTAs (any type)
AND
- Time on site > 2 minutes
Within last 30 days
**Size Estimate**: 15-20% of traffic
**Business Value**: Researching actively, not yet converted
**Remarketing Strategy**:
- Message: Educational content, comparison guides
- Channel: Display ads, email (if captured)
- Goal: Move to high-intent with valuable content
**Expected ROI**: 2-3x higher conversion rate
[Continue for all audience definitions...]
阶段 5:利益相关者摘要
为业务利益相关者创建非技术性摘要。
摘要 5.1:执行摘要
# GTM Tracking Implementation - Executive Summary
## What We Built
We implemented comprehensive website analytics tracking that captures user behavior across all key conversion points.
## What This Means for the Business
### Before
- Limited visibility into which marketing efforts drive conversions
- No data on where users drop off in conversion funnel
- Guesswork for website optimization decisions
- Unable to identify high-value visitors for remarketing
### After
- Full visibility into user journey from landing to conversion
- Precise data on CTA performance and form abandonment
- Data-driven optimization of website and campaigns
- Ability to target high-intent visitors with personalized messaging
## Key Capabilities Unlocked
1. **CTA Optimization** ($)
- See which call-to-action buttons drive conversions
- A/B test button copy and placement with real data
- **Impact**: 10-30% increase in conversion rate typical
2. **Form Funnel Analysis** ($$)
- Identify exactly where users abandon forms
- Reduce friction, improve completion rates
- **Impact**: 5-15% increase in leads typical
3. **Campaign Attribution** ($$$)
- Know which campaigns drive qualified leads
- Optimize ad spend based on conversion data
- **Impact**: 20-40% improvement in CAC typical
4. **High-Intent Audiences** ($$)
- Target visitors who clicked pricing or requested demo
- 3-5x higher conversion rate on retargeting
- **Impact**: Significant ROI improvement on ad spend
## Investment vs Return
**Implementation Cost**:
- Time: 8 hours total (mostly automated)
- Ongoing: No additional cost (built on existing GA4/GTM)
**Expected Annual Value**:
- Improved conversion rates: $XXk-XXXk (depends on traffic)
- Reduced CAC from better targeting: $XXk
- Time saved vs manual reporting: $XXk
**ROI**: 10-50x typical (based on industry benchmarks)
## Next Steps
1. **Week 1-2**: Monitor data collection, validate accuracy
2. **Week 3-4**: Build recommended dashboards
3. **Month 2**: Launch remarketing to high-intent audiences
4. **Month 3**: Begin A/B testing CTAs based on data
## Questions?
Contact [Technical Owner] for implementation details or [Marketing Owner] for strategic questions.
阶段 6:生成输出
生成所有文档文件:
要创建的文件:
gtm-event-schema.md- 技术事件文档gtm-implementation-summary.md- 实施概览gtm-reporting-capabilities.md- 已支持的报告和洞察gtm-audience-definitions.md- 再营销受众规范gtm-executive-summary.md- 利益相关者摘要(非技术性)
命名约定:所有文件均以 gtm- 为前缀,便于识别
阶段 7:后续步骤建议
提供可执行的后续步骤:
=== GTM Implementation Documentation Complete ===
Documentation generated:
✓ Event schema (technical)
✓ Implementation summary
✓ Reporting capabilities analysis
✓ Audience definitions
✓ Executive summary (stakeholder-friendly)
All files saved to project root.
--- Recommended Next Steps ---
Week 1-2: Data Validation
[ ] Monitor events in GA4 Reports (not DebugView)
[ ] Verify event counts match expectations
[ ] Check that parameters are populating correctly
[ ] Identify any gaps or issues
Week 3-4: Build Dashboards
[ ] Create CTA Performance dashboard in Looker Studio
[ ] Set up Form Funnel in GA4 Explorations
[ ] Build User Journey path analysis
[ ] Configure conversion tracking
Month 2: Activate Audiences
[ ] Create "High-Intent Visitors" audience in GA4
[ ] Export to Google Ads for remarketing
[ ] Set up personalized ad campaigns
[ ] Monitor performance vs cold traffic
Month 3: Optimize & Iterate
[ ] A/B test top-performing CTAs (new copy/placement)
[ ] Optimize forms based on abandonment data
[ ] Adjust marketing spend based on attribution data
[ ] Refine audience definitions based on conversion data
--- Support Resources ---
Technical Documentation: See gtm-event-schema.md
Business Case: See gtm-executive-summary.md
Reporting Guide: See gtm-reporting-capabilities.md
Questions? Review documentation or contact implementation team.
资源
assets/doc-templates/implementation-summary.md
技术实施文档模板
assets/doc-templates/stakeholder-summary.md
执行/业务摘要模板
重要指南
文档原则
1. 两类受众,两种格式:
- 技术文档(工程师、分析师):内容详尽,包含代码示例和架构
- 业务文档(高管、市场营销人员):高层概述,聚焦投资回报率,避免使用术语
2. 提供可执行的建议:
- 不要只描述跟踪内容,还要说明如何利用数据
- 提供具体的报告配置,而非泛泛而谈的想法
- 说明每项建议预期带来的业务影响
3. 提供切实的投资回报率估算:
- 根据行业基准或保守假设进行估算
- 说明估算方法(例如:“优化 CTA 通常能提升 10% 的转化率”)
- 避免过度承诺——少承诺,多交付
4. 注重维护:
- 说明如何添加新的跟踪项
- 记录在 GTM 中查找配置的位置
- 为常见问题提供故障排查方法
翻译:技术 → 业务
技术:“实现了包含 4 个参数的 cta_click 事件”
业务:“现在可以跟踪哪些号召性用语按钮能促成转化,从而依据数据优化按钮文案和位置(转化率通常可提升 10-30%)”
技术:“创建了 form_start 和 form_submit 事件”
业务:“衡量表单放弃情况,找出阻碍点并改进潜在客户信息收集(表单完成率通常可提升 5-15%)”
技术:“配置了 3 个用于导航跟踪的数据层变量”
业务:“了解用户在网站上的浏览路径,以优化内容流程并提高参与度”
支持文件
template.md- Claude 填写的文档模板(event-schema、implementation-summary、reporting-capabilities、audience-definitions、executive-summary)examples/sample.md- 报告输出示例,包含控制台输出和 event-schema.md 摘录
执行检查清单
- 已加载实现详情
- 已生成事件架构文档
- 已创建实现摘要
- 已分析报告功能
- 已指定 GA4 报告配置
- 已记录受众定义
- 已计算投资回报率估算
- 已创建执行摘要
- 已提供后续步骤建议
- 已保存所有文档文件
常见问题
问:哪些文档应该发给哪些人? 答:技术文档 → 工程师/分析师。执行摘要 → 业务相关方。报告指南 → 市场营销团队。
问:应该多久更新一次文档? 答:添加或修改事件时进行更新。每季度审查一次,确保内容准确。
问:可以自定义模板吗? 答:可以。模板只是起点,请根据组织的需求进行调整。
问:如果我不知道投资回报率估算值怎么办? 答:使用行业基准(转化率通常可提升 10-30%),或跳过估算,重点说明功能。