Skip to content

[docs-infra] Create Cookie notice #321

@oliviertassinari

Description

@oliviertassinari

Summary

Legal use of Google Analytics. Under GDPR, it’s mandatory to receive consent to use cookies. See part 1. of https://www.cookiebot.com/en/google-analytics-gdpr/

Examples

Ashby https://www.ashbyhq.com/, Really nice execution, the best I saw so far:

Default Configure
Screenshot 2023-06-25 at 19 23 47 Screenshot 2023-06-25 at 19 23 50

Here are the 3 kinds of cookies I found on the website

  • Essential cookies: user preferences for demos (TS/JS, the styling, …)
  • Analytics cookies: google analytics
  • Advertisement cookies: carbon Ads

Context

SCR-20240305-lpdy

Benchmarks

TODO on MUI

  • 1. In theory, the accept and reject options must be equally visible in the cookie banner. What we have doesn't seem compliant per https://gemini.google.com/share/0ddd9746afb4. Now, in practice, I think we can argue that this EU guidance is absurd; we need to help the user pick what they prefer. So let's ignore this.

  • 2. The corresponding issue is: [docs-infra] Create Cookie notice #321. Let's reference the work together. I have updated the PR description.

  • 3. The heading structure is not correct:
    SCR-20260512-cpzz

    PR to fix this: [docs-infra] Fix Cookie banner heading material-ui#48529

  • 0. Fix the drop in Google Analytics data going there.

  • 4. Apollo runs in dev mode. It pollutes the environment we work in. So we need to remove it, no?

    SCR-20260510-rkad
  • 5. The cookie broke the isolation of the playground. So we need to remove it there.

    SCR-20260323-tcpe
  • 6. The way the GA connector is done is strange. e.g., if I go to https://www.deque.com/ it still collects even when I don’t accept or reject. So I suspect it’s not correct right now. In theory, the banner is about whether we can attribute a session to a previous one, but events can still be collected, so total activity volume should stay unchanged. It looks wrong that no collected events are sent until the banner is approved or when it's rejected.

  • 7. "Essential only" as a button label, I have doubts. We also have Personalization cookies, e.g., for the theme mode. Some thread on this in https://www.notion.so/docs-infra-Cookie-notice-0dae6536cf014a4aa560c1af43211303?d=42c29a12aed742f08b3f8bd00dd95411#78c6c0%5B%E2%80%A6%5Da56bae2 and ToggleDarkTheme could lead to GDPR issues themesberg/flowbite-react#546 (comment). This is how Vercel defines functional. They still put the theme as an essential, because when I deny, sign out, it still remembers my theme preference:

    Image
  • 8. We are showing the banner on locales that don't have privacy regulations that require a banner. Shouldn't we use the IP location to decide whether to show it or not?

  • 9. Should we only load Apollo on the marketing pages? The docs pages have gone through multiple performance degradation changes in the past; if we can avoid loading this, then it would probably help?

  • 10. I see multiple ways to polish the design. I might allocate time to solve this.

TODO on Base UI

  • Add coverage there

TODO on MUI Recipes / Console / Store

  • Add coverage there

Search keywords: cookie notice

Metadata

Metadata

Assignees

Labels

scope: docs-infraInvolves the docs-infra product (https://www.notion.so/mui-org/b9f676062eb94747b6768209f7751305).type: enhancementIt’s an improvement, but we can’t make up our mind whether it's a bug fix or a new feature.
No fields configured for issues without a type.

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions