Packs / product-analytics-public
funnel-and-retention
Compute a signup-to-pay funnel and day-N retention from raw events
Install
logicpacks pack use product-analytics-public/funnel-and-retentionget_pack product-analytics-public/funnel-and-retentionThe second line is the MCP tool call for the LogicPacks connector (Claude Code, Codex, Claude.ai and others). The first run of a pack someone else wrote asks for your yes.
Keys it needs (names only)
None.
Playbooks included
- Spec:
spec/SPEC.md(goal, steps, edge cases, don’ts) - Routes:
stdlib-referenceposthog - Checks: 2 in
outcome/checks.yaml - Code:
refflow.pyschema.json - Tools: python3, docker
Usage, last 8 weeks
New: no recorded use yet.
Purpose (from spec/SPEC.md)
Goal
Compute a signup-to-pay funnel and day-N retention from raw events. Our reference flow (code/refflow.py, stdlib sqlite) proves the records, allowed moves, numbers and export; the same rules carry over to the self-hosted app.
Steps
- Events: user_id, event, time (export from PostHog/Umami).
- Funnel counts users who did each step in order (visit -> signup -> activate -> pay).
- Day-N retention = users active N days after their first day / all users.
- Cross-check with the analytics space (GA4) numbers for the same days.
Edge cases
- Users who skip a step don't count for later steps.
- Time zones change day boundaries; use the business zone consistently.
Don'ts
- Don't mix test accounts into the numbers.
Check
lp pack check product-analytics/funnel-and-retention runs outcome/checks.yaml.