> ## Documentation Index
> Fetch the complete documentation index at: https://docs.traceback.cc/llms.txt
> Use this file to discover all available pages before exploring further.

# PII & Data Scrubbing

> Configure data sanitization rules, masked fields, and compliance safeguards.

Traceback ensures that Personally Identifiable Information (PII) is filtered out before telemetry is transmitted to our ingestion cluster.

## Default Scrubbed Keys

By default, Traceback scrubs all keys matching:

* `*password*`, `*secret*`, `*token*`, `*auth*`
* `*credit_card*`, `*ccv*`, `*cvv*`, `*ssn*`
* Standard `Authorization`, `Cookie`, and `Set-Cookie` HTTP headers

***

## Client-Side Custom Scrubbing

You can define custom hooks to sanitize or discard events before sending:

```typescript theme={null}
import * as Traceback from "@traceback/browser";

Traceback.init({
  dsn: "https://tb_live_key@ingest.traceback.dev/1",
  beforeSend(event) {
    // Strip sensitive query params from URLs
    if (event.request && event.request.url) {
      const url = new URL(event.request.url);
      url.searchParams.delete("apiKey");
      event.request.url = url.toString();
    }
    return event;
  },
});
```
