1// By default, Klaro will load the config from a global "klaroConfig" variable. 2// You can change this by specifying the "data-config" attribute on your 3// script take, e.g. like this: 4// <script src="klaro.js" data-config="myConfigVariableName" /> 5var klaroConfig = { 6 // With the 0.7.0 release we introduce a 'version' paramter that will make 7 // it easier for us to keep configuration files backwards-compatible in the future. 8 version: 1, 9 10 // You can customize the ID of the DIV element that Klaro will create 11 // when starting up. If undefined, Klaro will use 'klaro'. 12 elementID: 'klaro', 13 14 // You can override CSS style variables here. For IE11, Klaro will 15 // dynamically inject the variables into the CSS. If you still consider 16 // supporting IE9-10 (which you probably shouldn't) you need to use Klaro 17 // with an external stylesheet as the dynamic replacement won't work there. 18 styling: { 19 theme: ['dark', 'bottom', 'wide'], 20 }, 21 22 // Setting this to true will keep Klaro from automatically loading itself 23 // when the page is being loaded. 24 noAutoLoad: false, 25 26 // Setting this to true will render the descriptions of the consent 27 // modal and consent notice are HTML. Use with care. 28 htmlTexts: true, 29 30 // Setting 'embedded' to true will render the Klaro modal and notice without 31 // the modal background, allowing you to e.g. embed them into a specific element 32 // of your website, such as your privacy notice. 33 embedded: false, 34 35 // You can group services by their purpose in the modal. This is advisable 36 // if you have a large number of services. Users can then enable or disable 37 // entire groups of services instead of having to enable or disable every service. 38 groupByPurpose: true, 39 40 // How Klaro should store the user's preferences. It can be either 'cookie' 41 // (the default) or 'localStorage'. 42 storageMethod: 'cookie', 43 44 // You can customize the name of the cookie that Klaro uses for storing 45 // user consent decisions. If undefined, Klaro will use 'klaro'. 46 cookieName: 'klaro', 47 48 // You can also set a custom expiration time for the Klaro cookie. 49 // By default, it will expire after 120 days. 50 cookieExpiresAfterDays: 365, 51 52 // You can change to cookie domain for the consent manager itself. 53 // Use this if you want to get consent once for multiple matching domains. 54 // If undefined, Klaro will use the current domain. 55 //cookieDomain: '.github.com', 56 57 // You can change to cookie path for the consent manager itself. 58 // Use this to restrict the cookie visibility to a specific path. 59 // If undefined, Klaro will use '/' as cookie path. 60 //cookiePath: '/', 61 62 // Defines the default state for services (true=enabled by default). 63 default: true, 64 65 // If "mustConsent" is set to true, Klaro will directly display the consent 66 // manager modal and not allow the user to close it before having actively 67 // consented or declines the use of third-party services. 68 mustConsent: false, 69 70 // Show "accept all" to accept all services instead of "ok" that only accepts 71 // required and "default: true" services 72 acceptAll: true, 73 74 // replace "decline" with cookie manager modal 75 hideDeclineAll: false, 76 77 // hide "learnMore" link 78 hideLearnMore: false, 79 80 // show cookie notice as modal 81 noticeAsModal: false, 82 83 // You can also remove the 'Realized with Klaro!' text in the consent modal. 84 // Please don't do this! We provide Klaro as a free open source tool. 85 // Placing a link to our website helps us spread the word about it, 86 // which ultimately enables us to make Klaro! better for everyone. 87 // So please be fair and keep the link enabled. Thanks :) 88 //disablePoweredBy: true, 89 90 // you can specify an additional class (or classes) that will be added to the Klaro `div` 91 //additionalClass: 'my-klaro', 92 93 // You can define the UI language directly here. If undefined, Klaro will 94 // use the value given in the global "lang" variable. If that does 95 // not exist, it will use the value given in the "lang" attribute of your 96 // HTML tag. If that also doesn't exist, it will use 'en'. 97 // lang: 'fi', 98 99 // You can overwrite existing translations and add translations for your 100 // service descriptions and purposes. See `src/translations/` for a full
101 // list of translations that can be overwritten: 102 // https://github.com/KIProtect/klaro/tree/master/src/translations 103 104 // Example config that shows how to overwrite translations: 105 // https://github.com/KIProtect/klaro/blob/master/src/configs/i18n.js 106 translations: { 107 // If you erase the "consentModal" translations, Klaro will use the 108 // bundled translations. 109 fi: { 110 privacyPolicyUrl: '/privacy', 111 privacyPolicy: { 112 text: 'Lue {privacyPolicy} täältä', 113 name: 'tietosuojaselosteemme', 114 }, 115 consentModal: { 116 description: 'Keräämme tietoja palvelumme laadun parantamiseksi.', 117 }, 118 consentNotice: { 119 description: 120 '<strong class="cn-banner-title">Sujuva matka alkaa evästeistä</strong>Käytämme evästeitä varmistaaksemme sujuvan navigoinnin aalloilla ja tarjotaksemme parhaan mahdollisen käyttökokemuksen.', 121 learnMore: 'Navigoi asetuksiin', 122 }, 123 googleAnalytics: { 124 description: 'Kävijäseuranta', 125 }, 126 purposes: { 127 analytics: 'Analytiikka', 128 }, 129 acceptSelected: 'Hyväksy valitut', 130 acceptAll: 'Hyväksy kaikki', 131 ok: 'Hyväksy kaikki', 132 decline: 'Vain välttämättömät', 133 purposeItem: { 134 service: 'palvelu', 135 }, 136 }, 137 sv: { 138 privacyPolicyUrl: '/privacy', 139 consentNotice: { 140 description: 141 '<strong class="cn-banner-title">En smidig resa börjar med cookies</strong>Vi använder cookies för att säkerställa smidig navigering på vågorna och för att ge bästa möjliga upplevelse.', 142 learnMore: 'Navigera till inställningar', 143 }, 144 googleAnalytics: { 145 description: 'Besöksstatistik', 146 }, 147 purposes: { 148 analytics: 'Analys', 149 }, 150 ok: 'Acceptera alla', 151 decline: 'Endast nödvändiga', 152 acceptAll: 'Acceptera alla', 153 }, 154 en: { 155 privacyPolicyUrl: '/privacy', 156 consentNotice: { 157 description: 158 '<strong class="cn-banner-title">A smooth voyage begins with cookies</strong>We use cookies to ensure smooth navigation on the waves and to provide the best possible experience.', 159 learnMore: 'Navigate to settings', 160 }, 161 googleAnalytics: { 162 description: 'Visitor statistics collection', 163 }, 164 purposes: { 165 analytics: 'Analytics', 166 }, 167 ok: 'Accept all', 168 decline: 'Necessary only', 169 acceptAll: 'Accept all', 170 }, 171 }, 172 173 // This is a list of third-party services that Klaro will manage for you. 174 services: [ 175 { 176 // Each service should have a unique (and short) name. 177 name: 'google-analytics', 178 179 // If "default" is set to true, the service will be enabled by default 180 // Overwrites global "default" setting. 181 // We recommend leaving this to "false" for services that collect 182 // personal information. 183 default: false, 184 185 // The title of your service as listed in the consent modal. 186 title: 'Google Analytics', 187 188 // The purpose(s) of this service. Will be listed on the consent notice. 189 // Do not forget to add translations for all purposes you list here. 190 purposes: ['analytics'], 191 192 // A list of regex expressions or strings giving the names of
193 // cookies set by this service. If the user withdraws consent for a 194 // given service, Klaro will then automatically delete all matching 195 // cookies. 196 cookies: [ 197 // you can also explicitly provide a path and a domain for 198 // a given cookie. This is necessary if you have services that 199 // set cookies for a path that is not "/" or a domain that 200 // is not the current domain. If you do not set these values 201 // properly, the cookie can't be deleted by Klaro 202 // (there is no way to access the path or domain of a cookie in JS) 203 // Notice that it is not possible to delete cookies that were set 204 // on a third-party domain! See the note at mdn: 205 // https://developer.mozilla.org/en-US/docs/Web/API/Document/cookie#new-cookie_domain 206 [/^_ga(_.*)?$/, '/', 'bout.fi'], 207 [/^_ga(_.*)?$/, '/', 'localhost'], 208 [/^_ga(_.*)?$/, '/', '.bout.fi'], 209 [/^_ga(_.*)?$/], // Fallback 210 ], 211 212 // An optional callback function that will be called each time 213 // the consent state for the service changes (true=consented). Passes 214 // the `service` config as the second parameter as well. 215 callback: function (consent, service) { 216 // This handles the GA4 "Consent Mode" update 217 if (typeof window.gtag === 'function') { 218 window.gtag('consent', 'update', { 219 analytics_storage: consent ? 'granted' : 'denied', 220 }) 221 } 222 223 // This handles the "opt-out cookie" logic described in gatsby-plugin-google-gtag docs 224 // It effectively disables tracking entirely for this user 225 var gaProperty = 'G-VJLM77Y00Q' 226 var disableStr = 'ga-disable-' + gaProperty 227 228 if (consent) { 229 // Remove the disable flag if consent is given 230 window[disableStr] = false 231 document.cookie = 232 disableStr + '=; expires=Thu, 01 Jan 1970 00:00:00 UTC; path=/;' 233 } else { 234 // Set the disable flag if consent is denied 235 window[disableStr] = true 236 document.cookie = 237 disableStr + '=true; expires=Thu, 31 Dec 2099 23:59:59 UTC; path=/' 238 } 239 }, 240 241 // If "required" is set to true, Klaro will not allow this service to 242 // be disabled by the user. 243 required: false, 244 245 // If "optOut" is set to true, Klaro will load this service even before 246 // the user gave explicit consent. 247 // We recommend always leaving this "false". 248 optOut: false, 249 250 // If "onlyOnce" is set to true, the service will only be executed 251 // once regardless how often the user toggles it on and off. 252 onlyOnce: true, 253 }, 254 ], 255}
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.