Borlabs Cookie
Step 1: create the provider
Go to Consent Management → Providers → Add New and create an entry named Click2Buy.
The provider represents the legal entity behind the service: enter the company's address and country, the URL of its privacy policy (https://click2buy.com/privacy-policy/), and where available its opt-out URL and the link to its partner list.
This information is shown to visitors who open the details from your banner: leaving it out is a compliance gap.
Step 2: create the service
Go to Consent Management → Services → Add New, in the Marketing group. The group decides which checkbox of your banner controls the consent.
DANGER
Never use the Essential group for Click2Buy: essential services are treated as always accepted and display no checkbox at all.
Then fill in:
- Name:
Click2Buy. This is the label the visitor sees. - ID:
click2buy, in lowercase, with no spaces or accents. This is the technical identifier used everywhere else (JavaScript code, dataLayer events, Google Tag Manager). Set it when you create the service: changing it later creates a new service and silently cancels the consent already collected. - Provider: Click2Buy, created in the previous step.
- Description and cookies: the purpose of the service, then each cookie it sets with its name, duration and role.
- Opt-in code / Opt-out code: leave them empty if your website loads the script itself after checking consent. Borlabs records the consent either way.
Step 3: create the content blocker
This step only applies to content displayed by Click2Buy on your pages (widget, iframe).
Go to Consent Management → Content Blocker → Add New, declare the hosts serving the widget, and link the blocker to the click2buy service. Then write the placeholder text shown instead of the widget until the visitor gives consent: it lets visitors unblock the content one by one.
Step 4: clear all caches
Borlabs generates a JavaScript configuration file that is loaded in the browser. As long as a cache serves the previous version of that file, the new service doesn't appear, and calls to the Borlabs JavaScript API fail without any error.
Clear the cache of your WordPress caching plugin, of your CDN, and OPcache if your host uses it.
Then contact your Customer Success Manager to enable the consent feature on your widgets.
Check your configuration
Once your changes are published, run this code in the browser console on your website to check that the Click2Buy vendor is set up correctly:
js
async function checkConsentVendors() {
let borlabsCookieConsent = false;
// Check BorlabsCookie
if (typeof BorlabsCookie !== 'undefined') {
console.log("[BorlabsCookie] SDK detected ✅");
try {
const services = BorlabsCookie.Services?.services || {};
const service = services['click2buy'] || Object.values(services).find(service => service.name?.toLowerCase() === 'click2buy');
console.log(`[BorlabsCookie] Click2Buy service found: ${service ? "✅ Yes" : "❌ No"}`);
borlabsCookieConsent = BorlabsCookie.Consents.hasConsent(service.id, service.serviceGroupId) === true;
} catch (error) {
console.error("[BorlabsCookie] Error checking consent ❌", error);
}
} else {
console.log("[BorlabsCookie] Not found ❌");
}
return { borlabsCookie: borlabsCookieConsent };
}
// Run the check
await checkConsentVendors();