Product signals
The built-in events that show where users get stuck, hit a limit, reach first value or leave - fired centrally from the shared form, toaster, empty state and billing screens, with ids only and never what anyone typed.
The shared form, toaster, empty state and screens report these on their own, so web and desktop send the same names. Client events reach every enabled provider; server events go to PostHog only.
Ids, never content: no property carries a field value, message, toast text or email. Every event honors cookie consent and the account opt-out.
Stuck
| Event | Fired when | Properties |
|---|---|---|
form_error | A submit leaves a field failing validation, once per field per attempt | form, field, code (the i18n key, else the rule: required, pattern, too_small) |
error_shown | Any error toast appears | code (the toast's id, else unlabelled), source (toast) |
empty_state_viewed | An EmptyState with a surface prop mounts | surface (projects, automations, notifications, integrations, model_providers, organization, chat_no_provider) |
- Name a form with
<Form {...form} analyticsId="checkout">; without it the failing field names stand in. - Label a toast with
toast.error(message, { id: "checkout_failed" })for a readablecode.
Walls
| Event | Fired when | Properties |
|---|---|---|
limit_reached | A run, create or invite is refused by a ceiling | limit, surface |
paywall_viewed | The refusal offers an upgrade or a top-up | surface, limit |
upgrade_prompt_clicked | The offer is followed, or credits bought on Billing | surface, target (plans / credits) |
limit | Where |
|---|---|
credits | Chat run refused for an empty or held balance |
concurrent_runs | Chat run refused at the plan's concurrent-run cap |
plan_feature | A plan-locked integration picked (surface: integrations) |
projects | Project create over the per-owner ceiling (create_project) |
members | Invitation over the seat limit - server event |
api_keys / rate_limit | API key ceiling or daily create limit (create_api_key) |
Activation
| Event | Fired when | Properties |
|---|---|---|
feature_used | A project, automation or upload is created | feature (project_created, automation_created, file_uploaded), target for automations |
first_value | Server, once per account, on the first activationEvent | feature |
ai_message_sent, api_key_created and member_invited count as feature use without a second event. Valid activationEvent ids are PRODUCT_FEATURES in @repo/config.
analytics: {
activationEvent: "project_created", // default: "ai_message_sent"
posthog: { publicKey: "phc_...", host: "https://us.i.posthog.com" }
}first_value is once per account via the user_activations table: only the insert that creates the row sends it. The table is new - generate and apply a migration (Schema changes).
Churn
| Event | Fired when | Properties |
|---|---|---|
billing_portal_opened | The billing portal button is pressed | surface |
cancel_flow_started | The downgrade confirmation opens | surface (plan_change), kind (downgrade) |
cancel_reason_submitted | The downgrade is confirmed with a reason picked | reason, surface |
account_deleted | The deletion link's confirmation succeeds | reason when one was picked |
payment_failed | Server: Stripe invoice.payment_failed, Polar past_due | provider; Stripe adds billingReason, attempt, finalAttempt |
- Both reason pickers are optional, with no free text. Reasons are
CANCEL_REASONSandACCOUNT_DELETION_REASONSin@repo/config. - Cancelling happens in the provider portal, so the picker sits on the in-app downgrade.
- Stripe: add
invoice.payment_failedto your webhook's events.
Built-in events
The complete catalog of analytics events the boilerplate fires on its own - client events from useAnalytics() and server events from payment webhooks, credit settlement, and auth hooks - with the properties each carries.
Session replay and surveys
Turn on PostHog session replay with every input and every line of text masked, keep it off the pages that hold credentials or billing, and ask stalled users what stopped them with PostHog Surveys.