1//Script to control the Analytics measurement mode (Privacy Mode) with ARP 2window.addEventListener("econda_uc", function (e) { 3 4 window.econda.ready(() => { 5 let isPrivacyProtectionReady = window.econda.arp && 6 window.econda.arp.PrivacyProtection && 7 window.econda.arp.PrivacyProtection.getProfileState 8 && window.econda.arp.PrivacyProtection.updatePermissions 9 if (e.detail.event === "consent_status" && e.detail["econda Analytics"] === false) { 10 if (e.detail.event === "consent_status" && e.detail["econda ARP"] === true) { 11 window.emos3.send({'privacy_mode': 4}); 12 13 if (isPrivacyProtectionReady && window.econda.arp.PrivacyProtection.getProfileState() !== 'ALLOW') { 14 try { 15 window.econda.arp.PrivacyProtection.updatePermissions([{ 16 state: 'ALLOW', 17 version: '5.0', 18 timestamp: new Date().toISOString() 19 }]); 20 } catch (e) { 21 console.error('Could not update econda Privacy Protection settings.') 22 } 23 } 24 } else if (e.detail.event === "consent_status" && e.detail["econda ARP"] === false) { 25 window.emos3.send({'privacy_mode': 4}); 26 27 if (isPrivacyProtectionReady && window.econda.arp.PrivacyProtection.getProfileState() !== 'DENY') { 28 try { 29 window.econda.arp.PrivacyProtection.updatePermissions([{ 30 state: 'DENY', 31 version: '5.0', 32 timestamp: new Date().toISOString() 33 }]); 34 } catch (e) { 35 console.error('Could not update econda Privacy Protection settings.') 36 } 37 } 38 } 39 } else if (e.detail.event === "consent_status" && e.detail["econda Analytics"] === true) { 40 if (e.detail.event === "consent_status" && e.detail["econda ARP"] === true) { 41 if (localStorage.getItem("emos_privacy") !== '3') { 42 window.emos3.send({'privacy_mode': 3}); 43 } 44 45 if (isPrivacyProtectionReady && window.econda.arp.PrivacyProtection.getProfileState() !== 'ALLOW') { 46 try { 47 window.econda.arp.PrivacyProtection.updatePermissions([{ 48 state: 'ALLOW', 49 version: '5.0', 50 timestamp: new Date().toISOString() 51 }]); 52 } catch (e) { 53 console.error('Could not update econda Privacy Protection settings.') 54 } 55 } 56 } else if (e.detail.event === "consent_status" && e.detail["econda ARP"] === false) { 57 if (localStorage.getItem("emos_privacy") !== '3') { 58 window.emos3.send({'privacy_mode': 3}); 59 } 60 61 if (isPrivacyProtectionReady && window.econda.arp.PrivacyProtection.getProfileState() !== 'DENY') { 62 try { 63 window.econda.arp.PrivacyProtection.updatePermissions([{ 64 state: 'DENY', 65 version: '5.0', 66 timestamp: new Date().toISOString() 67 }]) 68 } catch (e) { 69 console.error('Could not update econda Privacy Protection settings.') 70 } 71 } 72 } 73 } 74 }); 75});
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.