PostHog Learn
Build better products with data and agents
Guides, videos, agent prompts, and real apps to tinker with. Learn PostHog however works best for you.
New here? Start with one of these.
Prompts for your agent
Prompts that teach you PostHog using your own code and data. Copy one into your coding agent.
Product Analytics
Start with your product
Teach me PostHog Product Analytics using my own product and PostHog project.Inspect its existing PostHog instrumentation, then create a custom learning path based on its real events, properties, funnels, and gaps. Teach one concept at a time and give me small, safe exercises.Use the PostHog Product Analytics docs at https://posthog.com/docs/product-analytics.md as the source of truth.Don’t change the project unless I explicitly ask. If you can’t access the project, tell me what context you need.
Events and properties
Teach me PostHog events and properties using one interaction in my product. Explain autocapture, custom events, and useful properties. Help me design an event, predict its payload, and compare event counts with unique people.Use my code and PostHog data. Teach one concept at a time with a small exercise, and review my answer before continuing. Use https://posthog.com/docs/product-analytics.md as the source of truth.Don’t change my project without asking. If context is missing, ask for it.
Identity and sessions
Teach me PostHog identity and sessions using my product’s sign-in journey. Explain distinct_id, session IDs, identify, and reset. Help me trace anonymous and signed-in activity, including browser and server events, and spot an identity gap.Use my code and PostHog data. Teach one concept at a time with a small exercise, and review my answer before continuing. Use https://posthog.com/docs/product-analytics.md as the source of truth.Don’t change my project without asking. If context is missing, ask for it.
Trends and funnels
Teach me PostHog trends and funnels using a real feature and user journey in my product. Compare event counts with unique people, define a funnel and conversion window, and investigate a drop-off. Distinguish attempted actions from successful outcomes.Use my code and PostHog data. Teach one concept at a time with a small exercise, and review my answer before continuing. Use https://posthog.com/docs/product-analytics.md as the source of truth.Don’t change my project without asking. If context is missing, ask for it.
AI Observability
Start with your product
Teach me PostHog AI Observability using my own product and PostHog project.Inspect its existing PostHog instrumentation, then create a custom learning path based on its real LLM calls, traces, costs, and gaps. Teach one concept at a time and give me small, safe exercises.Use the PostHog AI Observability docs at https://posthog.com/docs/ai-observability.md as the source of truth.Don’t change the project unless I explicitly ask. If you can’t access the project, tell me what context you need.
Traces and generations
Teach me PostHog AI Observability using one LLM feature in my product. Explain traces, spans, and generations, and what PostHog captures on each call. Help me find where my code calls a model, predict what a generation records, and read a real trace.Use my code and PostHog data. Teach one concept at a time with a small exercise, and review my answer before continuing. Use https://posthog.com/docs/ai-observability.md as the source of truth.Don’t change my project without asking. If context is missing, ask for it.
Evals
Teach me PostHog evaluations using an LLM feature in my product. Explain why an error rate can’t tell me whether an answer is good, and compare LLM-as-a-judge and code-based evals. Help me write one eval for a real failure mode and read its pass rate.Use my code and PostHog data. Teach one concept at a time with a small exercise, and review my answer before continuing. Use https://posthog.com/docs/ai-observability.md as the source of truth.Don’t change my project without asking. If context is missing, ask for it.
AI cost
Teach me how PostHog attributes AI cost using my product’s LLM calls. Explain how cost comes from tokens and the model, and which properties tie a generation to a person, a customer, and a feature. Help me find a call that’s missing those properties and break my cost down by feature.Use my code and PostHog data. Teach one concept at a time with a small exercise, and review my answer before continuing. Use https://posthog.com/docs/ai-observability.md as the source of truth.Don’t change my project without asking. If context is missing, ask for it.
Session Replay
Start with your product
Teach me PostHog Session Replay using my own product and PostHog project.Inspect its existing PostHog instrumentation, then create a custom learning path based on its real recording settings, masking, replays, and gaps. Teach one concept at a time and give me small, safe exercises.Use the PostHog Session Replay docs at https://posthog.com/docs/session-replay.md as the source of truth.Don’t change the project unless I explicitly ask. If you can’t access the project, tell me what context you need.
Recording setup
Teach me PostHog Session Replay setup using my product. Explain what a replay records and how the player rebuilds it. Help me decide which sessions to record with sampling, minimum duration, and triggers, and estimate how many recordings my settings would keep.Use my code and PostHog data. Teach one concept at a time with a small exercise, and review my answer before continuing. Use https://posthog.com/docs/session-replay.md as the source of truth.Don’t change my project without asking. If context is missing, ask for it.
Finding and watching replays
Teach me how to find and watch the right replay in PostHog using a real problem in my product. Explain how to filter recordings by events, properties, and people, and how the player connects the event stream, console logs, and network requests. Help me find a session that explains the problem.Use my code and PostHog data. Teach one concept at a time with a small exercise, and review my answer before continuing. Use https://posthog.com/docs/session-replay.md as the source of truth.Don’t change my project without asking. If context is missing, ask for it.
Feature Flags
Start with your product
Teach me PostHog Feature Flags using my own product and PostHog project.Inspect its existing PostHog instrumentation, then create a custom learning path based on its real flags, rollouts, payloads, and gaps. Teach one concept at a time and give me small, safe exercises.Use the PostHog Feature Flags docs at https://posthog.com/docs/feature-flags.md as the source of truth.Don’t change the project unless I explicitly ask. If you can’t access the project, tell me what context you need.
Flags in code
Teach me PostHog feature flags using one feature in my product. Explain how a flag separates deploy from release, and how PostHog decides who gets it. Help me add a flag check, decide whether to evaluate it on the server or the client, and keep both sides agreeing on who the person is.Use my code and PostHog data. Teach one concept at a time with a small exercise, and review my answer before continuing. Use https://posthog.com/docs/feature-flags.md as the source of truth.Don’t change my project without asking. If context is missing, ask for it.
Rollouts and the off switch
Teach me gradual rollouts in PostHog using a real change in my product. Explain release conditions, percentage rollouts, and how to turn a feature off without a rollback. Help me plan a rollout from my team to everyone, and decide what to watch at each step.Use my code and PostHog data. Teach one concept at a time with a small exercise, and review my answer before continuing. Use https://posthog.com/docs/feature-flags.md as the source of truth.Don’t change my project without asking. If context is missing, ask for it.
Experiments and cleanup
Teach me how a PostHog feature flag becomes an experiment, and how to remove a flag afterward. Explain variants, exposure events, and primary metrics. Help me find a flag in my code that has reached 100% and plan its removal from my code and from PostHog.Use my code and PostHog data. Teach one concept at a time with a small exercise, and review my answer before continuing. Use https://posthog.com/docs/feature-flags.md as the source of truth.Don’t change my project without asking. If context is missing, ask for it.
Error Tracking
Start with your product
Teach me PostHog Error Tracking using my own product and PostHog project.Inspect its existing PostHog instrumentation, then create a custom learning path based on its real issues, grouping, queries, and alerts. Teach one concept at a time and give me small, safe exercises.Use the PostHog Error Tracking docs at https://posthog.com/docs/error-tracking.md as the source of truth.Don’t change the project unless I explicitly ask. If you can’t access the project, tell me what context you need.
Capture exceptions
Teach me PostHog Error Tracking using the exceptions in my app. Explain how exceptions become issues, and how grouping and source maps decide what I see. Help me check that my exceptions reach PostHog with readable stack traces, and fix any issues that are grouped wrong.Use my code and PostHog data. Teach one concept at a time with a small exercise, and review my answer before continuing. Use https://posthog.com/docs/error-tracking.md as the source of truth.Don’t change my project without asking. If context is missing, ask for it.
Query and measure impact
Teach me how to query PostHog exceptions alongside the rest of my data. Explain the keys that join an exception to people, sessions, and accounts. Help me find which issues hit my most valuable accounts, and which ones stop people from finishing what they started.Use my code and PostHog data. Teach one concept at a time with a small exercise, and review my answer before continuing. Use https://posthog.com/docs/error-tracking.md as the source of truth.Don’t change my project without asking. If context is missing, ask for it.
Triage, alerts, and scouts
Teach me how to automate PostHog Error Tracking. Explain assignment rules, alerts, and the scouts that report on errors. Help me route issues to the team that owns each part of my code, alert on regressions and spikes, and turn on the error scouts.Use my code and PostHog data. Teach one concept at a time with a small exercise, and review my answer before continuing. Use https://posthog.com/docs/error-tracking.md as the source of truth.Don’t change my project without asking. If context is missing, ask for it.
Revenue at risk
Rank my error tracking issues from the last 7 days by the total MRR of the accounts that hit them, with the exceptions, accounts, and affected users for each. Then tell me which issue to fix first and why. If my accounts don't have an MRR property, rank the issues by affected accounts instead and tell me how to add MRR with warehouse properties.
Session drop-off
Build me a funnel over the last 7 days, counted by unique sessions, with a 1-minute conversion window. Step 1 is $exception where $lib is web. Step 2 is any event that shows the person kept going: a $pageview, an $autocapture event, or one of my app's named events, like stay_viewed. If autocapture is off, the named events are the main signal. Break it down by $exception_issue_id. Then tell me which issues have the highest drop-off among issues with at least 100 sessions.
Session replays
Find session recordings from the last 7 days that include a $exception event from the error tracking issue named [issue name]. List the 5 most recent with links, and tell me what the person did just before the error.
A customer's errors
List the error tracking issues that hit users in the account [account name] in the last 30 days. For each issue, show how many of their users it hit and how many exceptions it fired, sorted by users.
Support tickets
Use my synced support tickets table to find tickets from the last 30 days that contain a PostHog replay link. Take the session ID from each link and check whether that session had a $exception event. List the tickets that did, with the exception type and message.
People who hit the error
List the people who hit the error tracking issue named [issue name] in the last 30 days, with each person's email and how many exceptions they had.
Experiments
Build a trend over the last 14 days, counted by unique sessions. Series A is $exception and series B is $pageview. Set the formula to A / B * 100 and break it down by $feature/my-flag-key. Tell me whether any variant has a higher error rate than control.
Crash-free sessions
Build a trend over the last 30 days, counted by unique sessions. Series A is all events. Keep web and mobile apart. For web, series B is $exception where $exception_handled is false. For mobile, series B is $exception where $exception_level is fatal. Set the formula to (A - B) / A * 100 to show the share of sessions without an unhandled exception or crash, and tell me which days were lowest.





