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.
Is Optimizely GDPR compliant?
Optimizely typically loads analytics and functional trackers, which are not strictly necessary for your site to work. Under the GDPR and the ePrivacy Directive, non-essential cookies and trackers must stay blocked until a visitor gives clear opt-in consent. So Optimizely can be fully GDPR compliant, but only if your site holds its scripts until consent is granted and lets visitors decline just as easily. Compliance depends on how your site loads Optimizely, not on Optimizely itself.
Consent Categories
Also Known As
Industries
Tracked Domains (1)
Optimizely's trackers are occasionally seen, seen on about 1% of the sites ConsentStack has scanned. Scan your own site to see which of these are firing before consent.
optimizely.comAnalyticsoptimizely.com is an analytics domain operated by Optimizely, used to measure visits, sessions, and on-site behavior. Seen on about 1% of scanned sites.
Cookies Optimizely Sets (2)
optimizelyEndUserIdOptimizely visitor identifier used to bucket the visitor into experiment variations. Six-month expiration.
optimizelyOptOutEssentialOptimizely opt-out marker indicating the visitor has opted out of all experiments.
Frequently Asked Questions
Related Vendors
Manage consent for Optimizely
ConsentStack automatically detects and manages Optimizely trackers so your site stays compliant with global privacy regulations.