Skip to content

Load the analytics only in the main site

Achilleas Pipinellis requested to merge axil-only-prod into main

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.

  1. Configure a local GitLab Docs environment: https://gitlab.com/gitlab-org/gitlab-docs/-/blob/main/doc/setup.md.

  2. Compile and view the site:

    make compile
    make view
  3. 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.

Edited by Achilleas Pipinellis

Merge request reports