Skip to content

Commit c39b886

Browse files
Disable cookie consent pop-up in non-production environments
1 parent 659957a commit c39b886

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

src/current/_includes/google_tag_manager.html

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,14 @@
11
<!-- Google Tag Manager -->
2-
<script>(function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start':
2+
<script>
3+
if (window.location.hostname == 'cockroachlabs.com') {
4+
(function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start':
35
new Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0],
46
j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src=
57
'https://www.googletagmanager.com/gtm.js?id='+i+dl;f.parentNode.insertBefore(j,f);
6-
})(window,document,'script','dataLayer','GTM-NR8LC4');</script>
7-
<!-- End Google Tag Manager -->
8+
})(window,document,'script','dataLayer','GTM-NR8LC4');
9+
}
10+
</script>
11+
<!-- End Google Tag Manager -->
812
<!-- Google Tag Manager (noscript) -->
913
<noscript><iframe src="https://www.googletagmanager.com/ns.html?id=GTM-NR8LC4"
1014
height="0" width="0" style="display:none;visibility:hidden"></iframe></noscript>

0 commit comments

Comments
 (0)