]> BookStack Code Mirror - website/commitdiff
Updated some privacy components of the site
authorDan Brown <redacted>
Mon, 21 May 2018 18:59:58 +0000 (19:59 +0100)
committerDan Brown <redacted>
Mon, 21 May 2018 18:59:58 +0000 (19:59 +0100)
themes/bookstack/layouts/partials/footer.html
themes/bookstack/layouts/partials/header.html
themes/bookstack/layouts/partials/mailchimp.html

index f6ea248e6ba7d3965ced5473131f3de0ab75e73d..d454eed901bc46af2e89b2557f496a8035f1ef9f 100644 (file)
@@ -8,7 +8,7 @@
                            BookStack - Created By <a href="https://danb.me" title="danb.me" target="_blank" rel="noopener">Dan Brown</a> and developed with the <a href="https://github.com/BookStackApp/BookStack/graphs/contributors" target="_blank" rel="noopener">community</a>.
                         <br>
                         <!-- Thanks to <a href="https://www.browserstack.com/" target="_blank">BrowserStack</a> for providing easy cross-browser testing. <br> -->
-                        Page generated with <a href="https://gohugo.io">hugo</a>, Site source can be found <a href="https://github.com/BookStackApp/website" rel="noopener" target="_blank">here on GitHub</a>
+                        Page generated with <a href="https://gohugo.io">hugo</a>, Site source can be found <a href="https://github.com/BookStackApp/website" rel="noopener" target="_blank">here on GitHub</a>.
                        </p>
                </div>
                <div class="col-lg-7 col-md-9 menu">
@@ -19,6 +19,9 @@
                     <a href="{{.Site.BaseURL}}blog" target="_blank"><span class="icon">{{partial "icon/rss_feed.svg"}}</span>Blog</a>
                </div>
             </div>
+            <p class="text-small">
+                This website uses Google Analytics for reporting on site metrics and Algolia for providing better search. Third party cookies are not used and IP addresses Google Analytics receives are anonymized to protect your Privacy.
+            </p>
         </div>
     </footer>
 
index d4ea0dd90c27e285850a8ad1b1061d086d9a920e..74720f0132cf9cc9ec3328da3409761067fa9b66 100644 (file)
 
     {{with  .Site.Params.googleAnalyticsUserID }}
     <script>
-      if (window.location.href.toLowerCase().indexOf('https') !== -1) {
-              (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
+
+        (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','//www.google-analytics.com/analytics.js','ga');
-
-        ga('create', '{{.}}', 'auto');
+        })(window,document,'script','https://www.google-analytics.com/analytics.js','ga');
+
+        var GA_LOCAL_STORAGE_KEY = 'ga:clientId';
+
+        if (window.localStorage) {
+            ga('create', '{{.}}', {
+                'storage': 'none',
+                'clientId': localStorage.getItem(GA_LOCAL_STORAGE_KEY)
+            });
+            ga(function (tracker) {
+                localStorage.setItem(GA_LOCAL_STORAGE_KEY, tracker.get('clientId'));
+            });
+        }
+        else {
+            ga('create', '{{.}}', {'storage': 'none'});
+        }
+
+        ga('set', 'anonymizeIp', true);
         ga('send', 'pageview');
-      }
+      
     </script>
     {{end}}
 
index fafc98dd817a6ccac00e9117640fed769e5637d3..2006b540509f827c9de3fdc1981adfceaf7a12d9 100644 (file)
@@ -1,7 +1,7 @@
 <!-- Begin MailChimp Signup Form -->
 
 <div id="mc_embed_signup">
-    <form action="//bookstackapp.us14.list-manage.com/subscribe/post?u=18917f477406e2be3f062086a&amp;id=7de4fb0c79" method="post" id="mc-embedded-subscribe-form" name="mc-embedded-subscribe-form" class="validate" target="_blank" novalidate>
+    <form action="https://bookstackapp.us14.list-manage.com/subscribe/post?u=18917f477406e2be3f062086a&amp;id=7de4fb0c79" method="post" id="mc-embedded-subscribe-form" name="mc-embedded-subscribe-form" class="validate" target="_blank" novalidate>
         <h4>Subscribe to Updates</h4>
         <p>This is a weekly newsletter, summarising content from the blog.</p>
         <div class="mc-field-group">
@@ -13,5 +13,6 @@
             <div class="response" id="mce-success-response" style="display:none"></div>
         </div>    <!-- real people should not fill this in and expect good things - do not remove this or risk form bot signups-->
         <div style="position: absolute; left: -5000px;" aria-hidden="true"><input type="text" name="b_18917f477406e2be3f062086a_7de4fb0c79" tabindex="-1" value=""></div>
+        <p class="text-small">This service uses MailChimp to manage sending emails so any information provided will go into their systems. Feel free to review their <a href="https://mailchimp.com/legal/privacy" target="_blank">Privacy Policy</a> and <a href="https://mailchimp.com/legal/terms" target="_blank">Terms</a>. You'll be able to opt-out via a link in the email whenever you want. If you don't trust MailChimp or any BookStack maintainers with your data you provide or emit then please don't sign up.</p>
     </form>
 </div>
\ No newline at end of file