Skip to content

Privacy-compliant cookieless analytics#47

Open
midenotch wants to merge 1 commit into
wraith-protocol:developfrom
midenotch:privacy
Open

Privacy-compliant cookieless analytics#47
midenotch wants to merge 1 commit into
wraith-protocol:developfrom
midenotch:privacy

Conversation

@midenotch

Copy link
Copy Markdown

Close: #26

What was implemented
Provider: Plausible Analytics
Chosen over Umami because it's managed cloud (zero infra to maintain), EU-hosted, open-source, and under 1 KB gzipped — well within the 2 KB budget.

Files changed / created
index.html Added script.scroll.tagged-events.js — the combined Plausible extension that handles both scroll depth (automatic, no code) and custom JS events. A tiny queue shim ensures events fired before script load are not dropped. No integrity attribute is included because Plausible ships frequent minor updates and does not publish SRI hashes for their CDN build (documented in CONTRIBUTING).

analytics.ts
(new) Typed trackEvent() wrapper around window.plausible(). The rest of the codebase never touches window.plausible directly — easy to swap provider later.

Privacy.tsx
(new) Full privacy page at /privacy. Explains what Plausible collects, what it doesn't, why we chose it, and the no-cookie/no-banner guarantee. Links to Plausible's own data policy for the full legal basis.

App.tsx
Wrapped in BrowserRouter with routes for / (home) and /privacy.

Hero.tsx

"Read the Docs" → fires Read the Docs goal
"Try the Demo" → fires Try the Demo goal
Code tab clicks → fires Code Tab Change with { tab: 'send.ts' } prop
CtaStrip.tsx

"Get API Key" → fires Get API Key goal
"Read the Docs" → fires Read the Docs goal
Footer.tsx
Privacy link updated from to (internal SPA route, no full page reload).

CONTRIBUTING.md
(new) Documents the full analytics setup: why Plausible, how the script loads, every goal and where it fires, how to add new goals, the no-banner rationale, and the privacy page location.

Acceptance criteria status
Criterion Status
Provider integrated ✅ Plausible script in index.html
Goals firing ✅ 4 goals wired; scroll depth automatic
Privacy page linked from footer ✅ /privacy route, in Footer
PR explains privacy-acceptability ✅
CONTRIBUTING.md
documents the full rationale
Tracker bundle ≤ 2 KB gzipped ✅ Plausible script is ~1 KB gzipped
No cookies = no banner needed ✅ Verified; documented on Privacy page

@vercel

vercel Bot commented Jun 24, 2026

Copy link
Copy Markdown

@OluRemiFour is attempting to deploy a commit to the truthixify's projects Team on Vercel.

A member of the Team first needs to authorize it.

@drips-wave

drips-wave Bot commented Jun 24, 2026

Copy link
Copy Markdown

@midenotch Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits.

You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀

Learn more about application limits

@midenotch

Copy link
Copy Markdown
Author

Done, Close: #47

@truthixify truthixify changed the base branch from main to develop June 24, 2026 17:40
@truthixify

Copy link
Copy Markdown
Contributor

Heads up: I retargeted this from main to develop. For wave 6 all PRs land on develop first (we freeze on develop before merging to main). No action needed from you, just a heads-up. If you rebase in the future, base on origin/develop, not origin/main.

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.

Privacy-compliant cookieless analytics

3 participants