We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 35d75d7 commit d8efa7cCopy full SHA for d8efa7c
src/components/GoogleAnalytics.astro
@@ -1,15 +1,11 @@
1
----
2
-const GA_ID = 'G-1X5E9W6VJ2';
3
4
-{GA_ID && (
5
- <>
6
- <!-- Google tag (gtag.js) -->
7
- <script is:inline async src={`https://www.googletagmanager.com/gtag/js?id=${GA_ID}`}></script>
8
- <script is:inline>
9
- {`window.dataLayer = window.dataLayer || [];
10
-function gtag(){dataLayer.push(arguments);}
11
-gtag('js', new Date());
12
-gtag('config', '${GA_ID}');`}
13
- </script>
14
- </>
15
-)}
+<script>
+<!-- Google tag (gtag.js) -->
+<script async src="https://www.googletagmanager.com/gtag/js?id=G-1X5E9W6VJ2"></script>
+ window.dataLayer = window.dataLayer || [];
+ function gtag(){dataLayer.push(arguments);}
+ gtag('js', new Date());
+
+ gtag('config', 'G-1X5E9W6VJ2');
+</script>
0 commit comments