Add google analytics

This commit is contained in:
Adam Schmideg 2019-01-21 12:36:05 +01:00
parent f810d93caa
commit 111934558e
2 changed files with 17 additions and 0 deletions

View file

@ -5,6 +5,8 @@ exclude:
- Gemfile.lock - Gemfile.lock
- .gitignore - .gitignore
google_analytics: UA-131485733-1
defaults: defaults:
- -
scope: scope:

View file

@ -4,6 +4,21 @@
<meta name="viewport" content="width=device-width, initial-scale=1"> <meta name="viewport" content="width=device-width, initial-scale=1">
<title>Go Ethereum</title> <title>Go Ethereum</title>
{% if site.google_analytics %}
<!-- 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', 'https://www.google-analytics.com/analytics.js', 'ga');
ga('create', '{{ site.google_analytics }}', 'auto');
ga('send', 'pageview');
</script>
<!-- End Google Analytics -->
{% endif %}
<link rel="icon" type="image/png" href="../static/images/favicon.png" /> <link rel="icon" type="image/png" href="../static/images/favicon.png" />
<link href="../static/styles/bootstrap.min.css" rel="stylesheet" /> <link href="../static/styles/bootstrap.min.css" rel="stylesheet" />