With autocapture: true (the default), OakData records interactions without per-element instrumentation. It listens for clicks, form submits, input changes, and copies at the document level, resolves the meaningful target (walking up to the nearest link, button, or element with a role), and attaches a structured descriptor of that element to the event.
What gets captured
| Event | Type | Description |
|---|---|---|
$click | auto | Every click. Includes the element, its ancestor chain, coordinates, and modifier keys. |
$rage_click | auto | Emitted alongside $click when three or more clicks land in the same spot within a second. |
$dead_click | auto | A click that caused no DOM mutation and no navigation within 300ms - a sign of a broken control. |
$outbound_click | auto | A click on an anchor pointing to a different host. |
$form_submit | auto | A form submission, with a summary of each field. Password fields are always excluded. |
$input_change | auto | A change on an input, select, or textarea. The value is masked unless input capture is enabled. |
$copy | auto | Text copied to the clipboard, with the selection length and a short preview. |
$fingerprint | auto | Emitted once per device, when the tiered hardware fingerprint first resolves (or drifts after a driver update). The value is also cached, so later visits carry it from their very first event. |
Environment signals, no permissions
Alongside device context, events carry a small set of permissionless environment signals: OS appearance and reduced-motion preferences, the full language list, storage quota (rounded to GB), and media device counts. None of them trigger a browser prompt; they feed the profile matching confidence score to help distinguish different people on identical hardware.
Input values are not captured
Autocapture records element structure (tag, id, classes, text, selector), not what users type. Input and form values are masked unless you explicitly enable input capture, and <input type="password"> is never recorded.
Opting elements out: data-oak-ignore
Add data-oak-ignore to any element to exclude it - and everything inside it - from autocapture. Clicks, changes, submits, and copies within the subtree are dropped.
<!-- Nothing in this region is autocaptured -->
<section data-oak-ignore>
<button>Internal debug action</button>
</section>Declarative events: data-oak-event
To turn a click into a named custom event without writing JavaScript, put data-oak-event on (or above) the clickable element. Add data-oak-prop-* attributes to attach properties - the suffix becomes the property name.
<button
data-oak-event="pricing_cta_clicked"
data-oak-prop-plan="pro"
data-oak-prop-position="hero"
>
Get started free
</button>This fires pricing_cta_clicked with { plan: "pro", position: "hero" }, in addition to the normal $click. Property values are always strings - they come from HTML attributes.
Session replay privacy classes
When session replay is enabled, three CSS class names control what the recorder captures. Add them as ordinary classes on the elements you want to protect.
| Class | Type | Description |
|---|---|---|
oak-mask | class | Masks the element's text in the recording (replaced with blocks), while keeping its shape and position. |
oak-ignore-input | class | Drops the typed value of an input from the recording. The field is visible; what was entered is not. |
oak-no-capture | class | Blocks the element and its entire subtree from the recording - rendered as an empty placeholder. |
<!-- Text shown as blocks in replay -->
<p class="oak-mask">Order total: $4,210.00</p>
<!-- Value never recorded -->
<input class="oak-ignore-input" name="ssn" />
<!-- Whole widget blocked from the recording -->
<div class="oak-no-capture">
<CreditCardForm />
</div>Inputs are masked by default in replay
Replay masks all input values by default, and passwords stay masked even if input masking is turned off. The classes above are for finer-grained control. See replay privacy & masking.