window.gConsents = {
analytics_storage: 'granted',
ad_storage: 'granted'
};
window.gtag = function () {
dataLayer.push(arguments);
};
window.gtagUpdate = function (sKey, bGranted) {
window.gConsents[sKey] = bGranted ? 'granted' : 'denied';
window.gtag('consent', 'update', window.gConsents);
};
var klaroConfig = {
// With the 0.7.0 release we introduce a 'version' paramter that will make
// it easier for us to keep configuration files backwards-compatible in the future.
version: 1,
elementID: 'klaro',
styling: {
theme: ['dark', 'bottom', 'narrow'],
},
noAutoLoad: false,
htmlTexts: true,
embedded: false,
groupByPurpose: true,
storageMethod: 'cookie',
cookieName: 'klaro',
cookieExpiresAfterDays: 365,
default: false,
mustConsent: false,
acceptAll: true,
hideDeclineAll: false,
hideLearnMore: false,
noticeAsModal: false,
disablePoweredBy: true,
translations: {
// translationsed defined under the 'zz' language code act as default
// translations.
zz: {
// privacyPolicyUrl: '/#privacy',
},
// If you erase the "consentModal" translations, Klaro will use the
// bundled translations.
de: {
// --------------------------------------------------------
// Configuration done through a WordPress ACF options page.
privacyPolicyUrl: 'https://www.aok-klinik.de/datenschutzerklaerung/',
privacyPolicy: {
name: 'Datenschutzerklärung',
text: 'Um mehr zu erfahren, lesen Sie bitte unsere {privacyPolicy}.',
},
consentNotice: {
description: 'Liebe Besucher:innen,
wir verwenden auf unserer Website nur technisch notwendige Cookies. Außerdem würden wir gerne die Interaktion unserer Besucher:innen nachvollziehen. Selbstverständlich so anonym wie möglich. Trotzdem hätten wir dafür gerne Ihre Zustimmung.',
learnMore: 'Verwendung auswählen',
},
consentModal: {
title: 'Dienste, die wir verwenden möchten',
description: 'Folgende Dienste möchten wir verwenden. Einige sind Voraussetzung für das Funktionieren der Website . Andere dienen zur Messung und Optimierung der Website oder werden benötigt um zum Beispiel Videos anzuzeigen.
',
},
decline: 'Alles ablehnen',
ok: 'Das ist in Ordnung',
matomo: {
description: 'Sammeln von Besucherstatistiken',
},
googleAnalytics: {
description: 'Messung der Benutzer:innen dieser Website um diese zu optimieren. Wir nutzen den Google Tag-Manager dafür. Dieser wird also auch aktiviert.',
},
googleAds: {
description: 'Messung des Erfolgs unserer Werbeanzeigen. Wir nutzen den Google Tag-Manager dafür. Dieser wird also auch aktiviert.',
},
youtube: {
description: 'Videos die über YouTube geladen werden.'
},
externalvideo: {
description: 'Videos die über Vimeo geladen werden.',
},
wordpress: {
description: 'Grundlegende Funktionen wie Anmeldecookies und persönliche Voreinstellungen.',
},
purposes: {
analytics: 'Besucher-Statistiken',
security: 'Sicherheit',
livechat: 'Live Chat',
advertising: 'Anzeigen von Werbung',
styling: 'Styling',
function: 'Basisfunktionen',
externalvideo: 'Videos aus externen Quellen',
},
},
},
// This is a list of third-party services that Klaro will manage for you.
services: [
{
name: 'wordpress',
title: 'WordPress',
purposes: ['function'],
required: true,
optOut: false,
},
{
name: 'matomo',
default: false,
title: 'Matomo/Piwik',
purposes: ['analytics'],
cookies: [
[/^_pk_.*$/, '/', 'aok-nordseeklinik.de'], //for the production version
[/^_pk_.*$/, '/', 'localhost'], //for the local version
'piwik_ignore',
],
callback: function(consent, service) {
console.log(
'User consent for service ' + service.name + ': consent=' + consent
);
},
required: false,
optOut: false,
onlyOnce: true,
},
{
name: 'video',
title: 'Youtube oder Vimeo',
purposes: ['content'],
contextualConsentOnly: true,
},
{
name: 'google-tag-manager',
required: false,
purposes: ['analytics'],
onAccept: `
// we notify the tag manager about all services that were accepted. You can define
// a custom event in GTM to load the service if consent was given.
for(let k of Object.keys(opts.consents)){
if (opts.consents[k]){
let eventName = 'klaro-'+k+'-accepted'
dataLayer.push({'event': eventName})
}
}
`,
onInit: `
// initialization code here (will be executed only once per page-load)
window.dataLayer = window.dataLayer || [];
window.gtag = function(){dataLayer.push(arguments)}
gtag('consent', 'default', {'ad_storage': 'denied', 'analytics_storage': 'denied', 'ad_user_data': 'denied', 'ad_personalization': 'denied'})
gtag('set', 'ads_data_redaction', true)
`,
},
{
// In GTM, you should define a custom event trigger named `klaro-google-analytics-accepted` which should trigger the Google Analytics integration.
name: 'googleAnalytics',
cookies: [
/^_ga(_.*)?/ // we delete the Google Analytics cookies if the user declines its use
],
purposes: ['analytics'],
onAccept: `
// we grant analytics storage
gtag('consent', 'update', {
'analytics_storage': 'granted',
})
`,
onDecline: `
// we deny analytics storage
gtag('consent', 'update', {
'analytics_storage': 'denied',
})
`,
},
{
name: 'googleAds',
cookies: [],
onAccept: `
// we grant ad storage and personalization
gtag('consent', 'update', {
'ad_storage': 'granted',
'ad_user_data': 'granted',
'ad_personalization': 'granted'
})
`,
onDecline: `
// we decline ad storage and personalization
gtag('consent', 'update', {
'ad_storage': 'denied',
'ad_user_data': 'denied',
'ad_personalization': 'denied'
})
`,
purposes: ['analytics'],
},
],
};