error.page docs

Quickstart

Install the SDK and show your first branded error page in five minutes.

error.page is the user-experience platform: it records how people use your site, shows you where they drop off, catches every error, and — instead of a broken screen — renders a calm, on-brand page while you get notified. One SDK does all of it. This guide gets you live in about five minutes.

1. Create a project

A project represents one website or app. From your dashboard, click Create Project, give it a name (e.g. my-store), and you're done. Each project gets its own API key, slug, and branded page.

2. Add the SDK

Paste this snippet just before the closing </body> tag on your site. It's about 13 KB gzipped and loads in a few milliseconds.

<script src="https://error.page/js/errorpage.js"></script>
<script>
ErrorPage.init({
    projectId: 'YOUR_API_KEY',
    slug: 'your-project-slug'
});
// Tie sessions to the signed-in user so you get per-user journeys:
ErrorPage.identify({ id: user.id, email: user.email, name: user.name });
</script>

That one snippet does two jobs at once: from the moment it loads it records user journeys (pageviews and clicks, automatically) and catches errors (crashes, network and server failures). Your exact snippet, pre-filled with your key, is on the Overview until your first event arrives, and on every project card under Settings → Projects afterwards. The same card has a Send a test event button that files a sample incident (badged as a test) so you can see the feed before your site has had a real error. The Overview moves on by itself as soon as the SDK checks in from your site — no error needed.

Zero-install alternative

Prefer not to hand-write the config? Drop a single meta tag in your <head> and load our loader — it discovers the rest:

<meta name="error-page-key" content="YOUR_API_KEY">
<script src="https://error.page/sdk.js" async></script>

3. Test it

Trigger an error on your site (or throw one from the console):

throw new Error('Hello from error.page');

Within a second or two the error appears in your Incident feed, and your branded page is ready to show on the next real failure.

What happens next