Opt-In/Opt-Out
AEM has a cookie opt-out service that can be used for managing the opt-in/opt-out for users.
Enhanced Insights by Analytics
AEM Sites includes an optional integration with Enhanced Insights by Analytics which uses functionality within the Adobe Analytics On-demand Service.
For further information on managing GDPR data subject requests related to Adobe Analytics see Adobe Analytics and GDPR.
Enhanced Personalization by Target
AEM Sites includes an optional integration with Enhanced Personalization by Target which uses functionality within the Adobe Target On-demand Service.
For further information on managing GDPR data subject requests related to Adobe Target see Adobe Target - Privacy and General Data Protection Regulation.
ContextHub
AEM provides an optional data layer with ContextHub. This keeps visitor-specific data in the browser, to be used for rules-based personalization.
By default, this visitor-data is not stored in AEM; AEM sends rules to the data layer to make personalization decisions in the browser.
Implementing Opt-in/Opt-Out
The site owner needs to implement an opt-out component according to the following guidelines.
These guidelines implement opt-in as the default. Thus, a website visitor must clearly agree, before any Personal Data is stored in the browser’s (client-side) persistence.
-
The opt-out component should be included every time the ContextHub component is included.
-
The terms and conditions that relate to GDPR for the website, must be displayed to the website visitor, allowing them to:
- accept
- reject
- change their previous choice
-
If a site visitor accepts the site’s terms and conditions, the ContextHub opt-out cookie should be removed:
ContextHub.Utils.Cookie.removeItem('cq-opt-out');
-
If a site visitor does not accept the site’s terms and conditions, the ContextHub opt-out cookie should be set:
ContextHub.Utils.Cookie.setItem('cq-opt-out', 1);
-
To check whether ContextHub is running in opt-out mode, the following call should be made in the browser’s console:
var isOptedOut = ContextHub.isOptedOut(true) === true; // if isOptedOut is true, ContextHub is running in opt-out mode
Previewing Persistence of ContextHub
To preview persistance used ContextHub, a user can:
-
Use the browser’s console; for example:
-
Chrome:
-
Open Developer Tools > Application > Storage:
- Local Storage > (website) > ContextHubPersistence
- Session Storage > (website) > ContextHubPersistence
- Cookies > (website) > SessionPersistence
-
-
Firefox:
-
Open Developer Tools > Storage:
- Local Storage > (website) > ContextHubPersistence
- Session Storage > (website) > ContextHubPersistence
- Cookies > (website) > SessionPersistence
-
-
Safari:
-
Open Preferences > Advanced > Show Develop menu in menu bar
-
Open Develop > Show JavaScript Console
- Console > Storage > Local Storage > (website) > ContextHubPersistence
- Console > Storage > Session Storage > (website) > ContextHubPersistence
- Console > Storage > Cookies > (website) > ContextHubPersistence
-
-
Internet Explorer:
-
Open Developer Tools > Console
- localStorage.getItem(‘ContextHubPersistence’)
- sessionStorage.getItem(‘ContextHubPersistence’)
- document.cookie
-
-
-
Use the ContextHub API, in the browser’s console:
-
ContextHub provides following data persistence layers:
- ContextHub.Utils.Persistence.Modes.LOCAL (default)
- ContextHub.Utils.Persistence.Modes.SESSION
- ContextHub.Utils.Persistence.Modes.COOKIE
- ContextHub.Utils.Persistence.Modes.WINDOW
The ContextHub store defines which persistence layer is used, thus to view the current state of the persistence all layers should be checked.
-
For example, to view data stored in localStorage:
To preview persistance used ContextHub, a user can:
-
Use the browser’s console:
-
Chrome - open Developer Tools > Application > Storage:
- Local Storage > (website) > ContextHubPersistence
- Session Storage > (website) > ContextHubPersistence
- Cookies > (website) > SessionPersistence
-
Firefox - open Developer Tools > Storage:
- Local Storage > (website) > ContextHubPersistence
- Session Storage > (website) > ContextHubPersistence
- Cookies > (website) > SessionPersistence
-
-
Use the ContextHub API, in the browser’s console:
-
ContextHub provides following data persistence layers:
- ContextHub.Utils.Persistence.Modes.LOCAL (default)
- ContextHub.Utils.Persistence.Modes.SESSION
- ContextHub.Utils.Persistence.Modes.COOKIE
- ContextHub.Utils.Persistence.Modes.WINDOW
The ContextHub store defines which persistence layer is used, thus to view the current state of the persistence all layers should be checked.
-
For example, to view data stored in localStorage:
var storage = new ContextHub.Utils.Persistence({ mode: ContextHub.Utils.Persistence.Modes.LOCAL });
console.log(storage.getTree());
Clearing Persistence of ContextHub
To clear the ContextHub persistence:
-
To clear persistence of currently loaded stores:
// to be able to fully access persistence layer, Opt-Out must be turned off ContextHub.Utils.Cookie.removeItem('cq-opt-out'); // following call asks all currently loaded stores to clear their data ContextHub.cleanAllStores(); // following call asks all currently loaded stores to set back default values (provided in their configs) ContextHub.resetAllStores();
-
To clear a specific persistence layer; for example, sessionStorage:
var storage = new ContextHub.Utils.Persistence({ mode: ContextHub.Utils.Persistence.Modes.SESSION }); storage.setItem('/store', null); storage.setItem('/_', null); // to confirm that nothing is stored: console.log(storage.getTree());
-
To clear all ContextHub persistence layers, the appropriate code must be called for all layers:
- ContextHub.Utils.Persistence.Modes.LOCAL (default)
- ContextHub.Utils.Persistence.Modes.SESSION
- ContextHub.Utils.Persistence.Modes.COOKIE
- ContextHub.Utils.Persistence.Modes.WINDOW
Experience Manager
Adobe Experience Manager Sites at Summit
Register for these sessions:
- How EY Enhanced Regulatory Knowledge Management with Adobe Solutions (attend online)
- B2B Reimagined: Transforming Go-to-Market Strategies for Profitable Growth (attend online)
- Driving Marketing Agility and Scale: Transforming your Content Supply Chain with AI (attend online)
- The True Cost of a Failed Implementation (attend online)
- Elevate and Empower Teams with Agentic AI for Exceptional Experiences (attend online)
Connect with Experience League at Summit!
Get front-row access to top sessions, hands-on activities, and networking—wherever you are!
Learn more