1// ============================== 2// ð¥ Google Consent Mode (Default) 3// ============================== 4window.dataLayer = window.dataLayer || []; 5function gtag(){dataLayer.push(arguments);} 6 7// Default: alles denied 8gtag('consent', 'default', { 9 'ad_storage': 'denied', 10 'analytics_storage': 'denied', 11 'ad_user_data': 'denied', 12 'ad_personalization': 'denied', 13 'wait_for_update': 500 14}); 15 16 17// ============================== 18// Helper: Consent updaten 19// ============================== 20function updateGoogleConsent() { 21 22 var analytics = cc.allowedCategory('analytics'); 23 var marketing = cc.allowedCategory('targeting'); // â ï¸ bei dir heisst es "targeting" 24 25 gtag('consent', 'update', { 26 'analytics_storage': analytics ? 'granted' : 'denied', 27 'ad_storage': marketing ? 'granted' : 'denied', 28 'ad_user_data': marketing ? 'granted' : 'denied', 29 'ad_personalization': marketing ? 'granted' : 'denied' 30 }); 31 32 console.log('Google Consent updated:', { 33 analytics: analytics, 34 marketing: marketing 35 }); 36} 37 38 39// ============================== 40// Cookie Consent 41// ============================== 42 43// obtain cookieconsent plugin 44var cc = initCookieConsent(); 45 46// example logo 47var logo = 'REMISE ROSA & COOKIES'; 48var cookie = 'ðª'; 49 50// run plugin with config object 51cc.run({ 52 current_lang : 'de', 53 autoclear_cookies : true, 54 cookie_name: 'cc_cookie', 55 cookie_expiration : 182, 56 page_scripts: true, 57 force_consent: false, 58 remove_cookie_tables: true, 59 60 gui_options: { 61 consent_modal: { 62 layout: 'box', 63 position: 'bottom left', 64 transition: 'slide' 65 }, 66 settings_modal: { 67 layout: 'box', 68 transition: 'slide' 69 } 70 }, 71 72 // ============================== 73 // ð¥ WICHTIG: EVENTS 74 // ============================== 75 76 onFirstAction: function(){ 77 console.log('onFirstAction fired'); 78 updateGoogleConsent(); 79 }, 80 81 onAccept: function (cookie) { 82 console.log('onAccept fired ...'); 83 updateGoogleConsent(); 84 }, 85 86 onChange: function (cookie, changed_preferences) { 87 console.log('onChange fired ...'); 88 updateGoogleConsent(); 89 }, 90 91 languages: { 92 'de': { 93 consent_modal: { 94 title: consentVar1, 95 description: consentVar2 + ' <button type="button" data-cc="c-settings" class="cc-link">Cookie-Einstellungen</button>', 96 primary_btn: { 97 text: 'Alle akzeptieren', 98 role: 'accept_all' 99 }, 100 secondary_btn: { 101 text: 'Alle ablehnen', 102 role: 'accept_necessary' 103 } 104 }, 105 settings_modal: { 106 title: logo, 107 save_settings_btn: 'Auswahl speichern', 108 accept_all_btn: 'Alle akzeptieren', 109 reject_all_btn: 'Alle ablehnen', 110 close_btn_label: 'Schliessen', 111 cookie_table_headers: [ 112 {col1: 'Name'}, 113 {col2: 'Domain'}, 114 {col3: 'Expiration'}, 115 {col4: 'Description'} 116 ], 117 blocks: [ 118 { 119 title: consentVar3, 120 description: consentVar4 121 }, { 122 title: consentVar5, 123 description: consentVar6, 124 toggle: { 125 value: 'necessary', 126 enabled: true, 127 readonly: true 128 } 129 }, { 130 title: consentVar7, 131 description: consentVar8, 132 toggle: { 133 value: 'analytics', 134 enabled: false, 135 readonly: false 136 } 137 }, { 138 title: consentVar9, 139 description: consentVar10, 140 toggle: { 141 value: 'targeting', 142 enabled: false, 143 readonly: false 144 } 145 }, { 146 title: consentVar11, 147 description: consentVar12, 148 } 149 ] 150 } 151 } 152 } 153 154});
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.