Skip to content

Re-add analytics scripts

Sarah German requested to merge reenable-analytics into main

What does this MR do and why?

  • Adds analytics scripts back onto the site (removed in !4962 (merged) as a response to this incident).
    • We have resolved the OneTrust issue and re-added OneTrust, so these are OK to run again.
  • Moves GitLab product analytics to the shared analytics template so that we can consolidate the logic around these more easily.

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. Run a build with analytics enabled: NANOC_ENV="production" make compile
  3. Verify analytics trackers are now running on the homepage and an interior page by searching the HTML source for "marketo" "bizible" and "google_tagmanager". You'll see these scripts are now included in the build.
  4. Verify in the review app that analytics are not present there by searching for the same strings. They should not appear in the page source.

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

Loading