Cookie Consent and Analytics Tokens in Live Chat
Updated
Live Chat supports cookie consent–based behavior to help organizations respect user choices while they interact with their website or app. When this feature is enabled, the website passes the user’s consent to Live Chat via the embed code during initialization. Sprinklr then manages analytics based on the ANALYTICS flag.
Configure Cookie Consent
Cookie consent is configured at the application level in Sprinklr. You must add the cookieConsent flag to the embed code generated during the creation of the Live Chat app.
Steps to retrieve and update the embed code:
1. Click the New Page (+) icon to open the Launchpad.
2. Under Platform Modules > Listen, select Live Chat Care.
3. In the Live Chat Applications screen, locate the desired application.
4. Click the three‑dot icon (⋮) beside the application.
5. Select Web Embed.

6. In the Embed Your Live Chat window, copy the embed code.
7. Add the cookieConsent flag to the code.
Example
window.sprChatSettings = {appId: '68f8a4508592040bc694dd45_app_1000584416',cookieConsent: {ANALYTICS: true // or false}};
Parameter
Parameter | Description |
ANALYTICS | Flag to enable or disable analytics tracking. Supported Values: true, false |
Enable or Disable Consent Based Analytics Through SDK
Any changes in user consent after the chat has been loaded can be updated to Sprinklr Live Chat via the SDK. Based on these updates, analytics tracking will either start or stop dynamically.
For more information about the SDK, see Enable or Disable Consent Based Analytics.