Error Tracking
StorePilot captures JavaScript and PHP errors from your WordPress site and centralises them in the Platform dashboard.
How Errors Are Captured
JavaScript Errors
The plugin injects a tracking script into every page. The script listens for:
window.onerror— uncaught exceptionswindow.onunhandledrejection— unhandled Promise rejections
When an error fires, the script sends a payload to the Platform (via the WordPress proxy) containing:
{
"message": "Cannot read property 'x' of undefined",
"source": "https://mysite.com/wp-content/themes/my-theme/js/app.js",
"lineno": 42,
"colno": 18,
"stack": "TypeError: Cannot read ...\n at ...",
"context": {
"url": "https://mysite.com/shop/",
"userAgent": "Mozilla/5.0 ...",
"referrer": ""
}
}
PHP Errors
The plugin registers a custom error handler and exception handler early in WordPress boot (via the MU-plugin loader). Fatal errors, warnings, and uncaught exceptions are captured server-side and forwarded to the Platform.
Error Fingerprinting
To group repeated occurrences of the same error into a single record rather than creating thousands of duplicates, the Platform creates a fingerprint for each error.
The fingerprint is based on:
- Error
message(normalised — dynamic values such as IDs removed) sourcefile URLlinenocolno
If an incoming error matches an existing fingerprint, the occurrenceCount is incremented and the lastSeenAt timestamp is updated.
Error Statuses
| Status | Meaning |
|---|---|
new | Newly captured; not yet reviewed |
investigating | A team member is looking into it |
resolved | Fix deployed; the error should not recur |
ignored | Known, not worth fixing (e.g. browser extension noise) |
muted | Silenced — no further notifications for this error |
Automatic Re-open
If an error with status resolved or ignored is received again (same fingerprint), it is automatically:
- Reset to status
new occurrenceCountreset to1- A new notification fires
This ensures that a regression doesn't go unnoticed because the error was previously marked resolved.
Error Detail
Each error record contains:
| Field | Description |
|---|---|
message | Error message text |
source | JavaScript file URL or "PHP" |
lineno / colno | Source location |
stack | Full stack trace |
status | Current status |
occurrenceCount | How many times this error has been seen |
firstSeenAt | Timestamp of first occurrence |
lastSeenAt | Timestamp of most recent occurrence |
context | URL, user agent, referrer at time of capture |
recording | Linked session recording (if the error occurred during a recorded session) |
Linked Recordings
When an error is captured during a session that is being recorded, the recording session ID is stored alongside the error. In the dashboard you can click "View Recording" to replay exactly what the user was doing when the error occurred.
Noise Reduction
Trusted Origins only — The WordPress proxy validates the Origin and Referer header, ensuring only your own domain can submit error events.
Muted errors — Errors you don't care about (e.g. from browser extensions) can be set to muted status and will never trigger notifications again.
Ignored status — Errors set to ignored still accumulate occurrences but do not send notifications.