Skip to content

Commit 9fd20c5

Browse files
committed
Update Google Analytics to Version 4
inclulde new tags
1 parent 619b23d commit 9fd20c5

File tree

2 files changed

+13
-3
lines changed

2 files changed

+13
-3
lines changed

_includes/google-analytics.html

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,4 +8,3 @@
88
ga('send', 'pageview');
99

1010
</script>
11-

_includes/script.html

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
<script src="{{ "js/materialize.min.js" | relative_url }}"></script>
44
<script src="{{ "js/init.js" | relative_url }}"></script>
55

6-
<!-- Google Analytics -->
6+
<!-- Google Analytics old
77
<script>
88
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
99
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
@@ -12,4 +12,15 @@
1212
ga('create', 'UA-22761082-2', 'auto');
1313
ga('send', 'pageview');
1414
</script>
15-
<!-- /Analytics -->
15+
/Analytics -->
16+
17+
// new Google Analytics Version 4
18+
<!-- Google tag (gtag.js) -->
19+
<script async src="https://www.googletagmanager.com/gtag/js?id=G-9PCRP59Q7L"></script>
20+
<script>
21+
window.dataLayer = window.dataLayer || [];
22+
function gtag(){dataLayer.push(arguments);}
23+
gtag('js', new Date());
24+
25+
gtag('config', 'G-9PCRP59Q7L');
26+
</script>

0 commit comments

Comments
 (0)