21305: Add piwik and google analytics tracking to layout
[arvados.git] / doc / _layouts / default.html.liquid
1 {% comment %}
2 Copyright (C) The Arvados Authors. All rights reserved.
3
4 SPDX-License-Identifier: CC-BY-SA-3.0
5 {% endcomment %}
6
7 <!DOCTYPE html>
8 <html>
9   <head>
10     <meta charset="utf-8">
11     <title>{% unless page.title == "Arvados | Documentation" %} Arvados {% if page.navmenu %}| {{ page.navmenu }} {% endif %} | {% endunless %}{{ page.title }}</title>
12     <meta name="viewport" content="width=device-width, initial-scale=1.0">
13     <meta name="description" content="Arvados documentation site">
14     <meta name="author" content="Arvados authors">
15     {% if site.current_version != site.latest_version %}
16     <meta name="robots" content="noindex">
17     {% endif %}
18     <link rel="icon" href="{{ site.baseurl }}/images/favicon.ico" type="image/x-icon">
19     <link rel="shortcut icon" href="{{ site.baseurl }}/images/favicon.ico" type="image/x-icon">
20     <link href="{{ site.baseurl }}/css/bootstrap.css" rel="stylesheet">
21     <link href="{{ site.baseurl }}/css/nav-list.css" rel="stylesheet">
22     <link href="{{ site.baseurl }}/css/badges.css" rel="stylesheet">
23     <link href="{{ site.baseurl }}/css/code.css" rel="stylesheet">
24     <link href="{{ site.baseurl }}/css/font-awesome.css" rel="stylesheet">
25     <link href="{{ site.baseurl }}/css/carousel-override.css" rel="stylesheet">
26     <link href="{{ site.baseurl }}/css/button-override.css" rel="stylesheet">
27     <link href="{{ site.baseurl }}/css/images.css" rel="stylesheet">
28     <link href="{{ site.baseurl }}/css/layout.css" rel="stylesheet">
29     <script src="{{ site.baseurl }}/js/jquery.min.js"></script>
30     <script src="{{ site.baseurl }}/js/bootstrap.min.js"></script>
31     <script src="https://hypothes.is/embed.js" async></script>
32
33     <!-- Global site tag (gtag.js) - Google Analytics -->
34     <script async src="https://www.googletagmanager.com/gtag/js?id=G-EFLSBXJ5SQ"></script>
35     <script>
36       window.dataLayer = window.dataLayer || [];
37       function gtag(){dataLayer.push(arguments);}
38       gtag('js', new Date());
39
40       gtag('config', 'G-EFLSBXJ5SQ');
41     </script>
42   </head>
43   <body class="nopad">
44     {% include 'navbar_top' %}
45
46     {% if page.navsection == 'top' or page.no_nav_left %}
47     {{ content }}
48     {% else %}
49
50     <div class="container-fluid" style="padding-right: 30px">
51
52       <div class="row">
53         {% include 'navbar_left' %}
54         <div class="col-sm-9">
55           <h1>{{ page.title }}</h1>
56           {{ content }}
57           {% include 'webring' %}
58         </div>
59       </div>
60
61       <div style="height: 2em"></div>
62
63     </div>
64     {% endif %}
65
66 {% if page.no_nav_left %}
67 {% else %}
68 <p style="text-align: center"><small>
69 The content of this documentation is licensed under the
70 <a href="{{ site.baseurl }}/user/copying/by-sa-3.0.html">Creative
71   Commons Attribution-Share Alike 3.0 United States</a> licence.<br>
72 Code samples in this documentation are licensed under the
73 <a href="{{ site.baseurl }}/user/copying/LICENSE-2.0.html">Apache License, Version 2.0.</a></small>
74 </p>
75 {% endif %}
76
77 <!-- Piwik -->
78 <script type="text/javascript">
79   var _paq = _paq || [];
80   _paq.push(["trackPageView"]);
81   _paq.push(["enableLinkTracking"]);
82
83   (function() {
84     var u=(("https:" == document.location.protocol) ? "https" : "http") + "://piwik.arvados.org/";
85     _paq.push(["setTrackerUrl", u+"piwik.php"]);
86     _paq.push(["setSiteId", "3"]);
87     var d=document, g=d.createElement("script"), s=d.getElementsByTagName("script")[0]; g.type="text/javascript";
88     g.defer=true; g.async=true; g.src=u+"piwik.js"; s.parentNode.insertBefore(g,s);
89   })();
90 </script>
91 <!-- End Piwik Code -->
92
93 <!-- Google Analytics -->
94 <script>
95   (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
96   (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
97   m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
98   })(window,document,'script','//www.google-analytics.com/analytics.js','ga');
99
100   ga('create', 'UA-40055979-2', 'auto');
101   ga('send', 'pageview');
102
103 </script>
104 <!-- End Google Analytics -->
105
106   </body>
107 </html>