Product Analytics
by Pump Up
Automated PostHog product usage digests, proactive friction alerts, and root-cause analytics investigations for product and growth teams.
- analytics
- growth
- onboarding
- research
Instructions
Product Analytics
Automated product usage reporting, proactive user-friction monitoring, and root-cause analytics investigations built on PostHog. Designed for product, growth, and engineering teams who want daily visibility into signed-up user activity, onboarding health, and blocking errors without manual dashboard checks.
Connections and secrets
| Name | Type | Used for |
|---|---|---|
posthog | Connection | Querying PostHog trends, funnels, schemas, dashboards, error tracking, and links (posthog_exec) across all agents |
No secrets are required.
App setup and shared rules
Every agent in this app reads product usage data from PostHog and surfaces insights through Pump Up member notifications (notifyMembers).
App metadata keys
Configure these values on the app before running:
| Key | Description | Example / default |
|---|---|---|
POSTHOG_PROJECT_ID | Your team's PostHog project ID | <your-posthog-project-id> |
POSTHOG_PROJECT_NAME | Display name of your PostHog project | Production |
POSTHOG_TIMEZONE | Timezone for daily reporting windows | UTC |
GROUP_TYPE_NAME | B2B account group type name in PostHog | company |
GROWTH_DASHBOARD_ID | PostHog dashboard ID for core growth metrics (optional) | <your-dashboard-id> |
Shared PostHog query rules
- Target project: Query
POSTHOG_PROJECT_ID(POSTHOG_PROJECT_NAME) inPOSTHOG_TIMEZONEunless a run input explicitly requests another project. - Test account filter: Apply your PostHog project's test account filter on every query so internal team accounts are excluded.
- Signed-up account separation: Count DAU, WAU, MAU, and active users only across signed-up accounts (where
person.properties.emailis set). Keep anonymous marketing website visitors ($pageviewon your organization's marketing domain) as a separate metric. - Tenant name resolution: Aggregate B2B account activity using the
GROUP_TYPE_NAMEgroup type (index = 0) and always resolvegroups.properties.nameso reports show tenant names rather than raw IDs. - Schema verification: Verify unfamiliar event or property names with PostHog schema inspection before querying them.
Shared reporting rules
- Accuracy: Report only figures, trends, and event names directly observed in PostHog query results; never guess or extrapolate missing data.
- Tables: Present metric comparisons, funnel steps, feature breakdowns, and affected accounts or users in Markdown tables with single-line cells.
- Links: Include clickable PostHog links to insights, persons, or errors in every report.
- Notifications: Deliver digests and alerts via
notifyMembers. Do not open human approval or input requests (read-only analytics team).
Agents
1. Daily Usage Analyst
Produces a daily product analytics digest for the completed previous day in POSTHOG_TIMEZONE, comparing metrics against the prior 7-day daily average and the same day 7 days earlier.
- How it starts: Scheduled daily at
08:00 UTC(0 8 * * *), or started manually with optionaltarget_date(YYYY-MM-DD, defaults to yesterday inPOSTHOG_TIMEZONE). - Agent metadata:
ONBOARDING_STALL_HOURS(default24). - Agent rules: Trigger a background run of Analytics Investigator only when signed-up DAU or core activity stalls, or when users hit repeated errors or stall mid-onboarding—never for normal usage growth or marketing traffic spikes.
- Approvals: None.
Steps
| Step | Owner | Group | Exits to | Purpose |
|---|---|---|---|---|
| Collect core metrics | Agent | Ready | Analyze product usage, Digest failed | Query signed-up DAU, WAU, MAU, and active GROUP_TYPE_NAME counts for yesterday and the prior 7 days; query anonymous marketing website visitors separately; read GROWTH_DASHBOARD_ID if configured; retry once on transient errors |
| Analyze product usage | Agent | In Progress | Send daily digest, Digest failed | Measure the 14-day onboarding activation funnel (sign-up through workspace/project setup to first core action), rank top product and AI/tool events (such as $ai_trace, $mcp_tool_call, and key feature events), check for chat/connection/limit errors, $rageclick, and sign-ups older than ONBOARDING_STALL_HOURS that stalled mid-onboarding; start a non-blocking Analytics Investigator run if friction or stalling appears |
| Send daily digest | Agent | In Progress | Digest sent, Digest failed | Send a notifyMembers digest with four Markdown tables (Core Metrics with Website Visitors separate, Product Usage, Onboarding Funnel, User Health & Stuck Accounts with PostHog links); retry once on delivery failure |
| Digest sent | Agent | Complete | — | Terminal state confirming digest delivery |
| Digest failed | Agent | Failed | — | Terminal failure state recording PostHog or delivery errors |
2. Friction & Anomaly Scout
Runs periodic health checks in PostHog to catch stuck users, stalled onboarding accounts, and blocking product errors without spamming the team on healthy days.
- How it starts: Scheduled every 6 hours (
0 */6 * * *inUTC), started manually with optionallookback_hours(defaults toLOOKBACK_HOURS), or triggered by a PostHog webhook (webhook_event). - Agent metadata:
LOOKBACK_HOURS(default7),ONBOARDING_STALL_HOURS(default48),MIN_ERROR_EVENTS_FOR_ALERT(default2). - Agent rules: Stay silent when healthy; only alert when users or tenants are stuck, stalled in onboarding, or hitting blocking errors. Do not repeat alerts for the exact same user or incident if no new occurrences happened since the previous 6-hour slot.
- Approvals: None.
Steps
| Step | Owner | Group | Exits to | Purpose |
|---|---|---|---|---|
| Scan friction and errors | Agent | Ready | Evaluate health check, Scan failed | Inspect the last LOOKBACK_HOURS (or input lookback_hours) for blocking product errors, quota/limit refusals, failed integrations/connections, $rageclick, $exception, billing/credit alerts, and new sign-ups in the last ONBOARDING_STALL_HOURS that stalled before their first core run/action; retry once on query error |
| Evaluate health check | Agent | In Progress | Investigate top issue, No issues found, Scan failed | Gate: route to Investigate top issue if any blocking error, failed connection, credit-out event, or stalled onboarding occurred, or if $rageclick/$exception reached MIN_ERROR_EVENTS_FOR_ALERT; route to No issues found if healthy (never alert on traffic increases) |
| Investigate top issue | Agent | In Progress | Send anomaly alert, Scan failed | Call Analytics Investigator and wait for root-cause context on the highest-severity issue; if it fails or times out, proceed to Send anomaly alert with raw scan findings |
| Send anomaly alert | Agent | In Progress | Alert sent, Scan failed | Send a concise notifyMembers alert with Markdown tables (tenant name, user email, event, cause or drop-off step, count), root-cause summary, and direct PostHog links; retry once on failure |
| No issues found | Agent | Complete | — | Terminal quiet-completion state when no issues are detected |
| Alert sent | Agent | Complete | — | Terminal state confirming alert delivery |
| Scan failed | Agent | Failed | — | Terminal failure state recording query or delivery errors |
3. Analytics Investigator
Performs on-demand or agent-triggered root-cause investigations to explain why a metric shifted or where users are getting stuck.
- How it starts: Started manually by a team member, or invoked by Daily Usage Analyst or Friction & Anomaly Scout.
- Case inputs:
question(string, required),metric_or_event(string, optional),time_window(string, optional, defaults toDEFAULT_LOOKBACK_DAYS),company_id(string, optionalGROUP_TYPE_NAMEID for drill-down). - Agent metadata:
DEFAULT_LOOKBACK_DAYS(default14). - Agent rules: Send findings via
notifyMembersonly when run standalone (no parent agent run); when called by another agent, return findings in the run output to avoid duplicate notifications. - Approvals: None.
Steps
| Step | Owner | Group | Exits to | Purpose |
|---|---|---|---|---|
| Scope investigation | Agent | Ready | Analyze segments and funnels, Investigation failed | Resolve the lookback window (time_window or DEFAULT_LOOKBACK_DAYS), verify target events/properties via schema inspection, and check baseline trends; fail if required input is missing or PostHog is unreachable after one retry |
| Analyze segments and funnels | Agent | In Progress | Publish findings, Investigation failed | Break down trends/SQL by GROUP_TYPE_NAME name, URL/path, error type, or tool/server; run funnel analysis for drop-offs; inspect recent events or error tracking; determine whether impact is broad or single-tenant; retry once on query error |
| Publish findings | Agent | In Progress | Investigation complete, Investigation failed | Compile verified root causes, exact counts, affected tenant names, stuck users, recommended checks, Markdown tables, and PostHog links; send via notifyMembers only if standalone; retry once on notification failure |
| Investigation complete | Agent | Complete | — | Terminal state confirming investigation findings are published |
| Investigation failed | Agent | Failed | — | Terminal failure state if context is missing or PostHog queries fail |
Forms
None. Agents are triggered by schedules, webhooks, inter-agent calls, or direct runs.
Adapting events to your product
The daily digest and friction scout reference example lifecycle and error events (such as user sign-up, workspace/app creation, core execution, chat/connection failures, and billing credit alerts) alongside standard PostHog events ($pageview, $rageclick, $exception, $ai_trace, $mcp_tool_call). After creating your app from this template, update your agent instructions or PostHog schema mapping to match your product's exact event names.
Details
- Version
- 1
- Updated
- Nov 17, 2026