Skip to content

Commit 5153044

Browse files
authored
remove google analytics previous tag + install google Tag Manager (#22)
* remove google analytics previous tag + install google Tag Manager * update `index.html`
1 parent 55924bf commit 5153044

File tree

1 file changed

+11
-9
lines changed

1 file changed

+11
-9
lines changed

public/index.html

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,13 @@
11
<!DOCTYPE html>
22
<html lang="en">
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-NPW9S2XF');</script>
10+
<!-- End Google Tag Manager -->
411
<meta charset="utf-8" />
512
<meta http-equiv="expires" content="0" />
613
<meta name="theme-color" content="#2D2D2D" />
@@ -32,17 +39,12 @@
3239
<!-- <link rel="icon" type="image/png" sizes="16x16" href="/favicon-16x16.png" /> -->
3340
<title>Open Science Lab</title>
3441
</head>
35-
<!-- Google tag (gtag.js) -->
36-
<script async src="https://www.googletagmanager.com/gtag/js?id=G-R9HWHJ5EVY"></script>
37-
<script>
38-
window.dataLayer = window.dataLayer || [];
39-
function gtag(){dataLayer.push(arguments);}
40-
gtag('js', new Date());
41-
42-
gtag('config', 'G-R9HWHJ5EVY');
43-
</script>
4442
<body>
4543
<noscript>You need to enable JavaScript to run this app.</noscript>
44+
<!-- Google Tag Manager (noscript) -->
45+
<noscript><iframe src="https://www.googletagmanager.com/ns.html?id=GTM-NPW9S2XF"
46+
height="0" width="0" style="display:none;visibility:hidden"></iframe></noscript>
47+
<!-- End Google Tag Manager (noscript) -->
4648
<div id="root"></div>
4749
</body>
4850
<script>

0 commit comments

Comments
 (0)