-
-
Notifications
You must be signed in to change notification settings - Fork 32.8k
[docs-infra] Add Cookie Banner and Analytics Provider #47445
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
Netlify deploy previewhttps://deploy-preview-47445--material-ui.netlify.app/ Bundle size report
|
|
@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. |
|
Would probably be a good idea to try this out with X before merging. (You can just point |
| const getDoNotTrackServerSnapshot = () => true; // Assume DNT until we know the actual value | ||
|
|
||
| function useDoNotTrack(): boolean { | ||
| return React.useSyncExternalStore( |
There was a problem hiding this comment.
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') { |
There was a problem hiding this comment.
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?
Co-authored-by: Nora <[email protected]> Signed-off-by: Connor Davis <[email protected]>
Signed-off-by: Connor Davis <[email protected]>
Adds the init script for https://www.apollo.io/ and asks for consent from the user:
Essential only does not send data to Apollo and Google Analytics is set to
analytics_storage: 'denied'.These are the defaults Google defines
Do we need to enable these other permissions? If so should we alter the message we display?
Preview URL