Skip to content

Commit f74e574

Browse files
authored
Merge pull request #134 from javaevolved/brunoborges-patch-gtm-1
Integrate Google Tag Manager into index.html
2 parents ff0cfbd + 51d9de3 commit f74e574

File tree

1 file changed

+12
-1
lines changed

1 file changed

+12
-1
lines changed

templates/index.html

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,13 @@
11
<!DOCTYPE html>
22
<html lang="{{locale}}" dir="{{htmlDir}}">
33
<head>
4+
<!-- Google Tag Manager -->
5+
<script>(function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start':
6+
new Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0],
7+
j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src=
8+
'https://www.googletagmanager.com/gtm.js?id='+i+dl;f.parentNode.insertBefore(j,f);
9+
})(window,document,'script','dataLayer','GTM-PCJH3L75');</script>
10+
<!-- End Google Tag Manager -->
411
<meta charset="UTF-8">
512
<meta name="viewport" content="width=device-width, initial-scale=1.0">
613
<title>java.evolved Code Snippets | java.evolved</title>
@@ -169,6 +176,10 @@
169176
</script>
170177
</head>
171178
<body data-page="home">
179+
<!-- Google Tag Manager (noscript) -->
180+
<noscript><iframe src="https://www.googletagmanager.com/ns.html?id=GTM-PCJH3L75"
181+
height="0" width="0" style="display:none;visibility:hidden"></iframe></noscript>
182+
<!-- End Google Tag Manager (noscript) -->
172183
<nav>
173184
<div class="nav-inner">
174185
<a href="{{homeUrl}}" class="logo">java.<span>evolved</span></a>
@@ -323,4 +334,4 @@ <h2 class="section-title">{{site.allComparisons}}</h2>
323334
{{i18nScript}}
324335
<script src="{{indexBasePrefix}}app.js"></script>
325336
</body>
326-
</html>
337+
</html>

0 commit comments

Comments
 (0)