Add OneTrust cookie preferences link
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 |
---|---|
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
How to set up and validate locally
Numbered steps to set up and validate the change are strongly suggested.
-
Configure a local GitLab Docs environment: https://gitlab.com/gitlab-org/gitlab-docs/-/blob/main/doc/setup.md. -
Compile the site in production mode: NANOC_ENV=production bundle exec nanoc compile
-
View the site: bundle exec nanoc view
-
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.
-
I have evaluated the MR acceptance checklist for this merge request.
Edited by Sarah German