GenAI Chat Tracking

Preferabli uses browser storage for performance, analytics, and functional data. The widget can opt a visitor out of tracking based on cookie consent or privacy preferences.

When tracking is opted out, tracking-related data is not collected for the session. Chat persistence across visits is also treated as tracking-related storage — see Chat Persistence.


Cookie policies

Opt-out policy

Tracking is allowed by default. When the user declines cookies or tracking, opt them out.

Opt-in policy

Start with tracking disabled, then opt the user in after they consent.


What changes when tracking is opted out

  • Tracking-related data is not collected for the session.
  • The "Save chats on this device" checkbox is hidden.
  • The anonymous identity is kept only for the current browser session, so in-progress chats are not lost immediately. Closing the browser ends the session; the next visit starts a new identity.

When tracking is allowed again, persistence is offered on the home screen if history is empty. It does not enable itself until the user checks the box.

These rules apply to every Preferabli widget instance on the page. Wire the control to your site's cookie consent manager.


How to opt out or in

Set tracking on initialization, or toggle it later after the user responds to your consent prompt. See Widget Options for the full API.

Script tag — disable tracking on load:

<script
  src="%SCRIPT_URL%/genai-embeddable-widget.js"
  data-api-key="%API_KEY%"
  data-opt-out-tracking="true"
></script>

Programmatic init — same default, then enable tracking after consent:

var widget = new GenAIEmbeddableWidget({
  apiKey: '%API_KEY%',
  optOutTracking: true,
});

widget.optOutTracking(false);

Runtime — from a consent manager, without holding a widget instance:

window.dispatchEvent(new CustomEvent('genai-widget:opt-out-tracking', {
  detail: { optOut: true },
}));

Pass false in detail.optOut (or to widget.optOutTracking) to allow tracking again.


Did this page help you?