Skip to content

JavaScript API

Tracking consent

The consent API controls whether a visitor is shown Unless components and whether that visitor is tracked. It lets you connect your own cookie banner or consent-management platform to Unless, so tracking only turns on when you decide it should.

By default, Unless does not use cookies or track end users — components and the AI assistant work fine without it. Once a visitor opts in (or is identified as a logged-in user), features like A/B testing, Audiences, User Profiles, and Chat History become active, and the unless_id/unless_sid cookies are set.

For the full breakdown of what these cookies do, which features need consent, and when you’re legally required to ask for it, see End user tracking.