mirror of
https://github.com/seigler/dash-website
synced 2025-07-26 06:46:10 +00:00
Add analytics to site templates
This commit is contained in:
parent
feede8b615
commit
285ad0f6ca
4 changed files with 80 additions and 55 deletions
3
_includes/analytics-noscript.html
Normal file
3
_includes/analytics-noscript.html
Normal file
|
@ -0,0 +1,3 @@
|
|||
<noscript>
|
||||
<img src="https://analytics.dash.org/piwik.php?idsite=1&rec=1" style="border:0" alt="" />
|
||||
</noscript>
|
12
_includes/analytics-script.html
Normal file
12
_includes/analytics-script.html
Normal file
|
@ -0,0 +1,12 @@
|
|||
<script type="text/javascript">
|
||||
var _paq = _paq || [];
|
||||
_paq.push(['trackPageView']);
|
||||
_paq.push(['enableLinkTracking']);
|
||||
(function() {
|
||||
var u="//analytics.dash.org/";
|
||||
_paq.push(['setTrackerUrl', u+'piwik.php']);
|
||||
_paq.push(['setSiteId', '1']);
|
||||
var d=document, g=d.createElement('script'), s=d.getElementsByTagName('script')[0];
|
||||
g.type='text/javascript'; g.async=true; g.defer=true; g.src=u+'piwik.js'; s.parentNode.insertBefore(g,s);
|
||||
})();
|
||||
</script>
|
|
@ -1,41 +1,46 @@
|
|||
<!doctype html>
|
||||
<html lang="{{ site.lang }}">
|
||||
<head>
|
||||
{% include base.html %}
|
||||
<meta charset="UTF-8">
|
||||
<title>{% if page.title %}{% t page.title %} — {% endif %}Dash</title>
|
||||
<meta name="description" content="{% t page.description %}">
|
||||
<head>
|
||||
{% include base.html %}
|
||||
<meta charset="UTF-8">
|
||||
<title>{% if page.title %}{% t page.title %} — {% endif %}Dash</title>
|
||||
<meta name="description" content="{% t page.description %}">
|
||||
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no">
|
||||
|
||||
<link rel="icon" type="image/png" sizes="16x16" href="/assets/img/favicon/favicon-16x16.png">
|
||||
<link rel="icon" type="image/png" sizes="16x16" href="/assets/img/favicon/favicon-16x16.png">
|
||||
<link rel="alternate" type="application/rss+xml" title="Dash Blog" href="/rss/dash_blog_rss.xml">
|
||||
<meta name="msapplication-TileColor" content="#ffffff">
|
||||
<meta name="theme-color" content="#ffffff">
|
||||
<meta name="msapplication-TileColor" content="#ffffff">
|
||||
<meta name="theme-color" content="#ffffff">
|
||||
|
||||
<link rel="stylesheet" type="text/css" href="/dist/css/main.min.css">
|
||||
</head>
|
||||
<link rel="stylesheet" type="text/css" href="/dist/css/main.min.css">
|
||||
<!-- Analytics -->
|
||||
{% include analytics-script.html %}
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<body>
|
||||
|
||||
{{ content }}
|
||||
{{ content }}
|
||||
|
||||
<!-- Footer -->
|
||||
<footer class="footer">
|
||||
{% include footer.html %}
|
||||
</footer>
|
||||
<!-- Footer -->
|
||||
<footer class="footer">
|
||||
{% include footer.html %}
|
||||
</footer>
|
||||
|
||||
<!-- Mobile Nav -->
|
||||
<div class="overlay" id="overlay" data-js-overlay-menu>
|
||||
{% include nav-mobile.html %}
|
||||
</div>
|
||||
<!-- Mobile Nav -->
|
||||
<div class="overlay" id="overlay" data-js-overlay-menu>
|
||||
{% include nav-mobile.html %}
|
||||
</div>
|
||||
|
||||
<!-- JavaScript -->
|
||||
<script src="//cdn.jsdelivr.net/lodash/4.12.0/lodash.min.js" integrity="sha384-MYg5v6RiLsgqDiKOs6hcDXVblLg+Ls5F/jimSFosIUeDjW5VYViY1eMBMazbV5Mr" crossorigin="anonymous"></script>
|
||||
<script src="//cdnjs.cloudflare.com/ajax/libs/jquery/2.1.3/jquery.min.js" integrity="sha384-CgeP3wqr9h5YanePjYLENwCTSSEz42NJkbFpAFgHWQz7u3Zk8D00752ScNpXqGjS" crossorigin="anonymous"></script>
|
||||
<script src="//cdnjs.cloudflare.com/ajax/libs/jquery.matchHeight/0.7.0/jquery.matchHeight-min.js" integrity="sha384-dfOR5hjVOg6B2OvgyHIS71mJWX5TgNQeFGo5cNNVglSep7ZvYcByrpEya6xbwwyB" crossorigin="anonymous"></script>
|
||||
<script src="/dist/js/main.min.js"></script>
|
||||
{% include globals_js_data.html %}
|
||||
<!-- Fallback analytics -->
|
||||
{% include analytics-noscript.html %}
|
||||
|
||||
</body>
|
||||
<!-- JavaScript -->
|
||||
<script src="//cdn.jsdelivr.net/lodash/4.12.0/lodash.min.js" integrity="sha384-MYg5v6RiLsgqDiKOs6hcDXVblLg+Ls5F/jimSFosIUeDjW5VYViY1eMBMazbV5Mr" crossorigin="anonymous"></script>
|
||||
<script src="//cdnjs.cloudflare.com/ajax/libs/jquery/2.1.3/jquery.min.js" integrity="sha384-CgeP3wqr9h5YanePjYLENwCTSSEz42NJkbFpAFgHWQz7u3Zk8D00752ScNpXqGjS" crossorigin="anonymous"></script>
|
||||
<script src="//cdnjs.cloudflare.com/ajax/libs/jquery.matchHeight/0.7.0/jquery.matchHeight-min.js" integrity="sha384-dfOR5hjVOg6B2OvgyHIS71mJWX5TgNQeFGo5cNNVglSep7ZvYcByrpEya6xbwwyB" crossorigin="anonymous"></script>
|
||||
<script src="/dist/js/main.min.js"></script>
|
||||
{% include globals_js_data.html %}
|
||||
|
||||
</body>
|
||||
</html>
|
||||
|
|
|
@ -1,22 +1,24 @@
|
|||
<!doctype html>
|
||||
<html>
|
||||
<head>
|
||||
{% include base.html %}
|
||||
<meta charset="UTF-8">
|
||||
<title>{% if page.title %}{{ page.title }} — {% endif %}Dash</title>
|
||||
<meta name="description" content="{% t page.description %}">
|
||||
<head>
|
||||
{% include base.html %}
|
||||
<meta charset="UTF-8">
|
||||
<title>{% if page.title %}{{ page.title }} — {% endif %}Dash</title>
|
||||
<meta name="description" content="{% t page.description %}">
|
||||
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no">
|
||||
|
||||
<link rel="icon" type="image/png" sizes="16x16" href="/assets/img/favicon/favicon-16x16.png">
|
||||
<link rel="icon" type="image/png" sizes="16x16" href="/assets/img/favicon/favicon-16x16.png">
|
||||
<link rel="alternate" type="application/rss+xml" title="Dash Blog" href="/rss/dash_blog_rss.xml">
|
||||
<meta name="msapplication-TileColor" content="#ffffff">
|
||||
<meta name="theme-color" content="#ffffff">
|
||||
<meta name="msapplication-TileColor" content="#ffffff">
|
||||
<meta name="theme-color" content="#ffffff">
|
||||
|
||||
<link rel="stylesheet" type="text/css" href="/dist/css/main.min.css">
|
||||
</head>
|
||||
<link rel="stylesheet" type="text/css" href="/dist/css/main.min.css">
|
||||
<!-- Analytics -->
|
||||
{% include analytics-script.html %}
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<body>
|
||||
|
||||
{% include hero/post.html %}
|
||||
|
||||
|
@ -59,23 +61,26 @@
|
|||
|
||||
</div>
|
||||
|
||||
<!-- Footer -->
|
||||
<footer class="footer">
|
||||
{% include footer.html %}
|
||||
</footer>
|
||||
<!-- Footer -->
|
||||
<footer class="footer">
|
||||
{% include footer.html %}
|
||||
</footer>
|
||||
|
||||
<!-- Mobile Nav -->
|
||||
<div class="overlay" id="overlay" data-js-overlay-menu>
|
||||
<a href="/"><img src="/assets/img/logo-white.png" alt="Dash" class="logo"></a>
|
||||
{% include nav-mobile.html %}
|
||||
</div>
|
||||
<!-- Mobile Nav -->
|
||||
<div class="overlay" id="overlay" data-js-overlay-menu>
|
||||
<a href="/"><img src="/assets/img/logo-white.png" alt="Dash" class="logo"></a>
|
||||
{% include nav-mobile.html %}
|
||||
</div>
|
||||
|
||||
<!-- JavaScript -->
|
||||
<script src="//cdn.jsdelivr.net/lodash/4.12.0/lodash.min.js" integrity="sha384-MYg5v6RiLsgqDiKOs6hcDXVblLg+Ls5F/jimSFosIUeDjW5VYViY1eMBMazbV5Mr" crossorigin="anonymous"></script>
|
||||
<script src="//cdnjs.cloudflare.com/ajax/libs/jquery/2.1.3/jquery.min.js" integrity="sha384-CgeP3wqr9h5YanePjYLENwCTSSEz42NJkbFpAFgHWQz7u3Zk8D00752ScNpXqGjS" crossorigin="anonymous"></script>
|
||||
<script src="//cdnjs.cloudflare.com/ajax/libs/jquery.matchHeight/0.7.0/jquery.matchHeight-min.js" integrity="sha384-dfOR5hjVOg6B2OvgyHIS71mJWX5TgNQeFGo5cNNVglSep7ZvYcByrpEya6xbwwyB" crossorigin="anonymous"></script>
|
||||
<script src="/dist/js/main.min.js"></script>
|
||||
<!-- Fallback analytics -->
|
||||
{% include analytics-noscript.html %}
|
||||
|
||||
<!-- JavaScript -->
|
||||
<script src="//cdn.jsdelivr.net/lodash/4.12.0/lodash.min.js" integrity="sha384-MYg5v6RiLsgqDiKOs6hcDXVblLg+Ls5F/jimSFosIUeDjW5VYViY1eMBMazbV5Mr" crossorigin="anonymous"></script>
|
||||
<script src="//cdnjs.cloudflare.com/ajax/libs/jquery/2.1.3/jquery.min.js" integrity="sha384-CgeP3wqr9h5YanePjYLENwCTSSEz42NJkbFpAFgHWQz7u3Zk8D00752ScNpXqGjS" crossorigin="anonymous"></script>
|
||||
<script src="//cdnjs.cloudflare.com/ajax/libs/jquery.matchHeight/0.7.0/jquery.matchHeight-min.js" integrity="sha384-dfOR5hjVOg6B2OvgyHIS71mJWX5TgNQeFGo5cNNVglSep7ZvYcByrpEya6xbwwyB" crossorigin="anonymous"></script>
|
||||
<script src="/dist/js/main.min.js"></script>
|
||||
{% include globals_js_data.html %}
|
||||
|
||||
</body>
|
||||
</body>
|
||||
</html>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue