feat(analytics): add cookieless portfolio measurement - #136
Merged
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
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.
Adds acquisition and interaction measurement for the portfolio: Work/Journey/token-log opens, project outbound clicks, article viewport depth, Markdown/Ask AI choices, and successful copy/load-more actions.
PostHog initializes only on production
f0rr0.devusing public source configuration, with always-cookieless tracking, no person profiles, DNT/GPC support, explicit events, and URL/prompt redaction. Includes a research report, event contract, dashboard definitions, and weekly measurement loop.A native Next.js proxy sends events through the opaque
/_r7k2/*namespace, reserving no meaningful page name. It strips cookie/auth/referrer headers and preserves collector slashes alongside existing canonical page redirects. The report documents current vendor guidance and public GitHub naming examples.Validation: 314 tests pass; lint, typecheck (including deployment source), and production Next build pass. Chromium checks cover SPA attribution, disclosure keyboard activation, article thresholds, Markdown/GitHub middle-clicks, portaled AI links, hash-only navigation, storage, and disabled capture for previews/DNT/GPC. Analytics requests were intercepted locally and used only the first-party path. Proxy tests cover regional routing, request header removal and path boundaries; a running-server check verified public asset forwarding and canonical redirects. Existing filesystem-tracing warnings and GitHub embed fallback behavior remain.
Release prerequisites: enable Cookieless server hash mode in the website project and publish the accurate privacy notice. The public project token, proxy path and upstream hosts are committed in source; no PostHog environment variables are required. Real ingestion/session attribution still needs verification after activation. The standard SDK adds approximately 91 KiB gzipped on sampled pages. This PR does not merge or deploy production.