Expand my Community achievements bar.

Guidelines for the Responsible Use of Generative AI in the Experience Cloud Community.

AEMaaS: Adobe Granite Opt-Out Service

Avatar

Level 1

Hello everyone,

 

We are wanting to add a proper cookie-consent process in our website. Based on this documentation right here Configuring Cookie Usage | Adobe Experience Manager (using a different PID), we can configure the Adobe Granite Opt-Out service (PID: com.adobe.granite.optout.impl.OptOutServiceImpl). I've added a repository OSGi configuration inside the /config folder. I am using the Adobe Granite class to fetch these cookies (Granite.OptOutUtil.getCookieNames and Granite.OptOutUtil.getWhitelistCookieNames) and they output an empty Array. None of the cookies I have opted out is still being set. I have tested this both in localhost and cloud-dev (author/publish), it's not working.

 

=== com.adobe.granite.optout.impl.OptOutServiceImpl.cfg.json ===

{
    "optout.cookies": ["s_cc", "s_tp"],
    "optout.headers": ["X-Do-Not-rack;1", "DNT;1"],
    "optout.whitelist.cookies": ["someAppCookie", "anotherImportantAppCookie", 
    "customeCook02"]
}

 

=== <localhost>/system/console/configMgr ===  

user02128_0-1679009122328.png

 

=== cloud-dev console OSGi view ===

new-osgi-config-cloud-dev.png

 

=== cloud-dev browser inspection console ===

cloud-dev-console-cropped-out.png

 

What else am I missing in the configuration?

 

Thank you for your time.

 

2 Replies

Avatar

Community Advisor

Hi @user02128 

  1. Check the Opt-Out service configuration in the /config folder to ensure it is correct.

  2. Verify that the Opt-Out service is active and running by checking the OSGi console in AEM. Look for the Opt-Out service and confirm that it is running.

 

Avatar

Level 1

Hey @Nitin_laad

 

Below is the photo that shows it's working. 

 

=== cloud-dev developer-console OSGi view === (updated)

user02128_2-1679016165198.png

user02128_3-1679016176607.png

user02128_4-1679016185481.png