scanning-experiments-with-replay-vision

Creates Replay Vision scanners scoped to an experiment's exposed sessions for per-variant behavioral analysis.

713|118|Updated Aug 11, 2020
One-click install
npx skills add https://github.com/PostHog/posthog-foss --skill scanning-experiments-with-replay-vision
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: scanning-experiments-with-replay-vision
Source: https://github.com/PostHog/posthog-foss/tree/main/products/experiments/skills/scanning-experiments-with-replay-vision
Command: npx skills add https://github.com/PostHog/posthog-foss --skill scanning-experiments-with-replay-vision

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Running an A/B experiment tells you which variant won, but not what users actually did in each variant. This Skill provisions a Replay Vision scanner scoped to one experiment's exposed sessions, so an LLM watches session recordings and tags behavior per variant without hand-built exposure filters.

Core Features & Use Cases

  • Server-side exposure scoping: Sets experiment_targeting so the PostHog API derives the person-scoped exposure filter, covering exposures fired server-side or in earlier sessions.
  • Comparable prompt templates: Provides classifier templates ("Did anyone notice?", post-exposure friction, funnel drop-off) with escape tags and variant-blind prompts so tag shares stay comparable across variants.
  • Experiment-aware sizing and safe rollout: Sizes credit spend against the experiment's own population and remaining run time, creates the scanner disabled, and previews the prompt on real sessions before enabling.
  • Per-variant readout: Joins $recording_observed events to exposure events in HogQL to tally tags per variant, with guards against multi-variant sessions and broken feature-flag gates.
  • Use Case: Your test variant is losing and the metrics can't say why. Use this Skill to stand up a friction classifier over exposed sessions, preview it on a few recordings, then read a per-variant tally of confusion and dead-end tags.

Quick Start

Set up a Replay Vision scanner for my running checkout experiment so I can see what users actually do in each variant.

Frequently Asked Questions about scanning-experiments-with-replay-vision

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I analyze an experiment's session recordings with AI?

Create a Replay Vision scanner with experiment_targeting set to the experiment ID and variant null. The PostHog API derives the exposure filter server-side, and the scanner tags exposed sessions so you can tally behavior per variant.

How do I compare user behavior between experiment variants?

Use a classifier scanner with a fixed tag set, then join $recording_observed events to the exposure event in HogQL by session_id. Group by variant and tag to get a per-variant tally of behaviors like confusion or never-reached.

Should I create one scanner per variant or one for the whole experiment?

Create one scanner for the whole experiment with variant set to null. Spend is identical since credits are per observation, and a single scanner keeps one prompt version and one readout across variants.

Can a Replay Vision scanner backfill historical experiment sessions?

No, a new scanner only sees sessions from creation time onward, and bulk backfill is not available over MCP. Use the UI backfill endpoint or scan a handful of past sessions individually with vision-scanners-scan-session.

Why does my experiment scanner produce no observations?

Sessions under 15 seconds, with no recording, or filtered by sampling mode are marked ineligible, which is a normal terminal outcome. Also check that session replay is enabled and not sampled down for the experiment's traffic.

What are the limitations of scanning experiment recordings with Replay Vision?

Scanners view the whole recording with no post-exposure window enforcement, allow one observation per session forever, and editing config mid-run forks the comparison via scanner_version. Provider and model are Google/Gemini only.