This article explains how to manage cookie and chat message consent for Neocom
Description
Consent is required when you use features like Purchase Tracking or chat message persistence.
Both are managed by the
The function must return an object like:
Both are managed by the
neocomConsent
JavaScript function or variable on your site, but this is only needed if you select either Set Cookie if consent not rejected or Persist chat messages if consent not rejected in your admin settings.The function must return an object like:
{
chatConsent: true, // or false
cookieConsent: true // or false
}
How you determine these values is up to you, for example by integrating a Consent Management Platform (CMP) or your own logic.
Admin Configuration
Consent settings are under Settings > Consent in the admin. You control cookies and chat messages separately:
Cookie
- Set Cookie if consent not rejected
- Sets a cookie if the user gives consent using
neocomConsent
or if this function is missing. Only implementneocomConsent
if you want full control. (Default)
- Sets a cookie if the user gives consent using
- Set Cookie if consent is given
- A cookie is set only if the user gives consent via the
neocomConsent
JavaScript function. This function must be available on your website.
- A cookie is set only if the user gives consent via the
- Do not set cookie
- Never set a cookie.
Chat Messages
- Persist chat messages if consent not rejected
- Chat messages are saved if the user gives consent using
neocomConsent
or if the function is missing. Only implementneocomConsent
if you want full control. (Default)
- Chat messages are saved if the user gives consent using
- Persist chat messages if consent is given
- Chat messages are saved only if the user gives consent via the
neocomConsent
JavaScript function. This function must be available.
- Chat messages are saved only if the user gives consent via the
- Never persist chat messages
- Chat messages are never saved.
Implementation
Only add the
If you do, add it on every page where Neocom is used, ideally in the header.
neocomConsent
function or variable if you use the consent not rejected settings above.If you do, add it on every page where Neocom is used, ideally in the header.
Example:
window.neocomConsent = function() {
// Integrate your own logic here, e.g., via a CMP
return {
chatConsent: true, // or false
cookieConsent: true // or false
};
};
Please note:
If you integrate this function, purchase tracking and chat message persistence will only apply to users who have given consent.
If you integrate this function, purchase tracking and chat message persistence will only apply to users who have given consent.