function getDomainName(hostName){ return hostName.substring(hostName.lastIndexOf(".", hostName.lastIndexOf(".") - 1) + 1); } var klaroConfig = { privacyPolicy: '/datenschutz/', lang: 'de', acceptAll: true, services : [ { name : 'cms', default: true, required: true, optOut: false, title : 'CMS', purposes : ['required'], cookies : [/^headImgHeight|headImgWidth|PHPSESSID|MATOMO_SESSID|CookieInfo|klaro/i, '/'], callback : function(consent, app){ /*console.log( 'User consent for app ' + app.name + ': consent=' + consent );*/ } }, { name : 'googleanalytics', default: false, required: false, title : 'Google Analytics', purposes : ['analytics'], cookies: [ [/^(_ga.*)|(_gid)$/i, '/', getDomainName(window.location.hostname)], /* needed as analytics set's to top level! */ [/^(_ga.*)|(_gid)$/i, '/', window.location.hostname] ], callback : function(consent, app){ /*console.log( 'User consent for app ' + app.name + ': consent=' + consent );*/ } }, { name : 'matomo', default: false, required: false, optOut: false, title : 'Matomo', purposes : ['analytics'], cookies: [ [/^_pk_.*$/i, '/'], [/^piwik_ignore/, '/', 'stats.futureweb.at'], [/^piwik_ignore/, '/'] ], callback : function(consent, app){ /*console.log('User consent for app ' + app.name + ': consent=' + consent);*/ if(consent==true){ _paq.push(['rememberCookieConsentGiven']); } else { _paq.push(['forgetCookieConsentGiven']); } } } ], translations: { de: { close: 'Schließen', ok: 'Akzeptieren', acceptSelected:'Auswahl akzeptieren', googleanalytics: { description: 'Google Analytics Statistiken' }, cms: { description: 'Technisch notwendige Cookies des CMS' }, matomo: { description: 'Matomo Webseiten Statistiken' }, purposes: { analytics: 'Besucher-Statistiken', security: 'Sicherheit', advertising: 'Anzeigen von Werbung', styling: 'Styling', required: 'Technisch benötigt', youtube: 'Youtube Video Streaming' } } } };