// This function will be executed when the user has changed the cookie consent status function AEMOnCookieConsentChangedCallback(categoryPreferences){ // Manage the non-essential and dual purpose cookies according to the consent status here. } // Register a callback function to manage cookies when the user consent status is changed if (typeof(WcpConsent) != "undefined" && WcpConsent != null) { WcpConsent.onConsentChanged(AEMOnCookieConsentChangedCallback); }