site: added cookie consent form
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/docsearch.js@2/dist/cdn/docsearch.min.css" />
-<!-- Google Analytics -->
+<link rel="stylesheet" type="text/css" href="https://cdnjs.cloudflare.com/ajax/libs/cookieconsent2/3.1.1/cookieconsent.min.css" />
+<script src="https://cdnjs.cloudflare.com/ajax/libs/cookieconsent2/3.1.1/cookieconsent.min.js" data-cfasync="false"></script>
<script>
+window.addEventListener('load', function(){
+ window.cookieconsent.initialise({
+ revokeBtn: "<div class='cc-revoke'></div>",
+ type: "opt-in",
+ theme: "classic",
+ palette: {
+ popup: {
+ background: "#000",
+ text: "#fff"
+ },
+ button: {
+ background: "#fd0",
+ text: "#000"
+ }
+ },
+ content: {
+ link: "Read more",
+ href: "https://kopia.io/docs/privacy-policy/"
+ },
+ onInitialise: function(status) {
+ if(status == cookieconsent.status.allow) myScripts();
+ },
+ onStatusChange: function(status) {
+ if (this.hasConsented()) myScripts();
+ }
+ })
+});
+
+function myScripts() {
+ // Paste here your scripts that use cookies requiring consent. See examples below
+
+ // Google Analytics, you need to change 'UA-00000000-1' to your ID
(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');
-
+ })(window,document,'script','//www.google-analytics.com/analytics.js','ga');
ga('create', 'UA-256960-22', 'auto');
ga('send', 'pageview');
+}
</script>
-<!-- End Google Analytics -->
<meta name="twitter:card" content="summary"/>
<meta name="twitter:image" content="https://kopia.io/favicons/android-chrome-512x512.png"/>
