Load the analytics only in the main site
What does this MR do and why?
We don't need to load the analytics in the offline versions. Let's use the production_and_default_branch?
helper method to load the analytics only in the latest version.
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 and view the site:
make compile make view
-
Check the page source of a random page and see the analytics aren't loaded.
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 Achilleas Pipinellis