What changed
Amplitude shipped Cookie consent management for Web Experiment on August 25, 2026. When consent gating is enabled, the Web Experiment script can evaluate experiment assignments and apply variants immediately while the visitor's consent state is pending, but cookie and browser-storage writes remain in memory, impression events are buffered, and the script does not contact its cross-subdomain behavioral-targeting origin. If the visitor grants consent, the held storage writes and impression events are flushed without a page reload. If consent is denied or revoked, the buffered impressions are discarded and Amplitude removes the Web Experiment data it previously stored on the device. The feature governs Web Experiment only; Amplitude Analytics collection has a separate consent/opt-out path.
Why it matters
Experimentation creates a practical tension for sites that wait for consent before persistent measurement: delaying the experiment system can cause visual flicker or inconsistent treatment, while starting it immediately can write identifiers or send exposure data before a visitor has chosen. Amplitude's new mode decouples those concerns. A site can render the assigned experience in memory while deferring persistence and telemetry until consent is known. For growth teams, the trade-off becomes measurement completeness: visitors who deny consent can still see a variant, but their pending exposure event is discarded, so the analyzed experiment population can differ from everyone who actually experienced the change.
Pending consent still permits variant evaluation
With consent gating enabled and status set to pending, Web Experiment initializes in memory, evaluates targeting and applies the selected variant. Amplitude says this is compatible with its anti-flicker behavior, so the page does not need to wait for the consent banner decision before showing the experiment experience.
Persistence and external requests are held back
While consent is pending, cookie, localStorage and sessionStorage writes are buffered in memory instead of reaching the visitor's device. Impression events are also held, and Amplitude does not load the cross-subdomain behavioral-targeting relay. If the visitor leaves without choosing, that temporary state disappears with the page.
Grant flushes; denial discards
When consent becomes granted, the script persists buffered storage values, sends the queued impressions once and enables the behavioral-targeting relay. A denial or mid-session revocation erases Web Experiment data from the origin and relevant cookie scopes and permanently discards pending impressions. The currently rendered page can keep its applied variant in memory until navigation.
Experiment exposure and measured exposure can diverge
A visitor who sees a variant while consent is pending but later denies consent is not represented by the buffered exposure event because that event is discarded. Teams analyzing experiment results should therefore understand that consent gating can make the measured cohort a subset of the population that visually experienced variants, particularly in markets or audiences with high refusal rates.
Analytics consent is a separate implementation
Amplitude explicitly limits this feature to the Web Experiment script. Denying Web Experiment consent does not automatically opt the visitor out of Amplitude Analytics. Sites using both products need to coordinate their consent-management callbacks with the Browser SDK's separate opt-out or deferred-initialization controls.