Ship privacy-first analytics with a 10-second install.
PerformanceAugust 9, 2026 · 5 min read

How to instrument a product without slowing it down

MA

Marcus Chen

Lead Performance Engineer

Lightweight SDK performance diagram with fast network transit
Quick Takeaways

Keeping analytics scripts under 2KB prevents main-thread blocking and preserves 100/100 Google Lighthouse Core Web Vitals.

Loading large multi-kilobyte analytics bundles blocks the main browser UI thread, driving up Interaction to Next Paint (INP) and Largest Contentful Paint (LCP).

Traditional tools bundle polyfills, complex session replay hooks, and client-side visualization engines right into your visitor's browser. This often adds 50KB to 100KB of JavaScript.

Tracabit is written in zero-dependency TypeScript, compiling to under 1.8KB gzipped. All event dispatching happens asynchronously via navigator.sendBeacon, guaranteeing zero impact on UI responsiveness.

beacon-dispatcher.ts
// Non-blocking beacon dispatch
export function dispatchTelemetry(endpoint: string, payload: object): void {
  const blob = new Blob([JSON.stringify(payload)], {
    type: 'application/json'
  });
  if (navigator.sendBeacon) {
    navigator.sendBeacon(endpoint, blob);
  } else {
    fetch(endpoint, { method: 'POST', body: blob, keepalive: true });
  }
}

Written by Marcus Chen

Published on August 9, 2026 in Performance

Subscribe to our engineering journal.

Get technical teardowns, release announcements, and privacy engineering articles delivered once a month. No spam, ever.