CellWall Logo

Exception Autocapture

PostHog

Analytics
monitor Exposure
vc261b9c8
A script that automatically captures JavaScript exceptions and unhandled promise rejections on a webpage, sending error data to the PostHog analytics platform.
10M+ sites
Updated 8/24/2026
https://us-assets.i.posthog.com/static/1.418.6/exception-autocapture.js
Exposure Score
92

Popularity

92%

Usage across websites

File Size

13.33 KB

Download size

Load Time

33.72ms

Network latency

Execution Time

1.59ms

Runtime performance

Version Telemetry

Version Timeline

Visual representation of each version's active period

Metrics Over Time

Security score, performance score, and file size trends

0255075100vc261Normalized ScoreVersion
Security Score
Performance Score
File Size (KB)

Uptime History

Average response time over time

Version History Details

Detailed information for each version

vc261b9c8Latest
Span: 4 days
Score: 85
Size: 13.33 KB

Exposure & Risks

Security Score

Overall Security85 / 100
Exposure Levelmonitor

Risk Assessment

Critical Risks0
Total Observations0

Exposure Status

Monitor
Moderate behavioral concerns, review and mitigation advised.

Behavioral Concerns

No Known Security Risks

Our telemetry scan did not detect any immediate behavioral security risks for this resource.

Security Observations

Security-related findings from analysis

No security observations recorded for this version

Privacy & Data Flow

Data Collection

Cookies and local storage used by this script

Cookies

ph_*1 year
Used to identify the user and persist session data, often including a project-specific ID.
ph_session_id30 minutes
Used to track the current user session.

Local Storage

ph_*: Stores an anonymous ID and other client-side state for PostHog.
Stores an anonymous ID and other client-side state for PostHog. The key includes a project-specific ID.

Third-party Connections

External domains this script connects to

No external connections detected

Permissions Required

Browser permissions and capabilities used

No special browser permissions required.

Privacy Observations

Privacy-related findings from analysis

No privacy observations recorded for this version

Technical & Performance Analytics

Load Performance

File Size13.33 KB
Load Time33.72ms

Runtime Performance

Execution Time1.59ms
Network Requests0

Impact Assessment

Good
Minimal performance impact on page load

Performance Observations

Performance-related findings from analysis

No performance observations recorded for this version

Global Variables

Variables added to the global scope

posthogErrorWrappingFunctionsextendPostHogWithExceptionAutoCaptureextendPostHogWithExceptionAutocapture

Event Listeners

Events this script listens for

No event listeners detected

Browser API Access

APIs and browser features accessed by this script

No API access detected

Technical Details

Compressed
Yes
CDN Delivery
No
Total Views
28
Is Mirror
No
Network Requests
0
Resource Hash
c261b9c816ab5109aee4dc4979948beb40073d7c077f1b32c6f7599e50ac417f

AI Insights & Alternatives

Description

A comprehensive overview of this resource

This script, `exception-autocapture.js`, is a specific module within the PostHog JavaScript SDK designed for robust error monitoring. Its core function is to passively listen for and capture any unhandled JavaScript errors that occur within the browser environment, including errors triggered by `window.onerror` and unhandled promise rejections via `window.onunhandledrejection`. Upon detecting an error, the script automatically collects critical information such as the error message, the full stack trace, and relevant contextual data (e.g., current URL, user agent, potentially user identity if set). This collected error data is then sent asynchronously to the PostHog backend, where it can be aggregated, analyzed, and visualized by website owners. This allows for proactive identification and debugging of issues impacting user experience without requiring developers to manually instrument error logging throughout their codebase. The script operates entirely client-side, running in the user's browser to intercept errors as they happen. It integrates seamlessly with other PostHog analytics features, enabling a holistic view of user behavior correlated with application health and stability.

Key Features

Core functionalities and capabilities of this resource

  • Automatic Error Capture
  • JavaScript Exception Monitoring
  • Stack Trace Collection
  • Contextual Error Reporting
  • Application Stability Monitoring
  • Unhandled Promise Rejection Capture

Alternatives

Similar libraries you might consider

Documentation & Resources

Official Documentation