UI Friction Tracking
Learn what rage clicks, dead clicks, and deep scroll reach reveal about broken UX, and pinpoint exact offending CSS selectors with zero session-replay bloat.
How do you enable and configure TrimStats opt-in UI friction tracking?
Enable Track UI friction in Site settings and add data-friction="true" to your 1.96 KB script tag. TrimStats detects rage clicks (3 clicks within 1,000 ms inside 30 px), dead clicks (non-interactive clicks with zero DOM/URL/scroll change for 500 ms), and 90% scroll reach while recording only CSS selector hints.
What rage clicks, dead clicks, and scroll reach reveal
A funnel tells you where visitors drop off, while UI friction signals tell you what broke on the page. Instead of shipping a 50+ KB session-replay recorder that captures DOM text and slows down interaction latency, TrimStats captures three high-signal UX indicators inside the same 1.96 KB gzipped tracker:
- Rage clicks (broken or sluggish controls): When someone clicks the same spot 3+ times in 1 second, they usually hit a broken button, a disabled checkout control without feedback, or a slow API call with no loading spinner.
- Dead clicks (false affordances): When visitors click a non-interactive badge, heading, or pricing pill that looks like a button and nothing changes in the DOM or URL, either wire up the interaction or tone down the button-like styling.
- 90% deep scroll reach (content depth): Measures what percentage of visitors actually scroll near the bottom of the page. Low scroll reach on a landing page signals that your pricing or CTA below the fold is never being seen.
button#annual-toggle, span.plan-quota-badge) causing user frustration alongside each page friction rate.Enabling UI friction signals
UI friction tracking is opt-in so sites that only want basic traffic metrics incur zero extra event listeners. Enable Track UI friction under Site settings and include data-friction="true" on your script tag:
1<script2 defer3 src="https://collect.trimstats.com/t.js"4 data-site="pk_live_your_key"5 data-friction="true"6></script>Exact detection rules
| Signal | Event type | Trigger condition | Captured target |
|---|---|---|---|
| Rage click | rage_click | 3 clicks within 1,000 ms inside a 30 px Euclidean radius | Compact CSS selector hint (tag#id or tag.class1.class2, max 120 chars) |
| Dead click | dead_click | Click on a non-interactive element (not matching a, button, input, select, textarea, label, [role="button"]) followed by zero DOM mutation, zero URL change, and zero scroll change within 500 ms | Compact CSS selector hint (tag#id or tag.class1.class2) |
| Deep scroll reach | scroll (sc: 90) | Fired once per pageview when (window.scrollY + window.innerHeight) / document.documentElement.scrollHeight >= 0.9 | Current pathname (resets automatically on SPA route changes) |
TrimStats never captures inner text, input values, or DOM snapshots. Dead-click detection observes only structural/state DOM attributes (class, style, hidden, open, aria-expanded, aria-selected, aria-pressed, data-state) for 500 ms and disconnects the MutationObserver immediately.
Acting on the Friction report
Open Behavior -> UI Friction to see total rage clicks, dead clicks, affected visitors, and overall 90% scroll reach rate. Two ranked tables prioritize fixes:
- Top friction pages: Ranks up to 25 pathnames by total rage + dead clicks alongside Friction rate (%) (
affectedVisitors / totalPageVisitors). - Top friction elements: Lists the exact
(pathname, elementSelector, eventType)tuples hitting the most users so you can jump straight to the offending CSS selector in your codebase. - Automated friction spike alerts: If any page records 15+ friction clicks in a 7-day window and rises by 50%+ over the prior week, TrimStats raises a
friction_spikeinsight automatically.
Common technical questions
Does UI friction tracking capture form inputs, text content, or screen videos?
When does a UI friction surge trigger an automated anomaly alert?
Related guides
Complete reference for every HTML data attribute supported by t.js, including first-party mode, UI friction, and custom proxy endpoints.
How TrimStats detects traffic drops, spikes, conversion dips, and friction surges against rolling 7-day baselines and delivers alerts and digests to email, Slack, Discord, and HMAC-signed webhooks.
Details on EU infrastructure in Germany, zero IP storage, sub-processors, GDPR/ePrivacy posture, and automatic retention expiration.