Skip to main content

Borlabs Cookie

Borlabs Cookie 3.0 is a WordPress plugin designed to assist website owners with adhering to data protection regulations, such as the GDPR (General Data Protection Regulation) and ePrivacy Directive. It empowers website administrators to efficiently manage and configure cookie consent banners, cookie settings, and user preferences regarding data tracking and storage. By utilizing this plugin, websites can properly display cookie consent notices to visitors, obtain consent for various types of cookies, and ensure compliance with privacy laws.

When integrated with your WordPress website, Borlabs Cookie works seamlessly with Kameleoon to read the consent each visitor provides before collecting any data. This integration ensures Kameleoon operates in alignment with the user's consent preferences. For more information on Kameleoon's Consent Management Policy, please refer to this documentation.

  1. Navigate to the Projects page.
  2. Click Configuration on your project card.

  1. Add this code to the Global custom script in your project settings:
const checkType = 'kameleoon';
const checkCookie = 'borlabs-cookie';
const getConsentCookie = () => {
const value = document.cookie.match(checkCookie);
return value ? decodeURIComponent(value[0]).includes(checkType) : undefined;
};
Kameleoon.API.Core.runWhenConditionTrue(
() => getConsentCookie() !== undefined && window.BorlabsCookie.checkCookieConsent,
() => {
if (window.BorlabsCookie.checkCookieConsent(checkType)) {
Kameleoon.API.Core.enableLegalConsent();
console.log('enableLegalConsent');
} else if (!window.BorlabsCookie.checkCookieConsent(checkType)) {
Kameleoon.API.Core.disableLegalConsent();
console.log('disableLegalConsent');
}
});