# Amplitude can now run web experiments before consent without writing to the visitor’s device

Amplitude Web Experiment can now evaluate and apply variants while cookie consent is still pending without writing cookies or browser storage, sending impression events, or contacting third-party origins. Consent later determines whether the buffered state is persisted or discarded.

Amplitude’s new consent gating separates the visible experiment experience from persistence and measurement. Sites can avoid experiment flicker before a consent decision, but denied users’ buffered impressions are discarded and Analytics consent still has to be handled separately.

- Status: Active
- Published: 2026-08-29T09:40:37+12:00
- Updated: 2026-08-29T09:40:37+12:00
- Categories: Marketing & Distribution, Conversion & Analytics
- Tags: A/B testing, Amplitude, consent, web experimentation
- Canonical HTML: https://beyondthe.news/dossiers/amplitude-web-experiment-cookie-consent-gating-memory-no-flicker

## 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.

## Key details

- Amplitude lists Web Experiment Cookie consent management as shipped August 25, 2026.
- Consent gating is opt-in through Web Experiment configuration.
- While consent is pending, experiment variants can be evaluated and applied without browser-device storage writes.
- Pending impression events are buffered instead of being sent.
- Amplitude says the cross-subdomain behavioral-targeting relay is not loaded while consent is pending.
- Granting consent flushes buffered state and impression events without requiring a page reload.
- Denying or revoking consent discards buffered impressions and removes Web Experiment data stored on the device.
- The feature applies to Web Experiment only; Amplitude Analytics consent is managed separately.

## Builder takeaways

- Integrate Web Experiment's `setConsentStatus` with the same consent-management source of truth used by the rest of your site rather than creating a parallel banner state.
- Validate the pending, granted, denied and mid-session revocation paths in browser tests, including navigation before a visitor answers the banner.
- Document that experiment assignment can occur before consent even though persistence and exposure measurement are gated; your legal/privacy interpretation should be reviewed for the jurisdictions and policies that apply to your product.
- When analyzing test results, consider whether consent refusal differs by geography, acquisition source or user segment because measured exposures can exclude people who saw a variant but denied tracking.
- Handle Amplitude Analytics consent separately; Web Experiment gating does not automatically suppress Analytics collection.
- Re-test cross-subdomain experiments and behavioral targeting because the relay is intentionally withheld until consent is granted.

## What to watch

- Whether Amplitude exposes reporting that quantifies unmeasured in-memory assignments or consent-related experiment sample loss.
- Support for shared consent configuration across Web Experiment and Amplitude Analytics rather than separate SDK controls.
- How third-party consent-management platforms integrate the runtime status API and whether common race conditions emerge.
- Independent guidance on statistical bias when treatment is shown before consent but exposure telemetry is conditional on later consent.
- Whether similar consent-gated execution is extended to Feature Experiment or other Amplitude activation surfaces.

## Uncertainties

- The feature changes Amplitude's technical storage/request behavior but does not by itself determine whether a particular experiment implementation satisfies GDPR, ePrivacy or another legal requirement.
- Visitors can experience a variant without contributing a measured impression if they later deny consent, which can affect representativeness.
- Web Experiment and Analytics have separate consent controls, so an incomplete integration can still send analytics data even when experiment persistence is gated.
- Preview and test links operate regardless of consent status, so QA traffic needs separate handling in measurement procedures.

## Sources

- [Amplitude Changelog — Web Experiment: Cookie consent management](https://amplitude.com/releases) — Amplitude · primary changelog · 2026-08-25T00:00:00+12:00. Official ship date and product release listing for Web Experiment consent management.
- [Cookies and consent management (Web Experiment)](https://amplitude.com/docs/web-experiment/cookies-and-consent-management) — Amplitude · primary documentation. Detailed pending/granted/denied behavior, storage keys, impression buffering, relay behavior and separate Analytics consent boundary.

