Skip to content

Commit 71b5adc

Browse files
authored
Update GA4
1 parent b0e6276 commit 71b5adc

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

_includes/head.html

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -43,14 +43,14 @@
4343
<script src="https://oss.maxcdn.com/libs/html5shiv/3.7.0/html5shiv.js"></script>
4444
<script src="https://oss.maxcdn.com/libs/respond.js/1.4.2/respond.min.js"></script>
4545
<![endif]-->
46+
<!-- Google tag (gtag.js) -->
47+
<script async src="https://www.googletagmanager.com/gtag/js?id=G-EKJTG010WH"></script>
4648
<script>
47-
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
48-
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
49-
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
50-
})(window,document,'script','//www.google-analytics.com/analytics.js','ga');
49+
window.dataLayer = window.dataLayer || [];
50+
function gtag(){dataLayer.push(arguments);}
51+
gtag('js', new Date());
5152

52-
ga('create', 'UA-79149977-3', 'www.librenms.org');
53-
ga('send', 'pageview', location.pathname+location.search+location.hash);
53+
gtag('config', 'G-EKJTG010WH');
5454
</script>
5555
<script src="https://cdn.jsdelivr.net/npm/[email protected]/src/arrive.min.js"></script>
5656
<script src="https://code.jquery.com/jquery-2.1.3.min.js"></script>

0 commit comments

Comments
 (0)