Slim tracking script: send raw browser state, let server handle normalization #53

Merged
uz1mani merged 2 commits from staging into main 2026-03-17 11:35:58 +00:00
uz1mani commented 2026-03-17 11:35:33 +00:00 (Migrated from github.com)

Summary

  • Remove ~95 lines of client-side logic now handled server-side
  • Send raw location.href, document.title, and document.referrer instead of pre-processed values
  • Remove: UTM param filtering, self-referral comparison, 404 title detection, event name validation, props sanitization
  • Simplify cleanPath() to pathname-only (preserves pulse.cleanPath API for frustration add-on)
  • Script size: 509 → 414 lines

Test plan

  • Pageview payload contains url, title, referrer fields
  • Custom events via pulse.track() still work
  • Frustration add-on loads and reports rage_click / dead_click with correct page_path
  • SPA navigation still tracked (pushState, popstate, MutationObserver)
  • Scroll depth, outbound links, file downloads still fire
  • Refresh dedup still prevents F5 inflation
## Summary - Remove ~95 lines of client-side logic now handled server-side - Send raw `location.href`, `document.title`, and `document.referrer` instead of pre-processed values - Remove: UTM param filtering, self-referral comparison, 404 title detection, event name validation, props sanitization - Simplify `cleanPath()` to pathname-only (preserves `pulse.cleanPath` API for frustration add-on) - Script size: 509 → 414 lines ## Test plan - [x] Pageview payload contains `url`, `title`, `referrer` fields - [x] Custom events via `pulse.track()` still work - [x] Frustration add-on loads and reports `rage_click` / `dead_click` with correct `page_path` - [x] SPA navigation still tracked (pushState, popstate, MutationObserver) - [x] Scroll depth, outbound links, file downloads still fire - [x] Refresh dedup still prevents F5 inflation
Sign in to join this conversation.
No description provided.