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:55 +0300
commit059e2b8f110beffe21b4159f29443c11bdf451d8 (patch)
tree6013e499528a863d506360c9d5b45f64dde5d0cc
parenta14243228ac5320573676626698592013fe14367 (diff)
Do not load any 3rd party analytics in single versions11.2
-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>