Conversation
Add automatic scroll depth milestone tracking (25/50/75/90/100%) to the pixel's autocapture system. Uses a passive scroll listener throttled via requestAnimationFrame for zero performance impact. For above-the-fold pages where no scroll is possible, fires depth:100 with an above_fold flag after a 2-second dwell time — better than GA4/GTM which fire instantly and inflate metrics. Controlled by autocapture.scroll (default: true), consistent with existing forms and clicks toggles. Bundle stays at 5.6KB gzipped. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
|
View your CI Pipeline Execution ↗ for commit ed36a1f
☁️ Nx Cloud last updated this comment at |
✅ Pixel Bundle Size — @imtbl/pixel
Budget: 10.00 KB gzipped (warn at 8.00 KB) |
- Rename above_fold → aboveFold for consistency with all other autocapture event properties (camelCase convention) - Remove dead aboveFold parameter from checkAndFire — it was always false after the dwell timer got its own inline path - Remove deprecated window.pageYOffset fallback — all supported browsers (Chrome 80+) have window.scrollY Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Only show the option being disabled — omitting defaults makes it clear you don't need to fully specify the autocapture list to toggle one off. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
nattb8
approved these changes
Apr 16, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
scroll_depthTrackMessage events, throttled viarequestAnimationFramewith a passive scroll listener for zero performance impactdepth: 100withaboveFold: trueafter a 2-second dwell to filter out immediate bouncesautocapture.scrolltoggle (default:true), consistent with existingformsandclicksoptionsEvent schema
Design decisions
requestAnimationFramethrottleaboveFold: trueflagdepth: 100for above-foldLinear
Test plan
autocapture.scroll: falsedisables trackingsetupAutocapture({})callrequestAnimationFramethrottle verified🤖 Generated with Claude Code