Automatic tracking
Built-in event names, autocapture properties, frustration signals, and toggles — from the shipped SDK.
Enable / disable
HumanBehaviorTracker.init(apiKey, {
enableAutomaticTracking: true, // default
automaticTrackingOptions: {
trackForms: true,
includeText: true,
includeClasses: false,
},
});Set enableAutomaticTracking: false to skip autocapture, form submit tracking, rage-click, and dead-click installation. Navigation $pageview emission and replay recording are separate lifecycle features.
Built-in event names
| Event | When it fires | Notes |
|---|---|---|
$pageview | Full page load and SPA navigations (pushState / replaceState / popstate / hash with dedupe) | Source of truth for page analytics |
$click | Click on (or inside) an interactive element | Autocapture — one event per click |
$form_submitted | Native submit on a <form> | Field names only (not values) |
$rageclick | ≥3 clicks within 30px / 1s burst | Debounced once per burst |
$deadclick | Click with no meaningful DOM/scroll/selection response within timeouts | Feeds behavior Issues |
$web_vitals | Each Core Web Vital metric (when vitals enabled) | See Web vitals |
$focus | Focus / blur markers in the replay stream | Blur delayed 2s to ignore quick alt-tab |
Autocapture ($click)
Interactive selector used by the SDK:
button, a, input, select, textarea, label,
[role="button"], [role="link"], [role="tab"], [role="menuitem"]The handler walks to the nearest matching ancestor so a click on a child <span> attributes to the parent button/link.
Properties commonly attached
| Property | Meaning |
|---|---|
tag | Lowercase tag name |
id / elementId | Element id (both names for compatibility) |
role | ARIA role if present |
type | Input/button type when applicable |
href | Anchor href when applicable |
text / elementText | Truncated visible text (includeText, default on; text up to 200 / 100 chars) |
class / elementClass | Class string when includeClasses: true |
path | Short DOM path (≤8 ancestors) |
page | location.pathname |
x / y | Click client coordinates |
timestamp | Epoch ms |
trackLinks in options is forced off as a separate channel; <a> clicks still produce $click through autocapture.
Form tracking ($form_submitted)
| Property | Meaning |
|---|---|
formId | form.id if set |
formAction | form.action |
formMethod | Method (default get) |
fields | Array of FormData keys (values are not sent) |
formClass | Present only when includeClasses: true |
page | Pathname |
timestamp | Epoch ms |
Frustration signals
| Signal | Detection summary |
|---|---|
| Rage click | 3+ clicks in a 30px radius within 1000ms; further detections suppressed until a pause |
| Dead click | No scroll (100ms), selection change (2.5s), or DOM mutation (100ms) response; absolute timeout 2.75s |
These events also feed the product’s behavioral Issues pipeline (origin = behavioral).
Where automatic data appears
| Signal | Product surface |
|---|---|
$pageview | Dashboard → Pages; Funnel page steps |
$click / forms / frustration | Replay activity; Issues Behavior |
| Sessions | Dashboard KPIs; Replays list |
When automatic is not enough
Use custom events for business meaning the DOM cannot express (signed_up, checkout_completed, feature gates, etc.).