Help > Forum > General > Adding a cookie consenst dialog

Adding a cookie consenst dialog

You can follow the instructions below to add a cookie consent dialog to your forum to comply with European Union cookie and GDPR laws.

  1. Log in to your Website Toolbox account.
  2. Click the Appearance link.
  3. In the Appearance menu, click the HTML link.
  4. Insert the code mentioned below into the Forum Head Tag HTML Code textbox.
  5. <style>
    #wt-cookie-banner {
    	background: #000;
    	color: #fff;
    	padding: 20px;
    	position: fixed;
    	bottom: 0;
    	left: 0;
    	right: 0;
    	z-index: 9999999;
    }
    #wt-cookie-banner > p {
    	float: left;
    	margin: 4px 0;
    }
    #wt-cookie-banner #wt-cookie-accept-btn {
    	color: inherit;
    	border: 1px solid;
    	padding: 3px 12px;
    	float: right;
    }
    #wt-cookie-banner #wt-cookie-accept-btn:hover {
    	background: rgba(255, 255, 255, 0.2);
    }
    </style>
    <script>
    window.addEventListener("load", function() {
    	if(jQ('#wt-cookie-accept-btn').length) {
    		if(typeof getCookie("cookieAllowed") == "undefined" || getCookie("cookieAllowed") == "") {
    			jQ('#wt-cookie-banner').removeClass('hidden');
    		}
    		jQ('#wt-cookie-accept-btn').click(function() {
    			setCookie("cookieAllowed",1,365,1);
    			jQ('#wt-cookie-banner').addClass('hidden');
    		});
    	}
    });
    </script>	
  6. Insert the code mentioned below into the Forum Footer HTML Code textbox.
  7. <div id="wt-cookie-banner" class="hidden"><p>By using this website, you agree to our use of cookies. We use cookies to provide you with a great experience and to help our website run effectively.</p>
    <a id="wt-cookie-accept-btn">Okay</a></div>
    
  8. Save the changes.

Desktop:

Mobile:

For a more advanced approach, you can use third-party services such as cookie consent, Osano, or a different service.


If you still need help, please contact us.