configuring-experiment-analytics
Fungsinya
Skill ini menyiapkan siapa saja yang disertakan dalam analisis eksperimen dan angka mana yang menunjukkan apakah eksperimen berhasil. Ditujukan untuk orang yang menyiapkan sisi pengukuran dari A/B test.
Kapan dipakai
- βSaat Anda perlu memutuskan pengguna mana yang harus dihitung dalam eksperimen.
- βSaat Anda ingin memilih metrik utama dan metrik sekunder untuk sebuah tes.
- βSaat Anda perlu menangani pengguna yang melihat lebih dari satu varian dalam eksperimen.
Link skill
https://github.com/PostHog/posthog/blob/master/products/experiments/skills/configuring-experiment-analytics/SKILL.mdSalin lalu tempelkan ke AI Anda (Claude, ChatGPT, atau Cursor) dan minta AI mengikuti instruksinya.
Cara pakai
Cara paling mudah: salin pesan ini dan tempelkan ke AI Anda. AI akan membaca skill dan mengikuti instruksinya.
Pesan siap tempel
Untuk Claude Code, Codex, atau Cursor: jalankan di folder proyek, lalu skill langsung terpasang.
Unduh SKILL.md lalu taruh di folder skill agen Anda.
Contoh permintaan ke AI
βAtur eksperimen checkout saya agar hanya pengguna yang mencapai halaman pembayaran yang dihitung, dan lacak konversi sebagai metrik utama.β
5 skill baru setiap minggu. 1 menit baca.
Cara kerjanya
Skill menetapkan aturan paparan yang menentukan siapa yang masuk ke analisis, lalu menambahkan metrik yang mengukur dampak. Skill juga menjelaskan cara menangani pengguna yang melihat lebih dari satu varian.
Konten teknis (SKILL.md asli)
Teks asli dari pembuat, dalam bahasa Inggris, langsung dari 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.
Pertanyaan umum
Apa itu event paparan?
Itu adalah event yang menunjukkan pengguna telah melihat feature flag, sehingga pengguna tersebut disertakan dalam analisis.
Apakah memfilter event paparan menghapus pengguna?
Tidak. Filter menghapus event individual, dan pengguna tetap dihitung jika salah satu event paparannya lolos filter.
Jenis metrik apa yang didukung?
Metrik hitungan, jumlah, rasio, dan retensi didukung.
Detail
Deskripsi asli dari pembuat
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
Popularitas
- Bintang GitHub
- 41k
- Peringkat
- #6875
- Lisensi
- β
- Diperbarui
- 2/11/2026
Komentar
- β¦
Skill lain dari repositori ini
depot-ci
41kMembantu agent Anda menyiapkan dan menjalankan alur kerja Depot CI, alternatif GitHub Actions, termasuk memigrasikan alur kerja yang ada dan membaca log eksekusi.
depot-container-builds
41kMembantu agent Anda membangun image Docker di builder jarak jauh Depot, termasuk image multi-platform, pengiriman ke registry, dan perbaikan kegagalan build.
depot-github-runners
41kMembantu agent Anda memindahkan job GitHub Actions ke runner yang dikelola Depot, memilih ukuran dan label runner, serta memecahkan masalah pengaturan runner.
editing-agents-md
41kMembantu agent Anda memutuskan apakah sebuah aturan layak masuk ke berkas AGENTS.md atau CLAUDE.md, dan menulisnya agar tetap dipatuhi tanpa membuat berkas membengkak.
Skill serupa
gitcrawl
394kMemungkinkan agent Anda mencari arsip issue dan pull request GitHub yang tersimpan, mengelompokkan yang duplikat, dan memeriksa status terkininya di GitHub.
slacrawl
394kMemungkinkan agent Anda mencari dan menghitung pesan di arsip Slack lokal, memeriksa seberapa baru arsip itu, dan menyegarkannya bila diperlukan.
goplaces
394kMembantu agent Anda mencari tempat, mendapatkan detail dan ulasannya, serta menentukan nama tempat memakai Google Places, dengan keluaran JSON untuk skrip.