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:
authorAnkit Panchal <apanchal@gitlab.com>2023-10-17 03:32:09 +0300
committerAsh McKenzie <amckenzie@gitlab.com>2023-10-17 03:32:09 +0300
commitd3c532d4390ca9396de3089ab4af951adf6eb45a (patch)
tree2fa7f3dbb893c2fe81b887e8ea508416b5611cd5 /layouts
parent171be11eab7b251fdb259a034071ec83d2ecc4d5 (diff)
Onboard docs site (docs.gitlab.com) to Product Analytics
Diffstat (limited to 'layouts')
-rw-r--r--layouts/head.html10
1 files changed, 10 insertions, 0 deletions
diff --git a/layouts/head.html b/layouts/head.html
index 758ae022..002c0516 100644
--- a/layouts/head.html
+++ b/layouts/head.html
@@ -85,3 +85,13 @@
<link rel="apple-touch-icon" href="/assets/images/apple-touch-icon.png?v=2">
<link rel="manifest" href="/assets/manifests/site.webmanifest">
<meta name="theme-color" content="#FC6D26">
+
+<% if gitlab_analytics_enabled? %>
+ <script src="https://cdn.jsdelivr.net/npm/@gitlab/application-sdk-browser@0.2.8/dist/gl-sdk.min.js"></script>
+ <script>
+ window.glClient = window.glSDK.glClientSDK(<%= gitlab_analytics_json %>);
+
+ window.glClient?.page();
+ </script>
+
+<% end %>