Repository navigation
Load the slim statistics bundle after page load - #45
Merged
Merged
Conversation
✅ Deploy Preview for silveltman ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
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.
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:
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.