Skip to content

Prevent images from being auto-blocked by OneTrust

Sarah German requested to merge 1750-snowplow-autoblock-bug into main

What does this MR do and why?

Adds a data-ot-ignore attribute to images which are served from our own domain. This might resolve https://gitlab.com/gitlab-org/gitlab-docs/-/issues/1750.

See also:

Screenshots, screen recordings, or links to review app

N/A (no visual changes, and analytics scripts do not run on the review app)

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 with environment variables to include analytics scripts:
make clean && NANOC_ENV="production" CI_DEFAULT_BRANCH="main" CI_COMMIT_REF_NAME="main" GITLAB_ANALYTICS_HOST="https://collector.prod-1.gl-product-analytics.com" GITLAB_ANALYTICS_ID="e1c8d446-8edf-46fa-9e6a-9f964b8675c8" make compile
  1. Verify images load as usual. Here's a page with several images: http://127.0.0.1:3000/ee/tutorials/left_sidebar/
  2. Using browser devtools, verify images have a data-ot-ignore attribute:

image

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.

Closes #1750

Edited by Sarah German

Merge request reports