Skip to content

Conversation

@dav-is
Copy link
Member

@dav-is dav-is commented Dec 8, 2025

Adds the init script for https://www.apollo.io/ and asks for consent from the user:

Cookie Preferences
We use cookies to understand site usage and improve our content. This includes third-party analytics.
[Essential only] OR [Allow analytics]

Essential only does not send data to Apollo and Google Analytics is set to analytics_storage: 'denied'.

These are the defaults Google defines

  'ad_storage': 'denied',
  'ad_user_data': 'denied',
  'ad_personalization': 'denied',
  'analytics_storage': 'denied', // we update this when the user allows it

Do we need to enable these other permissions? If so should we alter the message we display?

image

Preview URL

@dav-is dav-is added type: enhancement It’s an improvement, but we can’t make up our mind whether it's a bug fix or a new feature. scope: docs-infra Involves the docs-infra product (https://www.notion.so/mui-org/b9f676062eb94747b6768209f7751305). labels Dec 8, 2025
@mui-bot
Copy link

mui-bot commented Dec 8, 2025

Netlify deploy preview

https://deploy-preview-47445--material-ui.netlify.app/

Bundle size report

Bundle Parsed size Gzip size
@mui/material 0B(0.00%) 0B(0.00%)
@mui/lab 0B(0.00%) 0B(0.00%)
@mui/system 0B(0.00%) 0B(0.00%)
@mui/utils 0B(0.00%) 0B(0.00%)

Details of bundle changes

Generated by 🚫 dangerJS against b8ad112

@dav-is dav-is marked this pull request as ready for review December 8, 2025 02:59
@dav-is dav-is requested a review from Janpot December 8, 2025 02:59
@mnajdova
Copy link
Member

mnajdova commented Dec 9, 2025

@noraleonte can you provide any feedback on the design side? Thank you! :) Also, let's follow https://mui.com/material-ui/react-dialog/#non-modal-dialog for the interactions.

@Janpot
Copy link
Member

Janpot commented Dec 9, 2025

Would probably be a good idea to try this out with X before merging. (You can just point @mui/monorepo to your fork ina PR)

const getDoNotTrackServerSnapshot = () => true; // Assume DNT until we know the actual value

function useDoNotTrack(): boolean {
return React.useSyncExternalStore(
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Perhaps add a comment that we use this to avoid hydration errors?

type ConsentStatus = 'analytics' | 'essential' | null;

function getDoNotTrack(): boolean {
if (typeof window === 'undefined') {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can this ever happen if we provide getServerSnapshot?

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

Labels

scope: docs-infra Involves the docs-infra product (https://www.notion.so/mui-org/b9f676062eb94747b6768209f7751305). type: enhancement It’s an improvement, but we can’t make up our mind whether it's a bug fix or a new feature.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants