Prevent google analytics being loaded locally

This commit is contained in:
Thomas Busby
2018-05-26 15:49:36 +02:00
parent ad6fb2cf02
commit 433db3ad19
2 changed files with 14 additions and 12 deletions

View File

@@ -3,7 +3,7 @@ description: Arise, you have nothing to lose but your barbed wire fences!
author: cryptoanarchy.wiki author: cryptoanarchy.wiki
github: https://github.com/cryptoanarchywiki/cryptoanarchywiki.github.io github: https://github.com/cryptoanarchywiki/cryptoanarchywiki.github.io
about: Arise, you have nothing to lose but your barbed wire fences! about: Arise, you have nothing to lose but your barbed wire fences!
disqus_shortname: stackproblems disqus_shortname:
google_analytics: UA-XXXXXXXX-Y google_analytics: UA-XXXXXXXX-Y
avatar_url: /static/img/avatar.jpg avatar_url: /static/img/avatar.jpg
@@ -25,10 +25,10 @@ social:
share: share:
twitter_username: _cryptoanarchy twitter_username: _cryptoanarchy
fb_appid: 1749788565247320 fb_appid:
urls: urls:
- text: About Me - text: About Us
url: /about/ url: /about/
- text: My Projects - text: My Projects
url: /projects/ url: /projects/

View File

@@ -116,16 +116,18 @@ layout: compress
<link rel="stylesheet" href="/static/css/projects.css"> <link rel="stylesheet" href="/static/css/projects.css">
<link rel="stylesheet" href="/static/css/main.css"> <link rel="stylesheet" href="/static/css/main.css">
<!-- Google Analytics --> {% if jekyll.environment == "production" %}
<script> <!-- Google Analytics -->
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){ <script>
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o), (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m) (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
})(window,document,'script','https://www.google-analytics.com/analytics.js','ga'); 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('create', '{{ site.google_analytics }}', 'auto');
ga('send', 'pageview'); ga('send', 'pageview');
</script> </script>
{% endif %}
</head> </head>
<body> <body>
<div class="container"> <div class="container">