Cookie Consent and Anonymous Proactive Triggers

Your website remains responsible for its own consent banner and privacy notice. The widget consent interface does not replace your consent-management platform (CMP), and WebChatAgent does not add a second banner inside the embedded widget.

The widget starts in anonymous Privacy Mode when tracking-consent is omitted or set to unknown. In this mode, local trigger decisions stay in memory and are not sent to WebChatAgent.

<!-- tracking-consent is optional; omitted means unknown -->
<web-chat-agent chatbot-id="YOUR_ID"></web-chat-agent>
FeatureWithout a consent signal
Time on pageWorks locally in memory
Scroll depthWorks locally in memory
Exit intentWorks locally in memory
InactivityWorks locally in memory
URL matchWorks for the current page
Section visibilityWorks locally in memory
Rage clickWorks locally in memory
Pages visitedWorks during same-document SPA navigation; resets after a full reload
Returning visitorDisabled
AI-generated proactive greetingUses the configured static fallback
Trigger analytics before chat interactionDisabled
Persistent/daily cooldownFalls back to the current document lifetime
Permanent dismissLasts only until the document is reloaded

Before a visitor interacts with the chat, anonymous trigger evaluation does not create a visitor ID, write proactive state to browser storage, or send behavioral events to WebChatAgent.

Use the optional attribute when your consent manager already knows the visitor's choice:

<web-chat-agent
  chatbot-id="YOUR_ID"
  tracking-consent="granted"
></web-chat-agent>

Allowed values are unknown, denied, and granted. Missing and invalid values are treated as unknown.

For consent changes without a page reload, dispatch:

window.dispatchEvent(
  new CustomEvent('webchatagent:consent', {
    detail: { tracking: 'granted' }
  })
)

Send denied when consent is rejected or revoked. WebChatAgent then stops optional tracking and removes proactive-trigger state plus consent-gated UI personalization. Functional chat-session storage remains available after the visitor actively uses the chat.

Only send granted after your CMP has recorded a valid choice for the category that covers every feature you enabled. AI-generated greetings, visitor recognition and trigger analytics may require different descriptions or categories in your setup. Confirm the mapping with your privacy adviser.

Generic CMP adapter

function updateWebChatAgentConsent(isGranted) {
  window.dispatchEvent(
    new CustomEvent('webchatagent:consent', {
      detail: { tracking: isGranted ? 'granted' : 'denied' }
    })
  )
}

// Call this from your CMP's consent-ready and consent-change callbacks.
updateWebChatAgentConsent(false)

Cookiebot

Cookiebot exposes the current category decisions through Cookiebot.consent and announces changes with browser events. Choose the category that matches your documented purposes:

function syncWebChatAgentWithCookiebot() {
  const consent = window.Cookiebot?.consent
  const granted = Boolean(consent?.preferences && consent?.statistics)
  updateWebChatAgentConsent(granted)
}

window.addEventListener('CookiebotOnConsentReady', syncWebChatAgentWithCookiebot)
window.addEventListener('CookiebotOnAccept', syncWebChatAgentWithCookiebot)
window.addEventListener('CookiebotOnDecline', syncWebChatAgentWithCookiebot)

See the Cookiebot developer reference for its current category properties and events.

Complianz

Complianz provides cmplz_has_consent(category) and status/revoke hooks:

function syncWebChatAgentWithComplianz() {
  const granted = typeof window.cmplz_has_consent === 'function'
    && window.cmplz_has_consent('marketing')
  updateWebChatAgentConsent(granted)
}

jQuery(document).on(
  'cmplz_status_change cmplz_revoke cmplz_enable_category',
  syncWebChatAgentWithComplianz
)

Replace marketing if your documented CMP configuration uses another category. See the Complianz integration reference.

Create a WebChatAgent service in the appropriate Borlabs service group and use that group's ID:

function syncWebChatAgentWithBorlabs() {
  const granted = Boolean(
    window.BorlabsCookie?.Consents?.hasConsentForServiceGroup('marketing')
  )
  updateWebChatAgentConsent(granted)
}

window.addEventListener('borlabs-cookie-after-init', syncWebChatAgentWithBorlabs)
window.addEventListener('borlabs-cookie-consent-saved', syncWebChatAgentWithBorlabs)

Replace marketing with the service-group ID used in your Borlabs configuration. See the Borlabs Cookie JavaScript API.

Browser storage reference

KeyStorageCreated whenPurpose
chatSessionId_<chatbotId>localStorageVisitor actively uses chatResume the functional conversation
chatRecentSessions_<chatbotId>localStorageVisitor uses recent-chat featuresLocal list of known chat sessions
chatEndedSessions_<chatbotId>localStorageVisitor ends a chatKeep ended sessions out of the active view
chatWidgetIsOpenlocalStorageVisitor opens or closes the floating widgetRestore functional UI state
livechat_timeout_<chatbotId>_<sessionId>localStorageVisitor requests live chatResume the live-chat timeout
chatThumbRatings_<chatbotId>localStorageTracking consent is granted and feedback is submittedRemember local feedback selection
wca_privacy_box_dismissed_<chatbotId>sessionStorageTracking consent is granted and notice is dismissedHide the notice in the current tab
wca_speech_bubble_dismissed_<chatbotId>sessionStorageTracking consent is granted and bubble is dismissedHide the bubble in the current tab
wca_triggers_<chatbotId>_*localStorage/sessionStorageTracking consent is grantedReturning visits, counters, cooldowns and dismiss state

Your privacy notice should describe the storage and server-side processing actually enabled in your configuration. This documentation is technical guidance, not a substitute for legal advice.