Skip to content

Commit 3b40027

Browse files
authored
Update Google Analytics to GA4
1 parent 7f1ebd7 commit 3b40027

1 file changed

Lines changed: 7 additions & 10 deletions

File tree

layouts/partials/footer.html

Lines changed: 7 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -86,15 +86,12 @@
8686
</script>
8787

8888
<!-- Google Analytics compliant with GDPR -->
89+
<script async src="https://www.googletagmanager.com/gtag/js?id=G-H7179Q3Y3T"></script>
8990
<script>
90-
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
91-
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
92-
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
93-
})(window,document,'script','https://www.google-analytics.com/analytics.js','ga');
94-
ga('create', 'UA-186978221-1', {
95-
'storage': 'none'
96-
});
97-
ga('set', 'anonymizeIp', true);
98-
ga('send', 'pageview');
91+
window.dataLayer = window.dataLayer || [];
92+
function gtag(){dataLayer.push(arguments);}
93+
gtag('js', new Date());
94+
95+
gtag('config', 'G-H7179Q3Y3T');
9996
</script>
100-
<!-- End Google Analytics -->
97+
<!-- End Google Analytics -->

0 commit comments

Comments
 (0)