Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-docs.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAchilleas Pipinellis <axil@gitlab.com>2019-10-25 10:17:26 +0300
committerAchilleas Pipinellis <axil@gitlab.com>2019-10-25 14:19:23 +0300
commit475b224be4882b22067b2ec974c2cc7a2df20e86 (patch)
tree3a775f8bab6447d64140e77f73ed9a8b96637e23
parent2d8d2774cdc240c4ab01232f4880d530675cdfde (diff)
Do not load any 3rd party analytics in single versions11.3
-rw-r--r--layouts/gtm.html2
-rw-r--r--layouts/home.html5
2 files changed, 5 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 73c26cbd..9daafb06 100644
--- a/layouts/home.html
+++ b/layouts/home.html
@@ -24,7 +24,10 @@
<%= yield %>
<%= render '/footer.*' %>
<%= render '/docsearch.*' %>
- <%= render '/analytics.*' %>
+ <% if ENV['NANOC_ENV'] == 'production' and ENV['CI_COMMIT_REF_NAME'] == 'master' %>
+ <%# Add analytics only in production %>
+ <%= render '/analytics.*' %>
+ <% end %>
<%= render '/https_redirect.*' %>
<%= render '/schema-microdata.*' %>
</body>