Skip to content

Add OneTrust cookie preferences link

Sarah German requested to merge sarahg/onetrust-cookies into main

What does this MR do and why?

When adding analytics to the developer portal site, we found that the main Docs site does not use the updated cookies preference settings tool from OneTrust.

See developer.gitlab.com#11 (closed)

This MR:

  • Adds the OneTrust cookies preferences link to the footer, which opens a modal window for controlling cookie preferences. This is only included for production builds.
  • Adds styles for the OneTrust button to match existing footer links.
  • Refactors the homepage footer to not need different markup for desktop and mobile; stacks links for widths below the XL breakpoint.

Screenshots, screen recordings, or links to review app

This does not appear in the review app since we do not include tracking scripts there.

Local site screenshots:

Before After
image image
image image
image image

How to set up and validate locally

Numbered steps to set up and validate the change are strongly suggested.

  1. Configure a local GitLab Docs environment: https://gitlab.com/gitlab-org/gitlab-docs/-/blob/main/doc/setup.md.
  2. Compile the site in production mode: NANOC_ENV=production bundle exec nanoc compile
  3. View the site: bundle exec nanoc view
  4. Test the Cookies Preferences link in the footer on both the homepage and an interior page. It should open the Cookie Preferences modal window, just like https://about.gitlab.com/ (their link is in the footer under "Contact us")

Merge request acceptance checklist

This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.

Edited by Sarah German

Merge request reports