Overview
Optimizely is a digital experience platform built around A/B testing, multivariate experimentation, personalization, and feature flagging. It is widely used by product and marketing teams to run controlled experiments on web interfaces, measure the statistical impact of design or copy changes, and roll out features progressively using server-side flags. Optimizely serves enterprise clients across retail, financial services, media, and SaaS sectors.
What This Script Does
Client-Side Experimentation (Web Experimentation)
- Fetches the experiment datafile (JSON configuration) from Optimizely's CDN on each page load:
cdn.optimizely.com/datafiles/<project_id>.json - Evaluates audience conditions (URL, cookie values, custom attributes) to determine experiment eligibility
- Assigns the visitor to an experiment bucket and applies the variant: DOM mutations, CSS overrides, or redirect to variant URL
- Must execute synchronously before page render to prevent flash of original content (FOOC) — typically loaded as a blocking
<script>in<head> - Primary script:
https://cdn.optimizely.com/js/<project_id>.js
Cookies Set
optimizelyEndUserId— persistent unique visitor identifier; first-party, 10 years (by default); the primary identity key for experiment assignment consistencyoptimizelyBuckets— records the visitor's active experiment/variant assignments; first-party, 10 yearsoptimizelyPendingLogEvents— queues conversion events for batch transmission; first-party, sessionoptimizelySegments— stores visitor segmentation attributes for audience targeting; first-party, persistent
Conversion Tracking and Event Logging
- Tracks conversion goals (clicks, page views, form submissions, revenue events) mapped to experiment variants
- Sends event payloads to
logx.optimizely.comfor statistical analysis - Revenue and conversion events can be instrumented via the
window.optimizely.push({type:"event",...})API
Feature Flags and Full Stack
- Server-side Optimizely (Full Stack) operates without client-side cookies; decisions are made server-side
- Client-side SDK for React, Angular, etc. may use localStorage for flag assignment persistence
Data Transmitted
- Visitor ID (
optimizelyEndUserId), experiment assignments, conversion events, and page URLs transmitted to Optimizely's US-based servers - Optimizely is a US company; EU-US Data Privacy Framework participation covers data transfers
Consent & Compliance
Consent category: Functional / Analytics
Optimizely occupies a dual role. The functional aspect — rendering the correct page variant to provide a consistent user experience — can be argued as serving the user. The analytics aspect — tracking conversion events and building statistical models — requires consent under GDPR and ePrivacy. The persistent 10-year optimizelyEndUserId cookie is a significant identifier that unambiguously requires ePrivacy consent. Under GDPR, Optimizely processes behavioral event data tied to a persistent visitor ID, requiring a lawful basis (typically consent). Under CCPA, the behavioral tracking and profiling constitute data collection subject to disclosure.
Should You Block This Without Consent?
Conditional. Server-side feature flags without client-side tracking can operate without consent. The standard client-side implementation sets 10-year persistent cookies and tracks user behavior across sessions, which requires explicit consent under GDPR and ePrivacy. Block the client-side experimentation script until analytics or functional consent is obtained.
Consent Categories
Also Known As
Industries
Tracked Domains (1)
optimizely.comAnalyticsFrequently Asked Questions
Does Optimizely require visitor consent before loading?
Conditionally. Server-side feature flags without client-side tracking can run without consent. The standard client-side implementation sets a 10-year optimizelyEndUserId cookie and tracks behavioral conversion events across sessions, requiring explicit consent under GDPR and ePrivacy before the script loads.
What cookies does Optimizely set on visitor browsers?
Optimizely sets optimizelyEndUserId (10-year visitor ID for experiment consistency), optimizelyBuckets (active variant assignments, 10 years), optimizelySegments (audience attributes, persistent), and optimizelyPendingLogEvents (session queue for conversion events). All experiment assignments and events are sent to logx.optimizely.com.
How does ConsentStack manage Optimizely on my site?
ConsentStack classifies Optimizely as functional and analytics. For client-side experimentation, it blocks the script until consent is granted, then releases it so experiments can run. ConsentStack can gate behavioral tracking while allowing server-side flag decisions that require no client-side cookies or visitor identification.
Related Vendors
Manage consent for Optimizely
ConsentStack automatically detects and manages Optimizely trackers so your site stays compliant with global privacy regulations.