configuring-experiment-analytics
하는 일
이 스킬은 실험 분석에 누가 포함되는지, 그리고 실험이 효과가 있었는지 보여 주는 숫자가 무엇인지 설정합니다. A/B 테스트의 측정 부분을 설정하는 사람을 위한 것입니다.
사용하는 경우
- ✓실험에서 어떤 사용자를 셀지 정해야 할 때.
- ✓테스트의 주요 지표와 보조 지표를 고르고 싶을 때.
- ✓한 실험에서 둘 이상의 변형을 보는 사용자를 처리해야 할 때.
스킬 링크
https://github.com/PostHog/posthog/blob/master/products/experiments/skills/configuring-experiment-analytics/SKILL.md복사해서 AI(Claude, ChatGPT, Cursor)에 붙여넣고 지침을 따르도록 요청하세요.
사용 방법
가장 쉬운 방법입니다. 메시지를 복사해 AI에 붙여넣으세요. AI가 스킬을 읽고 지침을 따릅니다.
바로 붙여넣을 수 있는 메시지
Claude Code, Codex, Cursor용입니다. 프로젝트 폴더에서 실행하면 스킬이 설치됩니다.
SKILL.md를 다운로드해 에이전트의 스킬 폴더에 넣으세요.
AI에게 요청하는 예시
“결제 페이지에 도달한 사용자만 집계되도록 체크아웃 실험을 설정하고, 주요 지표로 전환율을 추적해 주세요.”
매주 새 스킬 5개. 읽는 데 1분.
작동 방식
분석에 포함될 사람을 결정하는 노출 규칙을 설정한 다음, 영향을 측정하는 지표를 추가합니다. 또한 여러 변형을 본 사용자를 처리하는 방법도 설명합니다.
기술 내용 (원본 SKILL.md)
작성자의 영어 원문을 GitHub에서 그대로 가져왔습니다.
Configuring experiment analytics
This skill answers: Who is included in the analysis? and How to measure impact?
Exposure criteria
Exposure criteria determine which users are counted in the experiment analysis.
Exposure event
Two options:
- Default exposure event — users are included when the experiment's default exposure event fires for the experiment's flag:
$feature_flag_called, or$experiment_exposurefor newer experiments. Which one applies is resolved server-side — readresolved_exposure_eventfromexperiment-getrather than assuming either name (both events carry the same properties). When it is$feature_flag_called, also read$experiment_exposure(event IN ('$feature_flag_called', '$experiment_exposure')), and count persons, not rows. This is the standard approach — it means a user is included only when they actually encounter the feature flag in your code. - Custom exposure event — users are included when a specific custom event fires. Use this when you want tighter control over who enters the analysis (e.g., only users who actually visit the page where the experiment runs).
Filters on the exposure event remove individual events, not users.
A user still counts as long as one of their exposure events passes the filters.
To keep users out of the experiment, exclude them in the flag's release conditions before launch (see configuring-experiment-rollout).
Multiple variant handling
When a user is exposed to multiple variants (e.g., due to flag changes or race conditions):
- Exclude from analysis — removes these users from the analysis entirely. Cleaner data, smaller sample.
- Use first seen variant — assigns users to the first variant they were exposed to. Keeps all users in the analysis. Note that "first seen" can introduce other biases as behavior cannot be clearly attributed to a single variant and is not recommended unless necessary.
Bias risk on uneven splits. "Exclude from analysis" combined with an uneven variant split can introduce bias — multi-variant users are dropped asymmetrically and the smaller variant loses a larger fraction of its assignments. If those users behave differently from the rest, the smaller variant's metrics will be skewed.
The right mitigation depends on experiment state:
- Not yet launched, or only exposed to a few users so far — switch to an even variant split and
use the overall rollout percentage to limit test-variant exposure. This removes the bias and
preserves statistical power. See
configuring-experiment-rollout. - Live experiment with significant exposures — changing the split mid-run reassigns users across variants, which is bad for user experience and data quality. Switch this setting to "Use first seen variant" instead — it keeps already-assigned users in their original variant (no reassignment) and removes the asymmetric exclusion.
Filter test accounts
exposure_criteria.filterTestAccounts (default: true) — excludes internal/test users from the analysis.
Resolving experiments
Metric changes require an experiment ID. If the user refers to an experiment by name
or description (e.g. "add metrics to the checkout test"), load the finding-experiments
skill to resolve it to a concrete ID before proceeding.
Metrics
A metric reaches an experiment one of two ways, both via experiment-update:
- Inline metric — defined directly on the experiment. Sent in the
metricsarray, which replaces the entire inline list, so always get the current experiment first viaexperiment-getto preserve existing metrics. - Shared (saved) metric — a reusable metric object that can be attached to many experiments.
Attached by ID via
saved_metrics_ids(this list also replaces the experiment's existing saved-metric links, so resend the full set — see Step 1).
Prefer reusing a shared metric over duplicating it inline. Build a new inline metric only when no suitable shared metric already exists.
Step 1: Check for an existing shared metric (REQUIRED — match by definition, not name)
Before building any new inline metric, you MUST check whether the project already has a shared (saved) metric that measures the same thing, and reuse it. Duplicating a metric that already exists as a shared metric fragments measurement and is exactly what we want to avoid.
*Reuse is decided by the metric definition — the event or action plus the metric type — not the name.
자주 묻는 질문
노출 이벤트란 무엇인가요?
사용자가 기능 플래그를 봤다는 것을 보여 주는 이벤트이므로, 그 사용자가 분석에 포함됩니다.
노출 이벤트를 필터링하면 사용자가 제외되나요?
아니요. 개별 이벤트만 제거되며, 노출 이벤트 중 하나라도 필터를 통과하면 사용자는 여전히 집계됩니다.
어떤 지표 유형을 지원하나요?
개수, 합계, 비율, 유지 지표를 지원합니다.
상세 정보
작성자의 원본 설명
Configures the analytics side of a PostHog experiment — exposure criteria (server-resolved default exposure event vs custom exposure events), primary and secondary metrics, the supported metric types (count, sum, ratio with `math` and `math_property`, retention with `retention_window_start` and `start_handling`), multivariate user handling ("Exclude from analysis" vs "Use first seen variant"), and how to read results once the experiment is live. Use when the user adds or edits a primary or secondary metric (e.g. "add a secondary metric tracking 'downloaded_file' per user"), sets up a ratio met
repo: PostHog/posthog
인기도
- GitHub 스타
- 41k
- 순위
- #6875
- 라이선스
- —
- 업데이트
- 2026. 11. 2.
댓글
- …
이 저장소의 다른 스킬
depot-ci
41k에이전트가 GitHub Actions 대안인 Depot CI 워크플로를 설정하고 실행하도록 돕습니다. 기존 워크플로 이전과 실행 로그 읽기를 포함합니다.
depot-container-builds
41k에이전트가 Depot 원격 빌더에서 Docker 이미지를 빌드하도록 돕습니다. 다중 플랫폼 이미지, 레지스트리 푸시, 빌드 실패 수정을 포함합니다.
depot-github-runners
41k에이전트가 GitHub Actions 작업을 Depot 관리형 러너로 옮기고, 러너 크기와 라벨을 고르도록 돕습니다.
editing-agents-md
41k에이전트가 규칙을 AGENTS.md나 CLAUDE.md 중 어디에 둘지 정하고, 파일을 키우지 않으면서 잘 지켜지도록 쓰게 돕습니다.
비슷한 스킬
gitcrawl
394k에이전트가 저장된 GitHub 이슈와 풀 리퀘스트 보관본을 검색하고, 중복 항목을 묶고, GitHub에서 현재 상태를 확인하도록 돕습니다.
slacrawl
394k에이전트가 로컬 Slack 보관본에서 메시지를 검색하고 개수를 세며, 보관본이 얼마나 최신인지 확인하고 필요할 때 새로 고치도록 돕습니다.
goplaces
394k에이전트가 Google Places로 장소를 검색하고, 세부 정보와 리뷰를 가져오고, 장소 이름을 확인하며, 스크립트용 JSON을 출력하도록 돕습니다.