Skip to content

Load the slim statistics bundle after page load - #45

Merged
silveltman merged 1 commit into
mainfrom
perf/slim-analytics-20261024
Oct 24, 2026
Merged

silveltman merged 1 commit into
mainfrom
perf/slim-analytics-20261024

Conversation

@silveltman

@silveltman silveltman commented Oct 24, 2026 •

Copy link
Copy Markdown
Contributor

Load the slim PostHog build after page load and idle, preserving the existing statistics and privacy settings. This removes optional SDK code already disabled by configuration. The measured SDK bundle falls from 96,612 to 50,845 gzip bytes; this is deferred analytics payload, not an initial-render or Lighthouse score claim.

Only the import path changes. Public key, production-host/webdriver guards, same-origin proxy, cookieless memory mode, fetch credentials/cache policy, URL scrubbing and allowed events remain unchanged. Dependencies, content, images, booking and consent behavior are untouched.

Validation:

  • Full source check and both production builds pass.
  • Actual built SDK passes Chromium, Firefox and WebKit privacy checks: only sanitized pageview/pageleave, no cookies sent to ingest, no beacon, new storage or observed external requests.
  • All 5,797 unrelated built files match. Five HTML files differ only in the analytics script filename; two JavaScript files are replaced.

Independent review passes with recorded fixture limits. The matching-preview Chromium smoke passes, and mobile/desktop exploration preserves the page. The privacy fixture observes seven scrubbed, cookie-free requests including an extra WebKit pageleave during teardown; it does not establish navigation delivery reliability or a hard no-external guarantee. Production hostname guards keep the SDK disabled on previews.

@netlify

netlify Bot commented Oct 24, 2026 •

Copy link
Copy Markdown

✅ Deploy Preview for silveltman ready!

Name Link
🔨 Latest commit 0b517df
🔍 Latest deploy log https://app.netlify.com/projects/silveltman/deploys/6adcc980b6aa5a0945dc1fe2
😎 Deploy Preview https://deploy-preview-45--silveltman.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
🤖 Make changes Run an agent on this branch

To edit notification comments on pull requests, go to your Netlify project configuration.

@silveltman
silveltman marked this pull request as ready for review October 24, 2026 15:19
@silveltman
silveltman merged commit 991127d into main Oct 24, 2026
9 checks passed
@silveltman
silveltman deleted the perf/slim-analytics-20261024 branch October 24, 2026 15:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant