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

  1. Click Settings in the bottom-left sidebar
  2. Choose Error tracking under Products
  3. Switch on Enable exception autocapture
  4. Wait for the success message
  5. Click Error tracking configuration to continue

Interactive demo

Loading 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

  1. Step 1

    Open Settings

    Click Settings in the bottom-left of the PostHog sidebar. The project settings open on the General page.

  2. 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.

  3. 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.

  4. 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.

Create interactive demos like this one — free, no coding required.

Start for free →