Skip to content

Commit afe23b1

Browse files
authored
Merge pull request #5567 from segmentio/update-gtm
Update Google Tag Manager
2 parents a4ad188 + 8b35040 commit afe23b1

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

src/_layouts/default.html

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,14 @@
2626
<!-- {{page.layout}} -->
2727
<html lang="{{ page.lang | default: site.lang | default: "en" }}">
2828
<head>
29+
<!-- Google Tag Manager -->
30+
<script>(function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start':
31+
new Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0],
32+
j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src=
33+
'https://www.googletagmanager.com/gtm.js?id='+i+dl;f.parentNode.insertBefore(j,f);
34+
})(window,document,'script','dataLayer','GTM-NWFH9R');</script>
35+
<!-- End Google Tag Manager -->
36+
2937
<base href="{{ basehref }}" />
3038
<title> {{page.title}} | Segment Documentation</title>
3139
<meta name="google-site-verification" content="I5QdtZs88X7r-YLPogE9bzdouqud3IPONxht2CBFIOQ" />
@@ -81,6 +89,11 @@
8189
<link rel="stylesheet" href="{{ '/assets/algolia.css' | relative_url }}">
8290
</head>
8391
<body>
92+
<!-- Google Tag Manager (noscript) -->
93+
<noscript><iframe src="https://www.googletagmanager.com/ns.html?id=GTM-NWFH9R"
94+
height="0" width="0" style="display:none;visibility:hidden"></iframe></noscript>
95+
<!-- End Google Tag Manager (noscript) -->
96+
8497
<a href="#{{ page.title | remove:':' | remove:'?' | remove:'(' | remove:')' | remove:',' | remove:'&' | replace:"'", "-"| replace:'.', '-' | downcase | split:' ' | join:"-" }}" class="skiplink">Skip to main content</a>
8598
<div id="consent-manager"></div>
8699
{{ content }}

0 commit comments

Comments
 (0)