diff options
author | Achilleas Pipinellis <axil@gitlab.com> | 2019-10-25 14:47:57 +0300 |
---|---|---|
committer | Achilleas Pipinellis <axil@gitlab.com> | 2019-10-25 14:47:57 +0300 |
commit | 2aceb28bf61fd88edb2ad90bac6e7bdbc7bdb762 (patch) | |
tree | 98769f869be82bc512eff3bba9dcb1aeca7666e8 | |
parent | f3851a77809d8cbcf735eefa0c80573c120b2e73 (diff) | |
parent | 7b0ff088308a20d5191021edf912438fd71fb0c0 (diff) |
Merge branch 'purge-analytics-from-single-version-archives' into 'master'
Do not load any 3rd party analytics in single versions
See merge request gitlab-org/gitlab-docs!606
-rw-r--r-- | layouts/gtm.html | 2 | ||||
-rw-r--r-- | layouts/home.html | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/layouts/gtm.html b/layouts/gtm.html index 033a4728..65f242c4 100644 --- a/layouts/gtm.html +++ b/layouts/gtm.html @@ -1,4 +1,4 @@ -<% if ENV['NANOC_ENV'] == 'production' %> +<% if ENV['NANOC_ENV'] == 'production' and ENV['CI_COMMIT_REF_NAME'] == 'master' %> <%# Adds GTM only in production // leave this immediately after the opening the body tag%> <!-- Google Tag Manager (noscript) --> <noscript><iframe src="https://www.googletagmanager.com/ns.html?id=GTM-WZCXKT5" diff --git a/layouts/home.html b/layouts/home.html index f1d770be..9daafb06 100644 --- a/layouts/home.html +++ b/layouts/home.html @@ -24,7 +24,7 @@ <%= yield %> <%= render '/footer.*' %> <%= render '/docsearch.*' %> - <% if ENV['NANOC_ENV'] == 'production' %> + <% if ENV['NANOC_ENV'] == 'production' and ENV['CI_COMMIT_REF_NAME'] == 'master' %> <%# Add analytics only in production %> <%= render '/analytics.*' %> <% end %> |