Skip to content

Autocapture and element naming ​

What is captured automatically ​

EventWhenDetails
page_viewPage load and single-page-app navigations (pushState, replaceState, popstate, plus hashchange if hashRouting)New page view ID per page
page_leaveTab hidden, page closed, before an SPA navigationEngaged time (visible and focused) and maximum scroll depth
click, outbound_click, downloadClick on a link, button, [role=button], [onclick] or [data-ah-name] elementSelector, tag, text (≤ 100 characters, emails and long numbers masked), id, stable classes, link (sensitive parameters removed), role, data-ah-name, click position, whether the click was produced by a real input device
form_start, form_submit, form_abandonFirst field focus, submit, page left after starting without submittingField values are never read: only the form's selector, id or name and the last field touched
scroll25, 50, 75 and 90% depth
errorJavaScript errors and unhandled promise rejectionsAt most 10 per page, de-duplicated
web_vitalsFirst page leave of the landing pageLCP, INP, CLS, TTFB
actor_switchThe actor changes within a sessionFrom, to, agent name
consent_updateThe consent mode changesNew and previous mode

Text inputs, text areas and selects are never captured.

Name your important elements ​

Funnels and click reports identify elements by a CSS selector. Selectors built automatically survive most changes, but a redesign can still break them. Give the elements you care about a stable business name:

html
<button data-ah-name="add-to-cart">Add to cart</button>
<div class="slot-picker" data-ah-name="delivery-slot-picker">…</div>
<a href="/checkout" data-ah-name="checkout">Checkout</a>

data-ah-name becomes the anchor of the element's selector, and the name shown in reports and in the funnel builder's element picker.

When there is no name, the selector generator prefers, in order: a stable id, a test or stable attribute (data-testid, data-test, data-qa, data-cy, name…), then tag + stable classes + :nth-of-type. It ignores framework-generated ids (React :r1:, ember123, radix-*), CSS-in-JS hashes (css-1x2y3z, sc-*, Button_root__a1B2c) and state classes (active, is-open). It climbs at most 6 levels and returns the shortest unique path.

Hide or mask elements ​

AttributeEffect
data-ah-ignoreClicks on the element are not captured
data-ah-mask (or class ah-mask)Text inside the element is replaced by ***
html
<div class="account-summary" data-ah-mask>Jane Doe · jane@example.com</div>

Turn parts off ​

js
eureka('config', { autocapture: { forms: false, scroll: false } })

Agents & humans, every visit counts!