Skip to content

Migrate to managed cookie scripts - #13874

Merged
parlough merged 2 commits into
mainfrom
feat/new-cookie-banner
Sep 10, 2026
Merged

Migrate to managed cookie scripts#13874
parlough merged 2 commits into
mainfrom
feat/new-cookie-banner

Conversation

@parlough

@parlough parlough commented Sep 10, 2026

Copy link
Copy Markdown
Member

Similar to the dart.dev site in dart-lang/site-www#7500.

The flutter.dev site already used it but didn't have the adapted styles, so it was configured to use fonts we didn't have set up.

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Code Review

This pull request replaces the custom CookieNotice component with a managed cookie notification bar across the sites, updating the layout files, styles, and client/server options accordingly. The feedback highlights two main issues: first, several new CSS variables used in the shared _cookie-notice.scss are only defined in the www site, which will lead to broken styles on the docs site; second, there is an inconsistency in the cookie consent category configuration (2B vs 2A) between DashLayout and DefaultLayout that should be aligned.

Comment thread packages/site_shared/lib/_sass/components/_cookie-notice.scss
Comment thread packages/site_shared/lib/src/layouts/dash_layout.dart
@flutter-website-bot

flutter-website-bot commented Sep 10, 2026

Copy link
Copy Markdown
Collaborator

Staged preview of the updated docs.flutter.dev site (updated for commit f6a65aa):

https://flutter-docs-prod--docs-pr13874-feat-new-cookie-banner-tel7uk1f.web.app

@parlough
parlough marked this pull request as draft September 10, 2026 13:03
@flutter-website-bot

flutter-website-bot commented Sep 10, 2026

Copy link
Copy Markdown
Collaborator

Staged preview of the updated flutter.dev site (updated for commit f6a65aa):

https://flutter-dev-230821--www-pr13874-feat-new-cookie-banner-wrub9zxr.web.app

@parlough
parlough marked this pull request as ready for review September 10, 2026 15:21

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Code Review

This pull request replaces the custom, self-hosted cookie notice component with a managed Google cookie notification bar. It updates the layouts (DashLayout and DefaultLayout) to load the managed script and styles, and configures Google Tag Manager (GTM) to initialize only after the cookie banner indicates consent via the glueCookieNotificationBarLoaded callback. Old Google Analytics tracking code and custom cookie notice components have been removed, and theme variables have been updated to style the new managed banner. I have no feedback to provide as there are no review comments.

@sfshaza2 sfshaza2 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I'm going to approve, but won't land until there's consensus, or at least until Parker is ok with it. :D

@parlough

parlough commented Sep 10, 2026

Copy link
Copy Markdown
Member Author

@jesskuras These changes adjust analytics initialization so let me know if you see any changes or regressions once this lands.

@parlough
parlough merged commit 23d0147 into main Sep 10, 2026
18 checks passed
@parlough
parlough deleted the feat/new-cookie-banner branch September 10, 2026 20:41
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.

3 participants