Skip to content
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

Added google consent mode functions #171

Merged
merged 5 commits into from Mar 22, 2024
Merged

Added google consent mode functions #171

merged 5 commits into from Mar 22, 2024

Conversation

samhotep
Copy link
Member

@samhotep samhotep commented Mar 18, 2024

Done

  • Added consent mode initialization on page load
  • Set google policy on cookie mode selection

QA

  • Clone the repo
  • Build and run the demo
$ yarn build
$ yarn serve
  • Check that before selecting cookie preferences, the <head> section of the site has the default gtag consent values (all denied)
  • Check that after selecting cookie preferences i.e functionality or performance, the gtag values are updated correctly in the <head> section.
    • They should correctly match the essential, functionality or performance selections, as specified here
  • Test on any site that uses the cookie-policy. canonical.com is a good example
    • In the cloned repo, copy the static/js/modules/cookie-policy/cookie-policy.js file to static/dist/

Fixes

WD-9265

@samhotep samhotep marked this pull request as draft March 18, 2024 07:59
@samhotep
Copy link
Member Author

Demo:
canonical/canonical.com#1225

Copy link
Contributor

@petesfrench petesfrench left a comment

Choose a reason for hiding this comment

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

LGTM - would it possible to to have the toggles pre-set depending on previous cookie preferences? ie. if they had selected performance before, it would be selected when you open 'manage preferences'?
image

@samhotep samhotep merged commit f085d10 into main Mar 22, 2024
4 checks passed
@samhotep samhotep deleted the add-consent-mode branch March 22, 2024 12:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants