|
| 1 | +// obtain cookieconsent plugin |
| 2 | +var cc = initCookieConsent(); |
| 3 | + |
| 4 | +var cookie = '🍪'; |
| 5 | + |
| 6 | +// run plugin with config object |
| 7 | +cc.run({ |
| 8 | + current_lang : 'en', |
| 9 | + autoclear_cookies : true, // default: false |
| 10 | + cookie_name: 'l64_cc_202208', // default: 'cc_cookie' |
| 11 | + cookie_expiration : 90, // default: 182 |
| 12 | + page_scripts: true, // default: false |
| 13 | + force_consent: true, // default: false |
| 14 | + |
| 15 | + // auto_language: null, // default: null; could also be 'browser' or 'document' |
| 16 | + autorun: true, // default: true |
| 17 | + delay: 2000, // default: 0 |
| 18 | + hide_from_bots: false, // default: false |
| 19 | + remove_cookie_tables: true, // default: false |
| 20 | + // cookie_domain: location.hostname, // default: current domain |
| 21 | + // cookie_path: "/", // default: root |
| 22 | + // cookie_same_site: "Lax", |
| 23 | + // use_rfc_cookie: false, // default: false |
| 24 | + // revision: 0, // default: 0 |
| 25 | + |
| 26 | + gui_options: { |
| 27 | + consent_modal: { |
| 28 | + layout: 'cloud', // box,cloud,bar |
| 29 | + position: 'bottom center', // bottom,middle,top + left,right,center |
| 30 | + transition: 'slide' // zoom,slide |
| 31 | + }, |
| 32 | + settings_modal: { |
| 33 | + layout: 'box', // box,bar |
| 34 | + // position: 'left', // right,left (available only if bar layout selected) |
| 35 | + transition: 'slide' // zoom,slide |
| 36 | + } |
| 37 | + }, |
| 38 | + |
| 39 | + onFirstAction: function(){ |
| 40 | + console.log('onFirstAction...'); |
| 41 | + }, |
| 42 | + |
| 43 | + onAccept: function (cookie) { |
| 44 | + console.log('onAccept...'); |
| 45 | + }, |
| 46 | + |
| 47 | + onChange: function (cookie, changed_preferences) { |
| 48 | + console.log('onChange...'); |
| 49 | + // If analytics category is disabled => disable google analytics |
| 50 | + if (!cc.allowedCategory('analytics')) { |
| 51 | + typeof gtag === 'function' && gtag('consent', 'update', { |
| 52 | + 'analytics_storage': 'denied' |
| 53 | + }); |
| 54 | + } |
| 55 | + }, |
| 56 | + |
| 57 | + languages: { |
| 58 | + 'en': { |
| 59 | + consent_modal: { |
| 60 | + title: cookie + ' We use cookies!', |
| 61 | + description: 'This website uses essential cookies to ensure its proper operation and tracking cookies to understand how you interact with it. The latter will be set only after consent. <button type="button" data-cc="c-settings" class="cc-link">Let me choose</button>', |
| 62 | + primary_btn: { |
| 63 | + text: 'Accept all', |
| 64 | + role: 'accept_all' // 'accept_selected' or 'accept_all' |
| 65 | + }, |
| 66 | + secondary_btn: { |
| 67 | + text: 'Reject all', |
| 68 | + role: 'accept_necessary' // 'settings' or 'accept_necessary' |
| 69 | + } |
| 70 | + }, |
| 71 | + settings_modal: { |
| 72 | + title: cookie + ' Cookie settings', |
| 73 | + save_settings_btn: 'Save settings', |
| 74 | + accept_all_btn: 'Accept all', |
| 75 | + reject_all_btn: 'Reject all', |
| 76 | + close_btn_label: 'Close', |
| 77 | + blocks: [ |
| 78 | + { |
| 79 | + title: 'Cookie usage 📢', |
| 80 | + description: 'We use cookies to ensure the basic functionalities of the website and to enhance your online experience. You can choose for each category to opt-in/out whenever you want. For more details relative to cookies and other sensitive data, please read the <a href="https://www.labs64.com/legal/privacy-policy/" class="cc-link">privacy policy</a>.' |
| 81 | + }, { |
| 82 | + title: 'Technically required cookies', |
| 83 | + description: 'These cookies are essential in order to enable you to move around the website and use its features, such as setting your privacy preferences, logging in or filling in forms. Without these cookies, services requested through usage of our website cannot be properly provided.', |
| 84 | + toggle: { |
| 85 | + value: 'necessary', |
| 86 | + enabled: true, |
| 87 | + readonly: true // cookie categories with readonly=true are all treated as "necessary cookies" |
| 88 | + } |
| 89 | + }, { |
| 90 | + title: 'Performance and Analytics cookies', |
| 91 | + description: 'These cookies collect information about how visitors use a website, for instance which pages visitors go to most often, and how visitors move around the site. They help us to improve the user friendliness of a website and therefore enhance the user’s experience.', |
| 92 | + toggle: { |
| 93 | + value: 'analytics', |
| 94 | + enabled: false, |
| 95 | + readonly: false |
| 96 | + } |
| 97 | + }, { |
| 98 | + title: 'Functionality and Usability cookies', |
| 99 | + description: 'These cookies allow the website to remember choices you make or information you enter (such as your username, language or the region you are in) and provide enhanced, more personal features. They are also used to enable enhanced website functions.', |
| 100 | + toggle: { |
| 101 | + value: 'usability', |
| 102 | + enabled: false, |
| 103 | + readonly: false |
| 104 | + } |
| 105 | + }, { |
| 106 | + title: 'More information', |
| 107 | + description: 'For any queries in relation to our policy on cookies and your choices, please <a class="cc-link" href="https://labs64.com/contact">contact us</a>.', |
| 108 | + } |
| 109 | + ] |
| 110 | + } |
| 111 | + } |
| 112 | + } |
| 113 | + |
| 114 | +}); |
0 commit comments