UI Friction Tracking

Find broken buttons and dead clicks without heavy session replays.

Opt-in rage click, dead click, and 90% scroll detection runs inside the same 1.96 KB tracker and surfaces the exact CSS selectors frustrating buyers.

Imtiaz Rayhan
Imtiaz RayhanCo-Founder & Lead Engineer, DotCamp & TrimStats
Specs verified against production TrimStats source
Seeded demo workspace
TrimStats UI Friction report displaying 184 rage clicks, 342 dead clicks, 36.5% 90% scroll reach, and top friction pages led by /pricing and /docs/installationTrimStats UI Friction report displaying 184 rage clicks, 342 dead clicks, 36.5% 90% scroll reach, and top friction pages led by /pricing and /docs/installation
  1. 1
    Friction KPI totals: Monitor rage clicks, dead clicks, affected visitors, and 90% deep scroll reach in one strip.
  2. 2
    Per-page friction rate: Normalizes raw clicks against total page visitors so broken checkout steps surface above high-traffic blogs.
Rank high-value routes by combined rage clicks, dead clicks, and affected visitor friction rate so engineering fixes target the highest-impact UX breaks first.
Direct answer

How does TrimStats detect UI friction without recording user screens?

TrimStats provides opt-in UI friction tracking via data-friction="true" inside its 1.96 KB gzipped script. It flags rage clicks (3 clicks within 1,000 ms inside 30 px), dead clicks (non-interactive clicks with zero DOM, URL, or scroll change for 500 ms), and 90% scroll reach while recording only compact CSS selector hints.

Rage click rule
3 clicks / 1s

Triggered when 3 clicks land within a 30 px radius inside 1000 ms.

Dead click check
500 ms

Disconnects its structural MutationObserver after 500 ms with zero DOM/URL/scroll change.

Total script size
1.96 KB gzipped

Zero extra bundle split or heavy DOM-recording library required when enabled.

Text or input capture
Zero

Never reads innerText, form values, passwords, or full DOM snapshots.

Why teams switch to TrimStats for ui friction tracking

Built directly on ClickHouse, Fastify, and a sub-2 KB browser script to remove legacy analytics blind spots.

Session replay scripts hurt INP and privacy posture

Traditional replay tools inject large DOM serialization libraries, slow down main-thread interactions, and risk leaking customer PII in form fields.
TrimStats uses passive click listeners and a bounded 500 ms attribute-only MutationObserver, shipping zero screen recording and zero input capture.

Aggregate bounce rates never tell you which button broke

Seeing checkout conversion drop by 20% leaves engineers guessing whether a coupon button, plan toggle, or disabled SSO CTA caused the drop.
Top friction elements report the exact (pathname, elementSelector, eventType) tuple so you can grep the selector in seconds.

Silent UI regressions linger between manual QA passes

A CSS z-index overlap or broken event handler after a routine deploy can frustrate hundreds of users before anyone opens a support ticket.
Automated friction_spike anomaly insights fire when a page hits 15+ friction clicks in 7 days and jumps 50%+ over the prior week.
01 / Capability

Pinpoint offending CSS selectors without DOM snapshots

Instead of scrubbing hours of video recordings, open Behavior -> UI Friction to inspect the ranked table of CSS selector hints (tag#id or tag.class1.class2, capped at 120 characters) sorted by affected users.

  • Separates rage_click (repeated clicks on broken or slow controls) from dead_click (static badges users expect to be clickable).
  • Tracks affected unique visitors alongside raw click counts so one impatient user does not distort priority.
  • Resets 90% scroll reach automatically across client-side SPA route transitions.
Seeded demo workspace
TrimStats Top Friction Elements view showing CSS selectors button#annual-toggle with 74 rage clicks and span.plan-quota-badge with 112 dead clicks on /pricingTrimStats Top Friction Elements view showing CSS selectors button#annual-toggle with 74 rage clicks and span.plan-quota-badge with 112 dead clicks on /pricing
Actionable CSS selector hints map directly to codebase components while keeping user text, inputs, and DOM state completely private.
02 / Capability

Prioritize UX fixes by normalized friction rate across routes

Raw click counts over-index on your highest-traffic landing page. TrimStats divides affected visitors by total page visitors so elevated friction rates on /pricing or /docs/installation rank above harmless background noise.

  • Evaluates top 25 friction pages in ClickHouse for any 7d, 30d, or 90d date window.
  • Pairs friction metrics with 90% deep scroll reach to distinguish engaging long-form reads from stuck checkout flows.
  • Opt-in per site via Site settings and data-friction="true" so basic traffic sites incur zero extra event listeners.
index.htmlhtml
1<script
2 defer
3 src="https://collect.trimstats.com/t.js"
4 data-site="pk_live_your_key"
5 data-friction="true"
6></script>
Enable opt-in UI friction signals with one HTML data attribute.

Friction rate (% of page visitors affected) isolates broken conversion routes

Seeded 30-day demo workspace matching the UI Friction report above

%
/docs/installation(41 rage + 96 dead clicks)
2.5%
/pricing(92 rage + 148 dead clicks)
2.29%
/vs/plausible(22 rage + 44 dead clicks)
1.4%
/features/ai-traffic(29 rage + 54 dead clicks)
1%

Normalizing affected visitors against route traffic surfaces /docs/installation (2.5%) and /pricing (2.29%) as the top two fixes.

Methodology: Computed as (affectedVisitors / totalPageVisitors) * 100 across the seeded 30-day TrimStats demo workspace.

Source: TrimStats seeded demo workspace (acme.dev)
View chart data table
LabelFriction rate
/docs/installation2.5%
/pricing2.29%
/vs/plausible1.4%
/features/ai-traffic1%
03 / Capability

Deterministic, privacy-safe browser instrumentation

Dead-click detection watches only structural state attributes (class, style, hidden, open, aria-expanded, aria-selected, aria-pressed, data-state) for 500 ms and disconnects immediately.

  • Ignores legitimate interactive elements (a, button, input, select, textarea, label, [role="button"]) for dead-click detection.
  • Uses passive scroll listeners throttled via requestAnimationFrame for 90% scroll reach.
  • Feeds directly into TrimStats automated friction_spike anomaly detection.

UI Friction Tracking FAQ

Direct answers on implementation, privacy controls, quotas, and data accuracy.

Does TrimStats UI friction tracking record user screens or form inputs?
No. TrimStats never captures DOM snapshots, video replays, inner text, keystrokes, or form input values. It records only compact CSS selector hints (tag#id or tag.class1.class2) plus the pathname when a rage click or dead click threshold is met.
What exact conditions trigger a rage click versus a dead click?
A rage click fires when a visitor clicks 3 times within 1,000 milliseconds inside a 30-pixel radius. A dead click fires when a visitor clicks a non-interactive element and zero structural DOM mutation, zero URL change, and zero scroll change occur within 500 milliseconds.
Is UI friction tracking turned on by default?
No. UI friction is strictly opt-in so sites that only want core traffic metrics attach zero extra click or scroll listeners. You enable it by toggling Track UI friction in Site settings and adding data-friction="true" to your script tag.
Do rage clicks and dead clicks count toward my monthly event quota?
Yes. Opt-in friction events (rage_click, dead_click, and 90% scroll pings) count toward your monthly event quota, while bot traffic is dropped before billing and every plan includes a 20% soft grace buffer.
Can TrimStats alert me automatically if a deploy breaks a button?
Yes. TrimStats runs a rolling 7-day friction_spike anomaly detector every 6 hours. If any page records at least 15 friction clicks in a 7-day window and rises by 50% or more over the prior week, it raises an insight and optional email alert.
Does TrimStats UI friction tracking hurt Core Web Vitals or INP?
No. TrimStats ships inside a single 1.96 KB gzipped deferred script, attaches passive click and requestAnimationFrame-throttled scroll listeners, disconnects its structural MutationObserver after 500 ms, and never serializes the DOM tree, preserving Interaction to Next Paint (INP).
How does TrimStats UI friction compare to Hotjar, PostHog, or Microsoft Clarity?
Session replay suites like PostHog, Hotjar, and Clarity inject 45 KB to 100+ KB DOM-recording libraries and require PII masking rules. TrimStats trades video playback for ranked CSS selector hints and friction rates inside 1.96 KB gzipped with zero text or input capture.
Imtiaz Rayhan
Engineered & documented by
Imtiaz Rayhan (Co-Founder & Lead Engineer, DotCamp & TrimStats)

Co-founder of DotCamp LLC in Brooklyn, NY and lead engineer of TrimStats. Ships privacy-first web analytics, ClickHouse pipelines, and WordPress plugins used on 115,000+ active sites.

  • • Architect of the TrimStats 1.96 KB gzipped browser tracker, Fastify collector, and ClickHouse MergeTree pipeline
  • • Co-founder of DotCamp LLC (est. 2019), creator of Ultimate Blocks (50,000+ installs), WP Table Builder (50,000+ installs), Tableberg, and OptimizeCamp
  • • WordPress.org plugin & theme developer since 2016 with 1,200+ community support replies and 5M+ cumulative plugin downloads

Verification standard: All script sizes (1.96 KB gzipped), plan limits, and dashboard behaviors on this page are verified directly against the TrimStats repository and seeded acme.dev workspace as of 2026-11-30.

Try ui friction tracking with one 1.96 KB gzipped script

Every TrimStats tier from Starter ($17/month) through Scale ($134/month) includes full access to revenue attribution, UI friction, anomaly insights, funnels, and cohorts.

Verified against live TrimStats specifications.