header analytics

This commit is contained in:
2022-04-10 14:31:54 -04:00
parent 172d3f4672
commit 17555a6c6d
2 changed files with 15 additions and 2 deletions

View File

@@ -13,7 +13,15 @@
--> -->
<link rel="manifest" href="%PUBLIC_URL%/manifest.json" /> <link rel="manifest" href="%PUBLIC_URL%/manifest.json" />
<link rel="stylesheet" href="/path/to/flickity.css" media="screen"> <!-- Global site tag (gtag.js) - Google Analytics -->
<script async src="https://www.googletagmanager.com/gtag/js?id=G-E2V93W9CNV"></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag() { dataLayer.push(arguments); }
gtag('js', new Date());
gtag('config', 'G-E2V93W9CNV');
</script>
<title>Simonson - Portfolio</title> <title>Simonson - Portfolio</title>
</head> </head>
@@ -21,7 +29,6 @@
<body> <body>
<noscript>You need to enable JavaScript to run this app.</noscript> <noscript>You need to enable JavaScript to run this app.</noscript>
<div id="root"></div> <div id="root"></div>
<script src="/path/to/flickity.pkgd.min.js"></script>
</body> </body>
</html> </html>

6
src/analytics.js Normal file
View File

@@ -0,0 +1,6 @@
window.dataLayer = window.dataLayer || [];
function gtag() { dataLayer.push(arguments); }
gtag('js', new Date());
gtag('config', 'G-E2V93W9CNV');
console.log("HHHHHHHHHHHHHH")