Privacy & Consent
Opt-in consent mode, automatic consent-banner detection, IP anonymisation, and data retention windows.
Browse docs
Run experiments under GDPR and CCPA. Opt-in consent mode keeps the SDK dormant until the visitor agrees, and Otter detects the common consent banners for you.
By default Otter runs unless it is told not to. That suits sites operating on a lawful basis that does not require prior consent, and it stays the default for every existing project. Where you do need consent first, switch the project to opt-in and the SDK holds everything back: no variant is applied, no visitor cookie is written, and no SDK, configuration, assignment, or tracking request reaches Otter until the visitor agrees. A returning visitor who denies may send only the erasure request needed to remove their prior server record.
The page is revealed immediately either way. A visitor who ignores your banner sees your site normally — they simply are not in any test. Whether consent is required at all is a decision for you and your legal advice; Otter's job is to make either answer work properly.
Turn on consent mode
- 1
Open Project → Privacy
Edit the project and switch to the Privacy tab. Set Consent mode to Wait for consent before running. - 2
Choose who needs to consent
Every visitor, or only visitors in the EEA and UK. The browser makes a fail-closed timezone check before loading the SDK. For an outside-region exemption, the server confirms the country from the transient IP before creating visitor, assignment, or tracking data. Anyone it cannot place is asked for consent. - 3
Reinstall your tracking snippet
This step is not optional. The opt-in snippet carries the mode and an inline pre-consent loader, so the browser does not download the Otter SDK until consent is granted. Copy the updated snippet from the project's install screen. - 4
Verify with your banner
Load your site in a private window. Before you accept, the network tab should show no SDK, configuration, assignment, or tracking requests to Otter. Accept, and initialisation should follow within a moment. A returning visitor who denies may send only the erasure request needed to remove their prior server record.
Consent banners Otter detects
- IAB TCF v2.2 — detected and treated as authoritative, but currently remains unresolved and dormant because Otter does not yet have an IAB Global Vendor List ID. Until registration is complete, bridge the banner with
optimo.grantConsent(true)after its Otter/vendor choice is granted. - Google Consent Mode v2 — read from
analytics_storage, including updates pushed after page load. - Cookiebot, OneTrust, Usercentrics, CookieYes, Complianz, Iubenda — detected directly, using each vendor's own analytics or statistics category.
- Anything else — call
optimo.grantConsent(true)when your banner is accepted. An explicit call always wins over a detected banner.
Otter never resolves consent optimistically. If a banner is present but has not been answered, the SDK stays dormant rather than guessing — which means a misconfigured banner shows up as no data, not as data you were not allowed to collect.
Withdrawing consent
// Wire this to your banner's reject or withdraw control.
optimo.grantConsent(false)
// Otter immediately:
// - stops applying variants and tracking goals
// - deletes the optimo_uuid cookie
// - clears cached variants and any queued events
// - asks the server to erase identifying visitor and event detailIP addresses and data retention
- Otter never stores a visitor IP. It is read in-request only, to resolve a country and region for geo targeting, and is never written to the database.
- IP anonymisation masks it even for that transient use — IPv4 to the /24, IPv6 to the /48 — which still identifies the country targeting needs.
- Retention windows anonymise visitors that have not been seen for the number of days you set and delete their identifying fields, sessions, and events. Anonymous assignment and conversion facts remain. The purge runs nightly and cuts at the start of the day, so 30 days means whole days.
- Experiment totals are unaffected. Running and concluded assignment, conversion, and revenue totals keep their historical statistical facts after visitor identity is removed.
Frequently asked questions
Quick answers to the questions teams ask most about this part of Otter.