gdpr-facade
DEV-NOTES: This entry-point can be a dependency of other entry-points such as GoogleMaps and VideoExternal.
For more details @see entrypoints google-maps and video-external.
For facades to work with an async integration of CookieKlar, cookieklar-async-fix.js must be included on every page.
Depending on the Consent Manager, one of the following scripts has to be included globally on the site: BE
<script>
function acceptYouTubeService() {
if ('OneTrust' in window) {
OneTrust.setConsentProfile({
"purposes": [{
"Id": "02D689E0-2050-4DA3-AFDD-5DE8350627ED",
"TransactionType": "CONFIRMED"
}]
});
document.getElementsByClassName('save-preference-btn-handler onetrust-close-btn-handler')[0].click();
} else {
alert('CookiePro is not embedded.');
}
}
function acceptMapService() {
if ('OneTrust' in window) {
OneTrust.setConsentProfile({
"purposes": [{
"Id": "2E938932-9930-434A-8BBB-E51D2012F9F5",
"TransactionType": "CONFIRMED"
}]
});
document.getElementsByClassName('save-preference-btn-handler onetrust-close-btn-handler')[0].click();
} else {
alert('CookiePro is not embedded.');
}
}
function openConsentSettings() {
if ('OneTrust' in window) {
OneTrust.ToggleInfoDisplay();
} else {
alert('CookiePro is not embedded.');
}
}
</script>
<script>
function acceptServiceByName(serviceName) {
if ('UC_UI' in window) {
const uc_services = UC_UI.getServicesBaseInfo();
const service_id = uc_services.filter(service => service.name === serviceName)[0]?.id;
if (service_id) {
UC_UI.acceptService(service_id);
}
} else {
alert('Usercentrics is not embedded.');
}
}
function acceptYouTubeService() {
acceptServiceByName('YouTube Video');
}
function acceptMapService() {
acceptServiceByName('Google Maps');
}
function openConsentSettings() {
if ('UC_UI' in window) {
UC_UI.showSecondLayer();
} else {
alert('Usercentrics is not embedded.');
}
}
</script>
<script>
window.YOUTUBE_EMBEDDING_ID = '';
window.GOOGLE_MAPS_EMBEDDING_ID = '';
function acceptYouTubeService() {
CCM.setEmbeddingConsentState({
[window.YOUTUBE_EMBEDDING_ID]: true
});
}
function acceptMapService() {
CCM.setEmbeddingConsentState({
[window.GOOGLE_MAPS_EMBEDDING_ID]: true
});
}
function openConsentSettings() {
if ('CCM' in window) {
CCM.openControlPanel();
} else {
alert('CookieKlar is not embedded.');
}
}
</script>