Re-add analytics scripts
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.
-
Configure a local GitLab Docs environment: https://gitlab.com/gitlab-org/gitlab-docs/-/blob/main/doc/setup.md. -
Run a build with analytics enabled: NANOC_ENV="production" make compile
-
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. -
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.
-
I have evaluated the MR acceptance checklist for this merge request.
Edited by Sarah German