How to set up error tracking in PostHog
Turn on exception autocapture in PostHog settings so frontend errors from your web app are captured and tracked, in four steps on the free plan.
Quick answer
Open Settings, choose Error tracking in the settings sidebar, and switch on Enable exception autocapture. PostHog then captures frontend exceptions from your web app using the JavaScript SDK listeners. A confirmation message appears when the setting saves, and the Error tracking configuration link takes you to the next page.
Steps at a glance
- Click Settings in the bottom-left sidebar
- Choose Error tracking under Products
- Switch on Enable exception autocapture
- Wait for the success message
- Click Error tracking configuration to continue
Interactive demo
Summary
Error tracking in PostHog groups the exceptions your app throws so you can find and fix them. Exception autocapture is the setting that starts collecting frontend errors without extra code. Turning it on is the first step before any errors can show up.
Step-by-step guide
Step 1
Open Settings
Click Settings in the bottom-left of the PostHog sidebar. The project settings open on the General page.
Step 2
Open Error tracking settings
In the settings sidebar, find the Products group and click Error tracking. The page is titled Settings - Error tracking.
Step 3
Turn on exception autocapture
Under Exception autocapture, switch on Enable exception autocapture. PostHog describes this as automatically capturing frontend exceptions using onError and onUnhandledRejection listeners in the web JavaScript SDK.
Step 4
Open Error tracking configuration
A message confirms Autocapture exceptions opt in updated successfully!. Click the Error tracking configuration link at the top of the page to continue setting up error tracking.
Why this matters
You shipped a release and users are hitting errors you never see. Turning on exception autocapture means uncaught frontend exceptions start arriving in PostHog, so you can spot problems from real sessions instead of waiting for a bug report.
Frequently asked questions
Which platforms does exception autocapture support?
The settings page lists Web, Android, iOS, Flutter and React Native as supported platforms.
Does the setting save automatically?
Yes. After you switch on Enable exception autocapture, PostHog shows a message that the opt in was updated successfully.
Related guides
Continue with more step-by-step guides for getting work done.
How to add an annotation in PostHogLearn how to add an annotation in PostHog: open Annotations, write a note such as a launch, and save it so the date is marked on your charts.
How to add an insight to a dashboard in PostHogAdd a saved PostHog insight to a dashboard in a few clicks: open it from All insights, choose Add to dashboard, and pin it to your overview.
How to break down an insight by property in PostHogBreak down a PostHog trends insight by a property such as plan. Open the insight in edit mode, add a breakdown and pick the property to group by.
How to share a dashboard in PostHogLearn how to share a PostHog dashboard with anyone: open it, click Share, turn on public sharing, and copy the public link without inviting people.
How to target a feature flag to a cohort in PostHogLearn how to target a PostHog feature flag to a cohort: open the flag, edit its release condition, add a cohort filter, and save the change.
How to turn off autocapture in PostHogTurn off autocapture in PostHog from the project Settings page, using the Enable autocapture for web switch on the Autocapture screen.
Create interactive demos like this one — free, no coding required.
Start for free →