The problem
Measure pageviews and provide limited visit context for a static portfolio without treating approximate signals as identity or mixing the two data paths.
Architecture & flow
Two independent paths with different purposes and privacy boundaries.
Privacy checks
Honor DNT, GPC, saved opt-outs and unreadable privacy choices before capture.
Home-only context
One same-origin request asks the Cloudflare Worker for trusted, approximate location and request-time context.
Cookieless pageviews
The native PostHog SDK captures only sanitized pageview events with in-memory persistence.
Independent evidence
A context response or SDK readiness is not proof that PostHog received or stored a pageview.
The design documents uncertainty instead of presenting estimates as identity.
Approximate signals
Browser and device estimates stay local; edge location depends on trusted Cloudflare metadata.
No behavioral profile
No clicks, funnels, replay, identity record or private analytics query API.
Decisions & trade-offs
- Separate the data paths
- Approximate visit context is requested only on Home and is never forwarded to PostHog. Pageviews use the SDK’s own privacy-gated path.
- Fail closed on privacy uncertainty
- DNT/GPC, saved opt-outs and unreadable privacy choices prevent the relevant capture; requests are bounded and not cached.
- Document limits, not guarantees
- Cookieless capture does not eliminate server-side IP/user-agent processing or guarantee legal compliance.
The result
A static portfolio with separate, privacy-gated pageview and Home-only context paths, presented as a project case rather than a live visitor dashboard.
Location is approximate and depends on trusted edge metadata. Native daily hashing processes IP and raw user-agent. No unique-person, universal retention or legal-compliance guarantee is made.






