Optional visitor and email measurements
When and how to connect optional visitor recognition and email-open measurements to privacy choices.
Last updated · Nov 2, 2026
Do you need this for chat?
No. Chat, conversation reporting and feedback work without extra tracking configuration. If you do not use either of these optional features, no code is required:
- Recognition on later visits: a random identifier recognizes the browser for up to 90 days.
- Conversation-email opening signal: a small image may indicate an opening, but cannot prove the email was read; records are kept for 30 days.
These are two separate optional purposes. Enable them only from the visitor's actual selection in your existing consent manager. An email address or chat participation is not consent.
Privacy choices for analytics and conversation emails
Connect the widget to your website’s existing consent manager. Returning-visitor recognition and conversation-email opening measurement are separate purposes. Describe both purposes clearly and pass each choice independently; accepting analytics alone never enables email measurement. The widget and conversation chat do not add a second email-opening checkbox.
After supportwhale:ready, window.SupportWhale.getTrackingNotice("en") supplies localized purpose explanations and notice version supportwhale-tracking-v2 for your existing consent interface. The text describes 90-day visitor recognition and 30-day email-opening measurements. Incorporating the text alone does not obtain consent; use the choices the visitor actually made for each purpose.
// Inside your existing consent manager's change callback:
const saved = await window.SupportWhale.setTrackingConsent({
analytics: choices.returningVisitorRecognition === true,
emailOpens: choices.conversationEmailOpenings === true
}, {
noticeVersion: 'supportwhale-tracking-v2',
userAction: true // only for a new, explicit visitor action
});When restoring a previously recorded choice on page load, omit userAction or pass false. A refusal or withdrawal already recorded by SupportWhale then takes precedence; false is returned rather than silently restoring permission. true as the first argument is shorthand for both purposes and is only suitable when both have explicitly been accepted. For email measurement without visitor recognition, pass { analytics: false, emailOpens: true }.
await window.SupportWhale.setTrackingConsent(false) withdraws both purposes and removes prior opening measurements and linked visitor recognition. The visitor can also use Privacy → Withdraw privacy choice in the widget or conversation chat after an accepted choice. Individual purposes remain managed by your existing consent interface. A false result means the update has not been confirmed; withdrawal remains queued for retry. Positive grants are never replayed automatically after a failure. Do Not Track and Global Privacy Control override both optional purposes.
The legacy setAnalyticsConsent(true) remains analytics-only and cannot enable email measurement. setAnalyticsConsent(false) withdraws both purposes. An older analytics-only choice, an email address, continued chat use or a preselected field does not qualify as permission for the new purpose. Support messages remain available without either purpose. Understand analytics.