Skip to content

feat(privacy): anonymous analytics switch, Do Not Track, footer credits - #1834

Merged
magic-peach merged 2 commits into
mainfrom
feat/analytics-opt-out
Nov 3, 2026
Merged

magic-peach merged 2 commits into
mainfrom
feat/analytics-opt-out

Conversation

@magic-peach

@magic-peach magic-peach commented Nov 3, 2026 •

Copy link
Copy Markdown
Collaborator

Phase 2, part 2: privacy controls and footer credits. The docs half is #1833.

What changes

Anonymous analytics switch (Settings)

  • There was no Settings screen, so "Settings" is a new section on the privacy page (/privacy#settings), linked from the footer as Settings. It holds an "Anonymous analytics" switch (role="switch"), saved in localStorage (reframe_analytics).
  • Off means DatadogInit never loads or initialises the Datadog SDK and makes no request to Datadog (tested).
  • Turned off on a page where RUM already started, beforeSend drops every further event and custom events stop.
  • Do Not Track and Global Privacy Control keep analytics off. The switch is disabled and explains why; a stored "on" can't override the browser signal.

Privacy settings in the RUM SDK, confirmed in code and tests

  • sessionReplaySampleRate: 0 (replay stays off).
  • defaultPrivacyLevel: "mask", newly added.
  • enablePrivacyForActionName: true.
  • trackAnonymousUser: false, newly added. Real production events were carrying a persistent usr.anonymous_id, which lets sessions be linked across visits. beforeSend also removes usr as a backstop.
  • No file names, paths or captions: covered by the existing sanitizeRumEvent tests. No properties beyond the documented buckets (format, resolution, size and length ranges, overlay flags): covered by exportTelemetry.test.ts's allowed-keys test.

Needs a setting in Datadog (not possible from code). Datadog adds IP-derived location (country, city, latitude and longitude) to every event on its servers, and production events have it. The RUM application API doesn't expose that setting. To turn it off: Datadog → Digital Experience → your RUM application ("reframe") → its settings → user data collection, then turn off geolocation and client IP collection.

Privacy page wording. It used to say telemetry "does not and cannot include… export settings", which wasn't true. It now lists exactly what export events carry.

Footer. The bottom bar now has "This site is powered by Netlify" (→ netlify.com, the wording Netlify's open source plan asks for; the badge stays), "Security by Snyk" (→ snyk.io), GitHub and MIT License links. The Code of Conduct link now points to reframe-oss/reframe instead of magic-peach/reframe. The License link targets LICENSE, which #1833 renames from MIT LICENSE, so merge #1833 first or that link 404s until it is.

Checks run locally

  • bun run test: 29 files, 313 tests pass. New:
    • analyticsConsent.test.ts: the default, the stored choice, DNT, GPC, blocked storage, events stopping when turned off, and usr stripped;
    • DatadogInit.consent.test.tsx: no initialisation or Datadog requests when off, under DNT or under GPC, plus the init options;
    • AnalyticsSettings.test.tsx: the switch saves its state, and is disabled under DNT.
  • Typecheck, lint and build pass.
  • Built site checked in Chromium, light and dark: the switch toggles and saves off; the footer links are as above; no horizontal scroll at 390 px.

- Settings (privacy page, linked from the footer): an "Anonymous analytics"
  switch saved in localStorage. When off, DatadogInit doesn't load the SDK;
  if it's turned off on a page where RUM already started, beforeSend drops
  every further event and custom events stop.
- Do Not Track and Global Privacy Control keep it off, and the switch says why.
- RUM: defaultPrivacyLevel "mask" (replay stays off), and
  trackAnonymousUser: false, so there is no persistent usr.anonymous_id;
  production events were carrying one.
- Privacy page: the telemetry section now says exactly which coarse export
  details are sent, instead of claiming no export settings are.
- Footer: "This site is powered by Netlify", "Security by Snyk", GitHub and
  license links; the Code of Conduct link points at reframe-oss/reframe.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@netlify

netlify Bot commented Nov 3, 2026 •

Copy link
Copy Markdown

✅ Deploy Preview for reframe-os ready!

Name Link
🔨 Latest commit edfbd88
🔍 Latest deploy log https://app.netlify.com/projects/reframe-os/deploys/6aea0a31a01d089879c64ac7
😎 Deploy Preview https://deploy-preview-1834--reframe-os.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

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

@github-actions

github-actions Bot commented Nov 3, 2026

Copy link
Copy Markdown
Contributor

⚠️ PR Format Issues — @magic-peach

Please fix the following before your PR can be reviewed:

  • ⚠️ No linked issue found. Add Closes #<issue-number> to your PR description.

Push new commits after fixing — this comment will update automatically.

📖 CONTRIBUTING.md

@github-actions

github-actions Bot commented Nov 3, 2026

Copy link
Copy Markdown
Contributor

👋 Thanks for your PR, @magic-peach!

Welcome to Reframe — a browser-based video editor built for everyone 🎬

What happens next

  1. 🤖 Automated checks — build & TypeScript typecheck will run automatically
  2. ✅ Vercel preview — a preview deployment will be created (requires maintainer authorization for fork PRs)
  3. 👀 Code review — a maintainer will review your changes
  4. 🚀 Merge — once approved, your PR will be merged!

Quick checklist

  • PR title follows Conventional Commits (e.g. feat: add dark mode)
  • Linked the issue this PR closes (e.g. Closes #123)
  • Tested the changes locally (bun run dev)
  • Build passes (bun run build)

Useful links

Happy coding! 🎉

@github-actions github-actions Bot added level:advanced Advanced level - 55 pts type:docs Documentation type:security Security type:testing Testing labels Nov 3, 2026
…e redesigned footer

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@magic-peach
magic-peach marked this pull request as ready for review November 3, 2026 16:43
@magic-peach
magic-peach merged commit 5573a84 into main Nov 3, 2026
20 of 22 checks passed
@github-actions

github-actions Bot commented Nov 3, 2026 •

Copy link
Copy Markdown
Contributor

Claude encountered an error —— View job


I'll analyze this and get back to you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

level:advanced Advanced level - 55 pts type:docs Documentation type:security Security type:testing Testing

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant