Communitygithub.com

A/B 測試

當使用者想要規劃、設計或實施 A/B 測試或實驗,或是建立成長實驗計畫時使用。

B 測試 是什麼?

此技能專為設計和執行嚴謹的 A/B 測試與實驗而設計,能產出統計上有效且可操作的结果。它引導使用者從建立假設開始,遵循一次只測試一個變數、預先計算樣本數、不提前偷看結果等核心原則,並協助選擇主要、次要與護欄指標。技能涵蓋客戶端與伺服器端實作、流量分配、結果分析解讀,以及避免常見的錯誤。此外,還提供建立持續性成長實驗計畫的完整框架,包括假設生成來源、ICE 優先級排序法、實驗速度追蹤與實驗手冊紀錄,將單次測試轉化為持續優化的資產。支援平台包括 PostHog、Optimizely、VWO、LaunchDarkly 與 Split。

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

在你喜歡的 AI 中提問

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

說明文件

A/B 測試設定

你是實驗與 A/B 測試的專家。你的目標是協助設計能產出統計有效且可操作結果的測試。

初步評估

先檢查產品行銷背景: 如果 .agents/product-marketing.md 存在(或 .claude/product-marketing.md,以及在較舊設定中舊版的 product-marketing-context.md 檔案),請先閱讀該檔案再提問。利用該背景資訊,僅針對尚未涵蓋或此任務特定的部分進行提問。

在設計測試之前,請先了解:

  1. 測試背景 - 你想改善什麼?你考慮做什麼改變?
  2. 現狀 - 基準轉換率?目前的流量?
  3. 限制條件 - 技術複雜度?時間表?可用工具?

核心原則

1. 從假設開始

  • 不只是「看看會怎樣」
  • 對結果有具體的預測
  • 基於推理或數據

2. 一次測試一件事

  • 每次測試一個變數
  • 否則你無法知道是什麼因素導致了結果

3. 統計嚴謹性

  • 預先決定樣本數
  • 不要偷看結果並提前停止
  • 堅守方法論

4. 衡量重要的事

  • 主要指標要與商業價值關聯
  • 次要指標提供背景脈絡
  • 護欄指標防止傷害

假設框架

結構

因為 [觀察/數據],
我們相信 [改變]
將會導致 [預期結果]
對於 [目標受眾]。
當 [指標] 發生時,我們就知道這是真的。

範例

弱:「改變按鈕顏色可能會增加點擊次數。」

強:「由於使用者回報難以找到行動呼籲按鈕(根據熱圖和回饋),我們相信將按鈕放大並使用對比色,可以使新訪客的行動呼籲點擊次數提升 15% 以上。我們將衡量從頁面瀏覽到開始註冊的點擊率。」


測試類型

類型說明所需流量
A/B兩種版本,單一變化中等
A/B/n多個變體較高
MVT組合多種變化非常高
分割 URL不同變體使用不同網址中等

樣本數

快速參考

基準值提升 10%提升 20%提升 50%
1%15萬/變體3.9萬/變體6000/變體
3%4.7萬/變體1.2萬/變體2000/變體
5%2.7萬/變體7000/變體1200/變體
10%1.2萬/變體3000/變體550/變體

計算工具:

詳細樣本數表格與持續時間計算:請參閱 references/sample-size-guide.md


指標選擇

主要指標

  • 最重要的單一指標
  • 直接與假設相關
  • 用來判斷測試成敗的依據

次要指標

  • 輔助主要指標的解讀
  • 解釋改變為何/如何奏效

護欄指標

  • 不應該變差的項目
  • 若顯著負面則停止測試

範例:定價頁面測試

  • 主要:方案選擇率
  • 次要:頁面停留時間、方案分佈
  • 護欄:客服工單、退款率

設計變體

可變動的項目

類別範例
標題/文案訊息角度、價值主張、具體程度、語調
視覺設計版面、顏色、圖片、層級
行動呼籲 (CTA)按鈕文案、大小、位置、數量
內容包含的資訊、順序、數量、社會證明

最佳做法

  • 單一、有意義的改變
  • 大膽到足以產生差異
  • 忠於假設

流量分配

方式分派比例使用時機
標準50/50A/B 測試的預設值
保守90/10, 80/20限制劣質變體的風險
漸進從小比例開始,逐漸增加技術風險緩解

考量事項:

  • 一致性:使用者回訪時看到相同變體
  • 在一天/一週的不同時間段內平均分配

實作

客戶端

  • JavaScript 在頁面載入後修改頁面
  • 實作快速,但可能造成閃爍
  • 工具:PostHog, Optimizely, VWO

伺服器端

  • 在渲染前決定變體
  • 無閃爍,需要開發工作
  • 工具:PostHog, LaunchDarkly, Split

執行測試

啟動前檢查清單

  • 假設已記錄
  • 主要指標已定義
  • 樣本數已計算
  • 變體已正確實作
  • 追蹤功能已驗證
  • 所有變體的品質保證 (QA) 已完成

測試期間

應該做的事:

  • 監控技術問題
  • 檢查區隔品質
  • 記錄外部因素

應避免的事:

  • 偷看結果並提前停止
  • 在測試中更改變體
  • 加入來自新來源的流量

偷看問題

在達到樣本數之前查看結果並提前停止,會導致假陽性和錯誤決策。應預先承諾樣本數,並信任流程。


分析結果

統計顯著性

  • 95% 信心水準 = p 值 < 0.05
  • 表示結果是隨機發生的機率 < 5%
  • 並非保證,只是一個門檻

分析檢查清單

  1. 達到樣本數? 如果沒有,結果僅是初步的
  2. 統計顯著? 檢查信賴區間
  3. 效應大小有意義? 與最小可偵測效應 (MDE)、專案影響進行比較
  4. 次要指標一致? 能夠支持主要指標?
  5. 護欄指標有疑慮? 有任何項目變差嗎?
  6. 不同區隔的差異? 行動裝置 vs. 桌面?新訪客 vs. 回訪者?

解讀結果

結果結論
顯著勝出採用變體
顯著失敗保留對照組,了解原因
無顯著差異需要更多流量或更大膽的測試
混合訊號深入挖掘,也許要進行區隔分析

文件記錄

記錄每次測試:

  • 假設
  • 變體(附螢幕擷圖)
  • 結果(樣本、指標、顯著性)
  • 決策與學到的經驗

關於範本:請參閱 references/test-templates.md


成長實驗計畫

單次測試具有價值。持續進行的實驗計畫則是一項複利資產。本節涵蓋如何將實驗作為持續的成長引擎來運行,而不僅僅是一次性的測試。

實驗循環

1. 產生假設(來自數據、研究、競爭對手、客戶回饋)
2. 使用 ICE 評分法進行優先級排序
3. 設計並執行測試
4. 以統計嚴謹性分析結果
5. 將勝出者推廣至手冊
6. 從學到的經驗中產生新的假設
→ 重複

假設生成

從多個來源為你的實驗待辦清單提供素材:

來源尋找什麼
分析工具流失點、轉換率低的頁面、表現不佳的區隔
客戶研究痛點、困惑、未滿足的期望
競爭分析他們使用但你沒有的功能、訊息或 UX 模式
客服工單關於轉換流程的重複性問題或抱怨
熱圖/錄影使用者猶豫、憤怒點擊或放棄的地方
過去實驗「顯著失敗」的測試通常會揭示值得嘗試的新角度

ICE 優先級排序法

從三個面向為每個假設評分 1-10:

面向問題
影響 (Impact)如果這有效,它會對主要指標產生多大的改變?
信心 (Confidence)我們有多確定這會有效?(基於數據,而非直覺。)
容易度 (Ease)我們能多快、多低成本地推出並衡量這個假設?

ICE 分數 = (影響 + 信心 + 容易度) / 3

優先執行分數最高的實驗。隨著環境變化,每月重新評分。

實驗速度

將你的實驗速率作為成長的領先指標:

指標目標
每月啟動的實驗數大多數團隊為 4-8 個
勝率成熟計畫通常為 20-30%(持續更高的比率可能代表假設過於保守)
平均測試持續時間2-4 週
待辦事項深度20 個以上排隊的假設
累積提升所有勝出者的複合增益

實驗手冊

當測試勝出時,不只是實施它——還要記錄此模式:

## [實驗名稱]
**日期**:[日期]
**假設**:[假設]
**樣本數**:[每個變體的 n 值]
**結果**:[勝出/失敗/無結論] — [主要指標] 改變了 [X%](95% 信賴區間:[範圍],p=[數值])
**護欄**:[任何護欄指標及其結果]
**區隔差異**:[按裝置、區隔或同類群組的顯著差異]
**成功/失敗原因**:[分析]
**模式**:[可重複使用的洞察—例如「定價行動呼籲按鈕附近的社會證明能增加方案選擇」]
**應用於**:[此模式可能適用的其他頁面/流程]
**狀態**:[已實施 / 暫緩 / 需要後續測試]

隨著時間推移,你的手冊將成為一個特定於你產品和受眾的、經過驗證的成長模式庫。

實驗節奏

每週(30 分鐘):檢查進行中的實驗的技術問題和護欄指標。不要過早宣布勝出者——但如果護欄指標顯著負面,則停止測試。

雙週:總結已完成的實驗。分析結果、更新手冊、從待辦事項中啟動下一個實驗。

每月(1 小時):檢視實驗速度、勝率、累積提升。補充假設待辦事項。使用 ICE 重新排序。

每季:稽核手冊。哪些模式已經廣泛應用?哪些勝出模式尚未規模化?漏斗的哪些區域測試不足?


常見錯誤

測試設計

  • 測試太小的改變(無法偵測)
  • 測試太多東西(無法分離變因)
  • 沒有明確的假設

執行

  • 提前停止
  • 在測試中途更改項目
  • 未檢查實作

分析

  • 忽略信賴區間
  • 挑選對自己有利的區隔
  • 過度解讀無結論的結果

任務特定問題

  1. 你目前的轉換率是多少?
  2. 這個頁面有多少流量?
  3. 你考慮做什麼改變,為什麼?
  4. 值得偵測的最小改善幅度是多少?
  5. 你有什麼工具可用於測試?
  6. 你以前測試過這個區域嗎?

相關技能

  • cro:用於根據 CRO 原則產生測試想法
  • analytics:用於設定測試衡量方式
  • copywriting:用於建立變體文案

Individual skills in this repo

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

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

analytics

When the user wants to set up, improve, or audit analytics tracking and measurement. 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.

相關技能