Update analytics (IP anonymization) and HTTPS links

This commit is contained in:
Thomas Jensen 2018-05-14 22:26:42 +02:00
parent 69991bc2c5
commit 5dde9b57cc
No known key found for this signature in database
GPG Key ID: A4ACEE270D0FB7DB
4 changed files with 27 additions and 29 deletions

View File

@ -3,7 +3,7 @@
name: boxes name: boxes
description: Command line ASCII boxes unlimited! description: Command line ASCII boxes unlimited!
gems: plugins:
- jemoji - jemoji
- jekyll-paginate - jekyll-paginate

View File

@ -1,11 +1,9 @@
{% if site.gaaccount != '' %} {% if site.gaaccount != '' %}
<script> <script async src="https://www.googletagmanager.com/gtag/js?id={{ site.gaaccount }}"></script>
(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), window.dataLayer = window.dataLayer || [];
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m) function gtag(){dataLayer.push(arguments);}
})(window,document,'script','//www.google-analytics.com/analytics.js','ga'); gtag('js', new Date());
gtag('config', '{{ site.gaaccount }}', {'anonymize_ip': true});
ga('create', '{{ site.gaaccount }}', 'auto'); </script>
ga('send', 'pageview');
</script>
{% endif %} {% endif %}

View File

@ -2,16 +2,15 @@
<div class="row-fluid"> <div class="row-fluid">
<div class="span12 footer navbar-inverse navbar-fixed-bottom"> <div class="span12 footer navbar-inverse navbar-fixed-bottom">
<p class="copyright"><b>{{ site.name }}</b> &copy;1999 by <p class="copyright"><b>{{ site.name }}</b> &copy;1999 by
<A target="_blank" HREF="http://thomasjensen.com/">Thomas Jensen</A><span class="hidden-xs"> {{ page.bxemail }}</span><br/> <A target="_blank" HREF="https://thomasjensen.com/">Thomas Jensen</A><span class="hidden-xs"> {{ page.bxemail }}</span><br/>
Website powered by <a target="_blank" href="http://jekyllrb.com">Jekyll</a>, Website powered by <a target="_blank" href="https://jekyllrb.com/">Jekyll</a>,
theme by <a target="_blank" href="https://github.com/scotte/jekyll-clean">Scott Emmons</a> theme by <a target="_blank" href="https://github.com/scotte/jekyll-clean">Scott Emmons</a>
<span class="hidden-xs">under <a target="_blank" href="http://creativecommons.org/licenses/by/4.0/">Creative Commons Attribution</a></span></p> <span class="hidden-xs">under <a target="_blank" href="https://creativecommons.org/licenses/by/4.0/">Creative Commons Attribution</a></span></p>
</div> </div>
</div> </div>
</div> </div>
{% include disqus-counts.html %} {% include disqus-counts.html %}
{% include analytics.html %}
</body> </body>
</html> </html>

View File

@ -7,23 +7,24 @@
<meta name="viewport" content="width=device-width, initial-scale=1.0"> <meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="author" content="Thomas Jensen" /> <meta name="author" content="Thomas Jensen" />
<meta name="robots" content="index,follow" /> <meta name="robots" content="index,follow" />
{% if page.sedesc %} {% if page.sedesc %}
<!-- start page --> <!-- start page -->
<meta name="description" content="{{ page.sedesc }}" /> <meta name="description" content="{{ page.sedesc }}" />
<meta name="keywords" content="software, ascii, ascii art, filter, command line, box, boxes, box drawing" /> <meta name="keywords" content="software, ascii, ascii art, filter, command line, box, boxes, box drawing" />
<link rel="canonical" href="http://{{ page.sitehost }}/" /> <link rel="canonical" href="https://{{ page.sitehost }}/" />
{% else %} {% else %}
<link rel="canonical" href="http://{{ page.sitehost }}{{ page.url }}" /> <link rel="canonical" href="https://{{ page.sitehost }}{{ page.url }}" />
{% endif %} {% endif %}
{% include analytics.html %}
<script type="text/javascript"> <script type="text/javascript">
if (window.location.hostname == "ascii-boxes.github.io") { if (window.location.hostname == "ascii-boxes.github.io") {
var prjNamePrefix = "/{{ site.name }}"; var prjNamePrefix = "/{{ site.name }}";
var targetPath = window.location.pathname; var targetPath = window.location.pathname;
if (targetPath == prjNamePrefix) { if (targetPath == prjNamePrefix) {
targetPath = "/"; targetPath = "/";
} }
else if (targetPath.indexOf(prjNamePrefix + "/") == 0) { else if (targetPath.indexOf(prjNamePrefix + "/") == 0) {
targetPath = targetPath.substring(prjNamePrefix.length); targetPath = targetPath.substring(prjNamePrefix.length);
} }
window.location = window.location.protocol + "//{{ page.sitehost }}" window.location = window.location.protocol + "//{{ page.sitehost }}"
+ targetPath + window.location.hash; + targetPath + window.location.hash;
@ -56,7 +57,7 @@
<li class="active"><a href="{{ site.baseurl }}/examples.html">Examples</a></li> <li class="active"><a href="{{ site.baseurl }}/examples.html">Examples</a></li>
<li class="active"><a href="{{ site.baseurl }}/docs/">Documentation</a></li> <li class="active"><a href="{{ site.baseurl }}/docs/">Documentation</a></li>
<li class="active"><a href="{{ site.baseurl }}/contributing.html">Contributing</a></li> <li class="active"><a href="{{ site.baseurl }}/contributing.html">Contributing</a></li>
<li class="active"><a href="{{ site.baseurl }}/download.html"><b>Download</b></a></li> <li class="active"><a href="{{ site.baseurl }}/download.html"><b>Download</b></a></li>
<li class="active visible-xs-block"><a href="{{ site.baseurl }}/links.html">Links</a></li> <li class="active visible-xs-block"><a href="{{ site.baseurl }}/links.html">Links</a></li>
{% if site.github != '' %} {% if site.github != '' %}
<li class="active"><a href="https://github.com/{{ site.github }}">Github</a></li> <li class="active"><a href="https://github.com/{{ site.github }}">Github</a></li>