Communitygithub.com

分析追蹤

當使用者想要設定、改善或稽核分析追蹤與衡量時使用。也適用於使用者提及相關需求時。

分析追蹤 是什麼?

此技能專注於分析追蹤的實作與衡量,協助使用者建立可提供可行洞察的追蹤系統,以支援行銷與產品決策。它涵蓋從初始評估、追蹤計畫框架、事件命名慣例、必備事件與屬性、GA4與Google Tag Manager實作、UTM參數策略,到除錯驗證與隱私合規的完整流程。技能支援多種工具,包括GA4、Mixpanel、Amplitude、PostHog與Segment,並提供工具整合指南與參考文件連結。最終產出為結構化的追蹤計畫文件,確保事件以決策為導向、命名一致且資料品質優良,避免虛榮指標及個資洩漏。

相容平台✓Claude Code~Codex CLI~Cursor
npx skills add https://github.com/coreyhaines31/marketingskills/tree/main/skills/analytics

在你喜歡的 AI 中提問

開啟一個已預先載入此 Agent Skill 的新對話。

說明文件

分析追蹤 是做什麼的?

您是分析實作與衡量的專家。您的目標是協助設定追蹤,為行銷與產品決策提供可行的洞察。

初步評估

先檢查產品行銷背景: 如果 .agents/product-marketing.md 或 .claude/product-marketing.md(或舊版配置中的 product-marketing-context.md)存在,請在提問前先閱讀。使用該背景資訊,僅詢問尚未涵蓋或與此任務相關的資訊。

在實作追蹤之前,請先了解:

  1. 業務背景 - 這些數據將用於哪些決策?關鍵的轉換是什麼?
  2. 當前狀態 - 現有哪些追蹤?正在使用哪些工具?
  3. 技術背景 - 技術架構是什麼?是否有任何隱私/合規要求?

核心原則

1. 為決策而追蹤,而非為數據

  • 每個事件都應能為決策提供資訊
  • 避免虛榮指標
  • 品質重於事件數量

2. 從問題開始

  • 您需要知道什麼?
  • 您將根據這些數據採取哪些行動?
  • 反向推導您需要追蹤的項目

3. 命名一致

  • 命名慣例很重要
  • 在實作前建立模式
  • 記錄所有內容

4. 維護資料品質

  • 驗證實作
  • 監控問題
  • 乾淨的資料勝過更多的資料

追蹤計畫框架

結構

事件名稱 | 分類 | 屬性 | 觸發條件 | 備註
---------- | -------- | ---------- | ------- | -----

事件類型

類型範例
頁面瀏覽自動,加上元數據增強
使用者動作按鈕點擊、表單提交、功能使用
系統事件註冊完成、購買、訂閱變更
自訂轉換目標完成、漏斗階段

如需完整的事件列表:請參閱 references/event-library.md


事件命名慣例

建議格式:物件-動作

signup_completed
button_clicked
form_submitted
article_read
checkout_payment_completed

最佳實務

  • 使用小寫與底線
  • 具體明確:cta_hero_clicked 優於 button_clicked
  • 將背景資訊放在屬性中,而非事件名稱
  • 避免空格與特殊字元
  • 記錄決策

必備事件

行銷網站

事件屬性
cta_clickedbutton_text, location
form_submittedform_type
signup_completedmethod, source
demo_requested-

產品/應用程式

事件屬性
onboarding_step_completedstep_number, step_name
feature_usedfeature_name
purchase_completedplan, value
subscription_cancelledreason

如需依業務類型分類的完整事件庫:請參閱 references/event-library.md


事件屬性

標準屬性

分類屬性
頁面page_title, page_location, page_referrer
使用者user_id, user_type, account_id, plan_type
活動source, medium, campaign, content, term
產品product_id, product_name, category, price

最佳實務

  • 使用一致的屬性名稱
  • 包含相關背景資訊
  • 不要重複自動屬性
  • 避免在屬性中包含 PII

GA4 實作

快速設定

  1. 建立 GA4 資源與資料串流
  2. 安裝 gtag.js 或 GTM
  3. 啟用增強型衡量
  4. 設定自訂事件
  5. 在管理員中標記轉換

自訂事件範例

gtag('event', 'signup_completed', {
  'method': 'email',
  'plan': 'free'
});

如需詳細的 GA4 實作指南:請參閱 references/ga4-implementation.md


Google Tag Manager

容器結構

元件用途
標籤執行的程式碼 (GA4, 像素)
觸發條件標籤何時觸發 (頁面瀏覽、點擊)
變數動態值 (點擊文字、資料層)

資料層模式

dataLayer.push({
  'event': 'form_submitted',
  'form_name': 'contact',
  'form_location': 'footer'
});

如需詳細的 GTM 實作指南:請參閱 references/gtm-implementation.md


UTM 參數策略

標準參數

參數用途範例
utm_source流量來源google, newsletter
utm_medium行銷媒介cpc, email, social
utm_campaign活動名稱spring_sale
utm_content區分版本hero_cta
utm_term付費搜尋關鍵字running+shoes

命名慣例

  • 全部小寫
  • 一致使用底線或連字號
  • 具體但簡潔:blog_footer_cta,而非 cta1
  • 在試算表中記錄所有 UTM

除錯與驗證

測試工具

工具用途
GA4 DebugView即時事件監控
GTM 預覽模式發布前測試觸發條件
瀏覽器擴充功能Tag Assistant, dataLayer Inspector

驗證檢查清單

  • 事件在正確的觸發條件下觸發
  • 屬性值正確填入
  • 沒有重複事件
  • 跨瀏覽器與行動裝置運作正常
  • 轉換正確記錄
  • 沒有 PII 外洩

常見問題

問題檢查項目
事件未觸發觸發條件設定、GTM 是否載入
值不正確變數路徑、資料層結構
重複事件多個容器、觸發條件觸發兩次

隱私與合規

考量事項

  • 在歐盟/英國/加拿大需要 Cookie 同意
  • 分析屬性中不得包含 PII
  • 資料保留設定
  • 使用者刪除功能

實作

  • 使用同意模式 (等待同意)
  • IP 匿名化
  • 僅收集所需資料
  • 與同意管理平台整合

輸出格式

追蹤計畫文件

# [網站/產品] 追蹤計畫

## 概述
- 工具:GA4, GTM
- 最後更新:[日期]

## 事件

| 事件名稱 | 描述 | 屬性 | 觸發條件 |
|------------|-------------|------------|---------|
| signup_completed | 使用者完成註冊 | method, plan | 成功頁面 |

## 自訂維度

| 名稱 | 範圍 | 參數 |
|------|-------|-----------|
| user_type | 使用者 | user_type |

## 轉換

| 轉換 | 事件 | 計數方式 |
|------------|-------|----------|
| 註冊 | signup_completed | 每次工作階段一次 |

任務特定問題

  1. 您使用哪些工具 (GA4, Mixpanel 等)?
  2. 您想要追蹤哪些關鍵動作?
  3. 這些數據將用於哪些決策?
  4. 誰負責實作 - 開發團隊還是行銷團隊?
  5. 是否有隱私/同意要求?
  6. 已經追蹤了什麼?

工具整合

如需實作指南,請參閱 工具註冊表。主要分析工具:

工具最佳用途MCP指南
GA4網站分析,Google 生態系統✓ga4.md
Mixpanel產品分析,事件追蹤-mixpanel.md
Amplitude產品分析,同類群組分析-amplitude.md
PostHog開源分析,工作階段重播-posthog.md
Segment客戶資料平台,路由-segment.md

相關技能

  • ab-testing:用於實驗追蹤
  • attribution:用於歸因模型、多點觸控/MMM/增量性,以及在追蹤啟用後協調各工具間的衝突數字
  • seo-audit:用於自然流量分析
  • cro:用於轉換率最佳化 (使用此資料)
  • revops:用於管道指標、CRM 追蹤與營收歸因

Individual skills in this repo

This repo contains 20 individual skills — each has its own dedicated page.

ab-testing

When the user wants to plan, design, or implement an A/B test or experiment, or build a growth experimentation program. Also use when the user mentions

ads

When the user wants help with paid advertising campaigns on Google Ads, Meta (Facebook/Instagram), LinkedIn, Twitter/X, or other ad platforms. Also use when the user mentions

ai-seo

When the user wants to optimize content for AI search engines, get cited by LLMs, or appear in AI-generated answers. Also use when the user mentions

aso

When the user wants to audit or optimize an App Store or Google Play listing. Also use when the user mentions

attribution

When the user wants to figure out which marketing actually drives conversions and revenue, choose or interpret an attribution model, or reconcile conflicting numbers across tools. Also use when the user mentions

churn-prevention

When the user wants to reduce churn, build cancellation flows, set up save offers, recover failed payments, or implement retention strategies. Also use when the user mentions

cold-email

Write B2B cold emails and follow-up sequences that get replies. Use when the user wants to write cold outreach emails, prospecting emails, cold email campaigns, sales development emails, or SDR emails. Also use when the user mentions

co-marketing

When the user wants to find co-marketing partners, plan joint campaigns, or brainstorm partnership opportunities. Use when the user says

community-marketing

Build and leverage online communities to drive product growth and brand loyalty. Use when the user wants to create a community strategy, grow a Discord or Slack community, manage a forum or subreddit, build brand advocates, increase word-of-mouth, drive community-led growth, engage users post-signup, or turn customers into evangelists. Trigger phrases: \

competitor-profiling

When the user wants to research, profile, or analyze competitors from their URLs. Also use when the user mentions

competitors

When the user wants to create competitor comparison or alternative pages for SEO and sales enablement. Also use when the user mentions

content-strategy

When the user wants to plan a content strategy, decide what content to create, or figure out what topics to cover. Also use when the user mentions

copy-editing

When the user wants to edit, review, or improve existing marketing copy, or refresh outdated content. Also use when the user mentions

copywriting

When the user wants to write, rewrite, or improve marketing copy for any page — including homepage, landing pages, pricing pages, feature pages, about pages, or product pages. Also use when the user says

coreyhaines31/ab-test-setup

When the user wants to plan, design, or implement an A/B test or experiment, or build a growth experimentation program. Also use when the user mentions "A/B test," "split test," "experiment," "test this change," "variant copy," "multivariate test," "hypothesis," "should I test this," "which version is better," "test two versions," "statistical significance," "how long should I run this test," "growth experiments," "experiment velocity," "experiment backlog," "ICE score," "experimentation program," or "experiment playbook." Use this whenever someone is comparing two approaches and wants to measure which performs better, or when they want to build a systematic experimentation practice. For tracking implementation, see analytics-tracking. For page-level conversion optimization, see page-cro.

coreyhaines31/analytics-tracking

When the user wants to set up, improve, or audit analytics tracking and measurement. Also use when the user mentions "set up tracking," "GA4," "Google Analytics," "conversion tracking," "event tracking," "UTM parameters," "tag manager," "GTM," "analytics implementation," "tracking plan," "how do I measure this," "track conversions," "attribution," "Mixpanel," "Segment," "are my events firing," or "analytics isn't working." Use this whenever someone asks how to know if something is working or wants to measure marketing results. For A/B test measurement, see ab-test-setup.

coreyhaines31/aso-audit

When the user wants to audit or optimize an App Store or Google Play listing. Also use when the user mentions 'ASO audit,' 'app store optimization,' 'optimize my app listing,' 'improve app visibility,' 'app store ranking,' 'audit my listing,' 'why aren't people downloading my app,' 'improve my app conversion,' 'keyword optimization for app,' or 'compare my app to competitors.' Use when the user shares an App Store or Google Play URL and wants to improve it.

coreyhaines31/competitor-alternatives

When the user wants to create competitor comparison or alternative pages for SEO and sales enablement. Also use when the user mentions 'alternative page,' 'vs page,' 'competitor comparison,' 'comparison page,' '[Product] vs [Product],' '[Product] alternative,' 'competitive landing pages,' 'how do we compare to X,' 'battle card,' or 'competitor teardown.' Use this for any content that positions your product against competitors. Covers four formats: singular alternative, plural alternatives, you vs competitor, and competitor vs competitor. For sales-specific competitor docs, see sales-enablement.

coreyhaines31/email-sequence

When the user wants to create or optimize an email sequence, drip campaign, automated email flow, or lifecycle email program. Also use when the user mentions "email sequence," "drip campaign," "nurture sequence," "onboarding emails," "welcome sequence," "re-engagement emails," "email automation," "lifecycle emails," "trigger-based emails," "email funnel," "email workflow," "what emails should I send," "welcome series," or "email cadence." Use this for any multi-email automated flow. For cold outreach emails, see cold-email. For in-app onboarding, see onboarding-cro.

coreyhaines31/form-cro

When the user wants to optimize any form that is NOT signup/registration — including lead capture forms, contact forms, demo request forms, application forms, survey forms, or checkout forms. Also use when the user mentions "form optimization," "lead form conversions," "form friction," "form fields," "form completion rate," "contact form," "nobody fills out our form," "form abandonment," "too many fields," "demo request form," or "lead form isn't converting." Use this for any non-signup form that captures information. For signup/registration forms, see signup-flow-cro. For popups containing forms, see popup-cro.

相關技能