diff options
| author | Yong He <yonghe@outlook.com> | 2024-10-30 10:02:59 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-10-30 10:02:59 -0700 |
| commit | 368c2d6eb4c5049dccc1291d3350b4539cdd3c85 (patch) | |
| tree | 2424e26c18419402623530eec4e845cb47329111 /docs/_layouts | |
| parent | 521df4f089bf6f07c1710cd13ba97e27df8f661a (diff) | |
Add google analytics. (#5438)
Diffstat (limited to 'docs/_layouts')
| -rw-r--r-- | docs/_layouts/user-guide.html | 20 |
1 files changed, 7 insertions, 13 deletions
diff --git a/docs/_layouts/user-guide.html b/docs/_layouts/user-guide.html index b9a387686..c32e5def6 100644 --- a/docs/_layouts/user-guide.html +++ b/docs/_layouts/user-guide.html @@ -7,6 +7,13 @@ <meta http-equiv="X-UA-Compatible" content="IE=edge"> <link rel="stylesheet" href="{{ '/assets/css/style.css?v=' | append: site.github.build_revision | relative_url }}"> <link rel="stylesheet" type="text/css" href="{{ '/assets/css/print.css' | relative_url }}" media="print"> + <script async src="https://www.googletagmanager.com/gtag/js?id=G-TMTZVLLMBP"></script> + <script> + window.dataLayer = window.dataLayer || []; + function gtag(){dataLayer.push(arguments);} + gtag('js', new Date()); + gtag('config', 'G-TMTZVLLMBP'); + </script> <!--[if lt IE 9]> <script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script> <![endif]--> @@ -407,19 +414,6 @@ }); </script> <script id="MathJax-script" async src="https://cdn.jsdelivr.net/npm/mathjax@3/es5/tex-mml-chtml.js"></script> - - {% if site.google_analytics %} - <script> - (function (i, s, o, g, r, a, m) { - i['GoogleAnalyticsObject'] = r; i[r] = i[r] || function () { - (i[r].q = i[r].q || []).push(arguments) - }, i[r].l = 1 * new Date(); a = s.createElement(o), - m = s.getElementsByTagName(o)[0]; a.async = 1; a.src = g; m.parentNode.insertBefore(a, m) - })(window, document, 'script', '//www.google-analytics.com/analytics.js', 'ga'); - ga('create', '{{ site.google_analytics }}', 'auto'); - ga('send', 'pageview'); - </script> - {% endif %} </body> </html>
\ No newline at end of file |
