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:08:09 +0300
commit23b4335510557730b16dfddcd21b4f1adc711b31 (patch)
treedc7624d7408f7bb74bd3757c5c86e67078d8842a
parent8f04de95837949bb87438410c4a84be55f5e3f62 (diff)
Do not load any 3rd party analytics in single versions
-rw-r--r--layouts/gtm.html2
-rw-r--r--layouts/home.html2
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 %>