Skip to content

Commit 8c1584f

Browse files
authored
Switch to use of gtag.js library for analytics (#2207)
Signed-off-by: Patrice Chalin <[email protected]> Signed-off-by: Patrice Chalin <[email protected]>
1 parent e0cb9b8 commit 8c1584f

File tree

1 file changed

+6
-7
lines changed

1 file changed

+6
-7
lines changed

layouts/footer.html

+6-7
Original file line numberDiff line numberDiff line change
@@ -6,15 +6,14 @@
66
<script src="/assets/docs.js"></script>
77
<!-- IE10 viewport hack for Surface/desktop Windows 8 bug -->
88
<script src="/assets/ie10-viewport-bug-workaround.js"></script>
9-
<!-- Google Analytics -->
9+
<!-- Global site tag (gtag.js) - Google Analytics -->
10+
<script async src="https://www.googletagmanager.com/gtag/js?id=UA-58468480-1"></script>
1011
<script>
11-
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
12-
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
13-
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
14-
})(window,document,'script','//www.google-analytics.com/analytics.js','ga');
12+
window.dataLayer = window.dataLayer || [];
13+
function gtag(){dataLayer.push(arguments);}
14+
gtag('js', new Date());
1515

16-
ga('create', 'UA-58468480-1', 'auto');
17-
ga('send', 'pageview');
16+
gtag('config', 'UA-58468480-1');
1817
</script>
1918

2019
<!-- Algolia Docsearch -->

0 commit comments

Comments
 (0)