Skip to content

EU Cookies Directive (GDPR)

Regardless of your business and website location most websites get visitors from EU countries. By law websites should show cookie message and get consent from visitors before saving cookies on visitor computers.

This tutorial shows how to add and use separate JavaScript file (.js) provided by cookie consent web service.

Question from our client.

Has anyone experience installing scripts to comply with EU Cookies Directive law? I’m trying to install this one http:// cookiesdirective dot com/ but I only get it working for a demo test, not for my Cb website.
Help will be appreciated. Thank you.

— info

Here is how to add custom GDPR consent message to your website powered by ClassiBase CMS.

GPDR message provider may be different. In this tutorial I will use  cookiesdirective as an example. Procedure is similar to other providers that provide custom .js file for uploading to your own website.

It is a bit complicated to explain adding cookiesdirective to ClassiBase but possible.

Please follow these steps to add EU GDPR Cookies Directive to your classifieds website:

  1. Download latest javascript files from any (free or paid) Cookies Directive website.
  2. Extract jquery.cookiesdirective.js file (or other .js file provided by website) from downloaded zip and upload to your classibase server into /public/js/ folder. Make sure you can view file directly with URL like this https:// YOURDOMAIN_HERE /public/js/jquery.cookiesdirective.js
  3. Login to your classibase admin and navigate to “Settings” → “Header/footer” page. Paste (append) following JavaScript code to “Custom footer” field.
    <script>
    addLoadEvent(function(){
    	$.getScript("https:// YOURDOMAIN_HERE /public/js/jquery.cookiesdirective.js",function(){
    		$.cookiesDirective({
    			privacyPolicyUri: 'myprivacypolicy.html',			
    			backgroundColor: '#52B54A',
    			linkColor: '#ffffff'
    		});
    	});
    });
    </script>
  4. Important: Remember to use actual URL of your website instead of YOURDOMAIN_HERE
  5. Important: Create privacy policy page in Classibase and use direct link to it instead of myprivacypolicy.html used in above code sample. You can create privacy policy page by navigating to “Manage” → “Pages” from your admin panel.

Alternative Implementation

  1. Instead of uploading .js file manually, you can copy and paste contents of that .js file to "Code inside <script> tags" field in "Settings" → "Header/Footer" page.
  2. In "Custom Footer" field add rest of the code like this:
    <script>
    addLoadEvent(function(){
    	$.cookiesDirective({
    		privacyPolicyUri: 'myprivacypolicy.html',			
    		backgroundColor: '#52B54A',
    		linkColor: '#ffffff'
    	});
    });
    </script>

FAQ

Are session cookies need Cookie Consent?

I was wondering if there are any plans to an emergency update to make classibase GDPR compliant.

— Andrew

Answer:

Classibase uses session cookies only. Session Cookies are “Strictly Necessary” and do not require explicit user consent under GDPR, meaning they need for site functioning. You still need to be transparent about using session cookies. Tell about it in banner or in cookie policy page.

View more FAQ →

What is next:

  • Learn to add custom JavaScript. Has explanation of all fields in "Header/Footer" page. View more JavaScript examples.
  • Learn to add custom CSS.
  • Text widget also can be used to add custom JavaScript and HTML code to Frontend.

Leave a Reply

Your email address will not be published. Required fields are marked *