Zoios Cookie-Banner

Managing cookies was never so easy.

Image Description
We love cookies - logo

Dedicated app development platform

From open source to premium services, Zoios makes app creation lightning fast.

Icon
Functions
Icon
Variables
Icon
Google Analytics
Icon
Google Tag Manager

Minimal Version

This version is minimal in it's content. You can't change & specify the text.

        

        <script src="https://cdn.zoios.net/cookie-banner/cookie-banner.js"></script>
        <script>
            var cookieBannerSettings = {
                "style": "", // empty for banner-style or -bootstrap for own bootstrap design
                "cookie-explanation-url": "https://www.kaspersky.com/resource-center/definitions/cookies",
                "legal-url": "https://www.enter-your-url.net/legal",
            };
            startCookieBanner(cookieBannerSettings);
        </script>
        
      

Extended Version

This version is extended in it's content. You can easily change & specify the text.

        

          <script src="https://cdn.zoios.net/cookie-banner/cookie-banner.js"></script>
          <script>
              var cookieBannerSettings = {
                  "style": "", // empty for banner-style or -bootstrap for own bootstrap design
                  "title": "We are using Cookies!",
                  "cookie-explanation-text": "What are Cookies?",
                  "cookie-explanation-url": "https://www.kaspersky.com/resource-center/definitions/cookies",
                  "legal-text": "Legal Notice", // German: DSGVO | Englisch: GDPR
                  "legal-url": "https://www.enter-your-url.net/legal",
                  "deny-button": "Deny",
                  "save-button": "Save",
                  "all_accept-button": "Accept All",
                  "required-title": "Required",
                  "required-text": "These cookies are necessary for the use of the website. The website cannot work without these cookies.",
                  "function-title": "Function",
                  "function-text": "These cookies are not necessary, but can improve the user experience.",
                  "performance-title": "Performance",
                  "performance-text": "This cookie provides information about the loading times / errors on the website in order to improve them.",
                  "ads-title": "Advertising",
                  "ads-text": "This cookie is required to adapt advertising. It stores any interests of yours.",
                  "analytic-title": "Analytic",
                  "analytic-text": "This cookie is used by analysis services (such as Google Analytics).",
              };
              startCookieBanner(cookieBannerSettings);
          </script>

        
      
We love cookies - logo

Development via API

We provide to our cookie banner a very simple API, including variables and functions.

Cookie-Banner API - Functions

Start Function

This loads and shows the Banner only if required.

        
          startCookieBanner(cookieBannerSettings);
        
      

Load Function

This loads the Banner in the Current HTML, but doesn't show it.

        
          loadBanner(cookieBannerSettings);
        
      

Show Function

After the loadBanner(cookieBannerSettings); you can display this Banner with this function. ATTENTION: YOU MUST LOAD THE BANNER BEFORE!

        
          showBanner();
        
      

Close Function

If the Banner is Displayed, this will close the Banner.

        
          closeBanner();
        
      

Execute Function

This will execute all Scripts, which the user has allowed.

        
          executeAllScripts();
        
      

Cookie-Banner API - Variables

Store Function

This is the Time in days, how long the setting of the user is stored.

        
          var consentLivetime = 90;
        
      

TTL Function

This is the Time in days, how long it will take to show the Banner again.

        
          var askLivetime = 30;
        
      

Short TTL Function

This is the Time in days, how long it will take to show the Banner again, if the user denys all Cookies.

        
          var askLivetimeShort = 7;
        
      

Cookie-Banner API - Supported source

Include Google Analytics

Source: click me. ATTENTION: We had modified the Script a little bit! You do not have to do more. The Banner and the Script above are enough.

        
          <script>
            var gaProperty = 'UA-XXXXXXXXX-X';
            var disableStr = 'ga-disable-' + gaProperty;
            if (document.cookie.indexOf(disableStr + '=true') > -1) {
                window[disableStr] = true;
            }
            function gaOptout() {
                document.cookie = disableStr + '=true; expires=Thu, 31 Dec 2099 23:59:59 UTC; path=/';
                window[disableStr] = true;
                console.log('The tracking is now deactivated!');
            }
            (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', 'UA-XXXXXXXXX-X', 'auto');
            ga('set', 'anonymizeIp', true);
            ga('send', 'pageview');
        </script>
        
      

Include Google Analytics

1.
function-cookie
-> These cookies are not necessary, but can improve the user experience.
2.
performence-cookie
-> These cookies are not necessary, but can improve the user experience.
3.
ads-cookie
-> These cookies are not necessary, but can improve the user experience.
4.
analytic-cookie
-> These cookies are not necessary, but can improve the user experience.
In the TagManager you can use these events as trigger.
ATTENTION: If you are using Google-Analytics in the TagManager you have to include it as custom HTML. Otherwise the Banner does not work correctly.

Webcertificates by Zoios - IT to Management

Image Description