Skip to content

Commit b19702b

Browse files
committed
🔧 config google tag manager
1 parent acb868a commit b19702b

File tree

1 file changed

+16
-9
lines changed

1 file changed

+16
-9
lines changed

index.html

Lines changed: 16 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -125,18 +125,25 @@
125125
}
126126
}
127127
</style>
128-
<!-- Google tag (gtag.js) -->
129-
<script async src="https://www.googletagmanager.com/gtag/js?id=G-9Q4R8ZVVQH"></script>
130-
<script>
131-
window.dataLayer = window.dataLayer || []
132-
function gtag() { dataLayer.push(arguments) }
133-
gtag('js', new Date())
134-
135-
gtag('config', 'G-9Q4R8ZVVQH')
136-
</script>
128+
<!-- Google Tag Manager -->
129+
<script>(function (w, d, s, l, i) {
130+
w[l] = w[l] || []; w[l].push({
131+
'gtm.start':
132+
new Date().getTime(),
133+
'event': 'gtm.js',
134+
}); const f = d.getElementsByTagName(s)[0]
135+
const j = d.createElement(s); const dl = l != 'dataLayer' ? `&l=${l}` : ''; j.async = true; j.src
136+
= `https://www.googletagmanager.com/gtm.js?id=${i}${dl}`; f.parentNode.insertBefore(j, f)
137+
})(window, document, 'script', 'dataLayer', 'GTM-WBTQRDWN')
138+
</script>
139+
<!-- End Google Tag Manager -->
137140
</head>
138141

139142
<body class="font-sans">
143+
<!-- Google Tag Manager (noscript) -->
144+
<noscript><iframe src="https://www.googletagmanager.com/ns.html?id=GTM-WBTQRDWN" height="0" width="0"
145+
style="display:none;visibility:hidden"></iframe></noscript>
146+
<!-- End Google Tag Manager (noscript) -->
140147
<div id="app">
141148
<div class="preloader">
142149
<div class="loader"></div>

0 commit comments

Comments
 (0)