Skip to content

Commit 20a922c

Browse files
committed
switch to gtag.js for Google Analytics
1 parent 4a423da commit 20a922c

File tree

1 file changed

+6
-7
lines changed

1 file changed

+6
-7
lines changed

_includes/google-analytics.html

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,9 @@
1+
<!-- Global site tag (gtag.js) - Google Analytics -->
2+
<script async src="https://www.googletagmanager.com/gtag/js?id=UA-85527418-4"></script>
13
<script>
2-
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
3-
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
4-
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
5-
})(window,document,'script','https://www.google-analytics.com/analytics.js','ga');
6-
7-
ga('create', 'UA-85527418-4', 'auto');
8-
ga('send', 'pageview');
4+
window.dataLayer = window.dataLayer || [];
5+
function gtag(){dataLayer.push(arguments);}
6+
gtag('js', new Date());
97

8+
gtag('config', 'UA-85527418-4');
109
</script>

0 commit comments

Comments
 (0)