Add the inevitable Google Analytics tracking
This commit is contained in:
Родитель
4c7b9e13ed
Коммит
dc37309d0d
|
@ -11,3 +11,4 @@ logo_url = "//worldwidetelescope.org/home"
|
|||
github_url = "//github.com/WorldWideTelescope/worldwide-telescope-docs-hub"
|
||||
twitter_url = "https://twitter.com/wwtelescope"
|
||||
facebook_url = "https://facebook.com/wwtelescope"
|
||||
google_analytics_id = "UA-107473046-3"
|
||||
|
|
|
@ -35,6 +35,17 @@
|
|||
<meta name="msapplication-TileImage" content="ms-icon-144x144.png">
|
||||
<meta name="theme-color" content="#ffffff">
|
||||
<!-- end of favicons -->
|
||||
|
||||
{% if config.extra.google_analytics_id %}
|
||||
<script async src="https://www.googletagmanager.com/gtag/js?id={{ config.extra.google_analytics_id }}"></script>
|
||||
<script>
|
||||
window.dataLayer = window.dataLayer || [];
|
||||
function gtag(){dataLayer.push(arguments);}
|
||||
gtag('js', new Date());
|
||||
gtag('config', '{{ config.extra.google_analytics_id }}');
|
||||
</script>
|
||||
{% endif %}
|
||||
|
||||
<link rel="stylesheet" href="{{ rel_top ~ 'assets/fontawesome.min.css' | safe }}">
|
||||
<link rel="stylesheet" href="{{ rel_top ~ 'style.css' | safe }}">
|
||||
<!--[if IE]> <script src="http://html5shiv.googlecode.com/svn/trunk/html5.js"></script><![endif]-->
|
||||
|
|
Загрузка…
Ссылка в новой задаче