Skip to content

Commit 9f6ae7b

Browse files
committed
update tag for google analytics: use gtag
1 parent bcf5f15 commit 9f6ae7b

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

_includes/google-analytics.html

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1+
<!-- Global site tag (gtag.js) - Google Analytics -->
2+
<script async src="https://www.googletagmanager.com/gtag/js?id=UA-85527418-1"></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');
4+
window.dataLayer = window.dataLayer || [];
5+
function gtag(){dataLayer.push(arguments);}
6+
gtag('js', new Date());
67

7-
ga('create', 'UA-85527418-1', 'auto');
8-
ga('send', 'pageview');
8+
gtag('config', 'UA-85527418-1');
99
</script>

0 commit comments

Comments
 (0)