Skip to content

Commit c49ed58

Browse files
author
Dhruva Shaw
committed
update on clickio
1 parent 3381729 commit c49ed58

File tree

2 files changed

+110
-0
lines changed

2 files changed

+110
-0
lines changed

_layouts/default.liquid

Lines changed: 106 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,112 @@
1212
{% endif %}
1313
<meta http-equiv="refresh" content="3; url={{ redirect }}">
1414
{% endif %}
15+
<!-- Default Consent Mode config -->
16+
<script>
17+
//<![CDATA[
18+
window.dataLayer = window.dataLayer || [];
19+
function gtag() {
20+
dataLayer.push(arguments);
21+
}
22+
gtag('consent', 'default', {
23+
ad_storage: 'granted',
24+
analytics_storage: 'granted',
25+
functionality_storage: 'granted',
26+
personalization_storage: 'granted',
27+
security_storage: 'granted',
28+
ad_user_data: 'granted',
29+
ad_personalization: 'granted',
30+
wait_for_update: 1500,
31+
});
32+
gtag('consent', 'default', {
33+
region: [
34+
'AT',
35+
'BE',
36+
'BG',
37+
'HR',
38+
'CY',
39+
'CZ',
40+
'DK',
41+
'EE',
42+
'FI',
43+
'FR',
44+
'DE',
45+
'GR',
46+
'HU',
47+
'IS',
48+
'IE',
49+
'IT',
50+
'LV',
51+
'LI',
52+
'LT',
53+
'LU',
54+
'MT',
55+
'NL',
56+
'NO',
57+
'PL',
58+
'PT',
59+
'RO',
60+
'SK',
61+
'SI',
62+
'ES',
63+
'SE',
64+
'GB',
65+
'CH',
66+
],
67+
ad_storage: 'denied',
68+
analytics_storage: 'denied',
69+
functionality_storage: 'denied',
70+
personalization_storage: 'denied',
71+
security_storage: 'denied',
72+
ad_user_data: 'denied',
73+
ad_personalization: 'denied',
74+
wait_for_update: 1500,
75+
});
76+
gtag('set', 'ads_data_redaction', true);
77+
gtag('set', 'url_passthrough', true);
78+
(function () {
79+
const s = {
80+
adStorage: { storageName: 'ad_storage', serialNumber: 0 },
81+
analyticsStorage: { storageName: 'analytics_storage', serialNumber: 1 },
82+
functionalityStorage: { storageName: 'functionality_storage', serialNumber: 2 },
83+
personalizationStorage: { storageName: 'personalization_storage', serialNumber: 3 },
84+
securityStorage: { storageName: 'security_storage', serialNumber: 4 },
85+
adUserData: { storageName: 'ad_user_data', serialNumber: 5 },
86+
adPersonalization: { storageName: 'ad_personalization', serialNumber: 6 },
87+
};
88+
let c = localStorage.getItem('__lxG__consent__v2');
89+
if (c) {
90+
c = JSON.parse(c);
91+
if (c && c.cls_val) c = c.cls_val;
92+
if (c) c = c.split('|');
93+
if (c && c.length && typeof c[14] !== undefined) {
94+
c = c[14].split('').map((e) => e - 0);
95+
if (c.length) {
96+
let t = {};
97+
Object.values(s)
98+
.sort((e, t) => e.serialNumber - t.serialNumber)
99+
.forEach((e) => {
100+
t[e.storageName] = c[e.serialNumber] ? 'granted' : 'denied';
101+
});
102+
gtag('consent', 'update', t);
103+
}
104+
}
105+
}
106+
if (Math.random() < 0.05) {
107+
if (
108+
window.dataLayer &&
109+
(window.dataLayer.some((e) => e[0] === 'js' && e[1] instanceof Date) ||
110+
window.dataLayer.some((e) => e['event'] === 'gtm.js' && e['gtm.start'] == true))
111+
) {
112+
document.head.appendChild(document.createElement('img')).src = '//clickiocdn.com/utr/gtag/?sid=240610';
113+
}
114+
}
115+
})();
116+
//]]>
117+
</script>
118+
119+
<!-- Clickio Consent Main tag -->
120+
<script async type="text/javascript" src="//clickiocmp.com/t/consent_240610.js"></script>
15121
{% include head.liquid %}
16122
</head>
17123

_pages/policy/privacy.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,4 +83,8 @@ By using our service(s), you acknowledge that you have read, understood, and agr
8383

8484
{::nomarkdown}
8585
<a href="#" onclick="if(window.__lxG__consent__!==undefined&amp;&amp;window.__lxG__consent__.getState()!==null){window.__lxG__consent__.showConsent()} else {alert('This function only for users from European Economic Area (EEA)')}; return false">Change privacy settings</a>
86+
87+
<style>body.clickio-cmp-in-scope .clickio-cmp-settings-display { display: inherit !important; }</style>
88+
89+
<a class="clickio-cmp-settings-text clickio-cmp-settings-display" style="display:none;" href="#">Your Privacy Choices</a>
8690
{:/nomarkdown}

0 commit comments

Comments
 (0)