Skip to content

Commit 8f3d392

Browse files
authored
✨📝 (default.html): integrate Google Tag Manager and remove old Google… (#2552)
… Analytics script Integrate Google Tag Manager (GTM) to enhance tracking and analytics capabilities. GTM provides a more flexible and powerful way to manage tags and scripts. The old Google Analytics script is removed to avoid redundancy and potential conflicts. This change aims to streamline analytics management and improve data collection efficiency.
2 parents 5451700 + 5a70e5a commit 8f3d392

File tree

1 file changed

+20
-14
lines changed

1 file changed

+20
-14
lines changed

docs/_layouts/default.html

Lines changed: 20 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,14 @@
22
<html lang="en">
33
<head>
44
<meta charset="utf-8">
5+
<!-- Google Tag Manager -->
6+
<script>
7+
(function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start':
8+
new Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0],
9+
j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src=
10+
'https://www.googletagmanager.com/gtm.js?id='+i+dl;f.parentNode.insertBefore(j,f);
11+
})(window,document,'script','dataLayer','GTM-WRVT65');</script>
12+
<!-- End Google Tag Manager -->
513
{% seo %}
614
<link rel="canonical" href="{{site.cannonicalBase}}{{page.url}}" />
715
<meta name="giscus:backlink" content="{{site.cannonicalBase}}{{page.url}}">
@@ -10,22 +18,19 @@
1018
<script src="https://kit.fontawesome.com/3e6b2f4808.js" crossorigin="anonymous"></script>
1119
<link rel="stylesheet" href="{{site.baseurl}}/assets/css/main.css">
1220
<link href="{{site.baseurl}}/assets/css/base16.css" rel="stylesheet" />
13-
<!-- Google tag (gtag.js) -->
14-
<script async src="https://www.googletagmanager.com/gtag/js?id=G-44XG57BE28"></script>
15-
<script>
16-
window.dataLayer = window.dataLayer || [];
17-
function gtag() { dataLayer.push(arguments); }
18-
gtag('js', new Date());
19-
gtag('config', 'G-44XG57BE28');
20-
21-
</script>
2221
</head>
2322
<body>
24-
{%- include header.html -%}
23+
<!-- Google Tag Manager (noscript) -->
24+
<noscript>
25+
<iframe src="https://www.googletagmanager.com/ns.html?id=GTM-WRVT65"
26+
height="0" width="0" style="display:none;visibility:hidden"></iframe>
27+
</noscript>
28+
<!-- End Google Tag Manager (noscript) -->
29+
{%- include header.html -%}
2530
<div class="mainContainer">
2631
<div class="container-flow mt-5 m-5 d-flex mb-3">
2732
<div class="p-2 justify-content-end d-none d-lg-block">
28-
{%- include sidebar.html -%}
33+
{%- include sidebar.html -%}
2934
</div>
3035
<div class="p-2 flex-grow-1">
3136
<article>
@@ -84,11 +89,12 @@
8489
</li>
8590
<li class="list-group-item">
8691
<i class="fab fa-twitter"></i>
87-
<a href="https://preview.nkdagility.com/learn/azure-devops-migration-tools{{page.url}}" rel="nofollow noindex" class="ml-2" target="_blank">Preview</a> (<a href="https://blue-river-093197403-preview.westeurope.5.azurestaticapps.net{{page.url}}" rel="nofollow noindex" class="ml-2" target="_blank">without AFD</a>)</li>
92+
<a href="https://preview.nkdagility.com/learn/azure-devops-migration-tools{{page.url}}" rel="nofollow noindex" class="ml-2" target="_blank">Preview</a> (<a href="https://blue-river-093197403-preview.westeurope.5.azurestaticapps.net{{page.url}}" rel="nofollow noindex" class="ml-2" target="_blank">without AFD</a>)
93+
</li>
8894
</ul>
8995
</li>
9096
</ul>
91-
97+
9298
</div>
9399
</div>
94100
<div class="card mb-3">
@@ -137,7 +143,7 @@ <h5 class="no_toc card-header">In this article</h5>
137143

138144
</div>
139145
</div>
140-
{%- include footer.html -%}
146+
{%- include footer.html -%}
141147
</body>
142148
</html>
143149

0 commit comments

Comments
 (0)