Borlabs Cookie 3.0のKameleoonとの連携
- Projects ページに移動します。
- プロジェクトカードで Configuration をクリックします。

- プロジェクト設定の Global custom script に以下のコードを追加します:

Documentation Index
Fetch the complete documentation index at: /llms.txt
Use this file to discover all available pages before exploring further.
Borlabs Cookie 3.0をKameleoonと連携して、訪問者の同意設定に基づいてデータ収集を自動的に有効化または無効化できます。

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');
}
});

このページは役に立ちましたか?