Autocapture reference (browser SDK)
Every autocapture option of the browser SDK, the events and properties it sends, and how to turn rage clicks, dead clicks and scroll depth on or off.
init(key, { autocapture }) takes true (default), false, or an object with the options below. All names are from AutocaptureConfig in @lucida-analytics/browser.
import { init } from "@lucida-analytics/browser";
init("lc_pk_...", {
autocapture: {
captureText: false,
denySelectors: [".private"],
rageClicks: { count: 4, windowMs: 1500 },
deadClicks: { waitMs: 1000 },
},
});Frustration and scroll signals
Signal | Event and properties | Turn off |
|---|---|---|
Rage click | Properties on the |
|
Dead click | A separate |
|
Scroll depth | On |
|
Rage clicks. Defaults: 3 clicks within 1000 ms and 30 px of each other. rageClicks takes count, windowMs, radiusPx, ignoreSelectors, ignoreTextSelection (default true: no count while text is selected), suppressSteppers (default true: number inputs, plus and minus buttons, quantity and carousel controls are not counted) and stepperSelectors (your own steppers). Add the class lc-no-rageclick or the attribute data-lc-no-rageclick to an element to exclude it. These are client hints; the signals pipeline on the server stays the authority for frustration analysis.
Dead clicks. Sent only for a trusted click on a non-interactive element, when nothing happens afterwards: no DOM change, no scroll, no text selection within waitMs (default 700). Not sent while the tab is hidden. deadClicks takes waitMs and ignoreSelectors.
Scroll depth. Measured on the page, or on the element named by the top-level scrollRoot option (a CSS selector or a list; the first match wins) for app shells where an inner element scrolls. $pageleave is sent when a page is left, on a single-page route change, or on unload. capturePageleave is "if_capture_pageview" by default (sent when pageviews are), true (also without pageviews) or false.
Other autocapture options
Option | Default | Effect |
|---|---|---|
| click, change, submit | Which DOM events are captured |
| true | Element text (form control text is never captured) |
| none | Only capture inside, or never capture inside, these selectors |
| none | Pages where autocapture is on, or off (ignore wins) |
| none | Only targets inside these tags, such as |
| none | Attribute names kept out of |
| false | Replace every attribute value with |
Project setting | true |
|
| true |
|
| false |
|
| false | With |
| true |
|
| true |
|
| true |
|
| true |
|
| true |
|
| true |
|
Consent applies to all of it: nothing is stored or sent before the visitor allows analytics unless you configured queueing or anonymous mode. See Cookie munch and Replay privacy.