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:11:07 +0300
commit8215a5712a40aec1d371d46602203bdbe2ba936e (patch)
tree08310ae29d6d522a5effaa8b0d1c4e7c46fc9e4b
parent7491a6afec3e424f160efff96f775ba63741b21e (diff)
Do not load any 3rd party analytics in single versions11.9
-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>