-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathinit.js
More file actions
119 lines (117 loc) · 4.23 KB
/
init.js
File metadata and controls
119 lines (117 loc) · 4.23 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
/* eslint-disable no-undef */
function loadScript(src) {
return new Promise((resolve, reject) => {
const s = document.createElement("script");
s.src = src;
s.onload = resolve;
s.onerror = reject;
document.head.appendChild(s);
});
}
// Usage
loadScript("/cookieconsent.umd.js").then(() => {
CookieConsent.run({
cookie: {
name: "rv-cookie",
},
categories: {
necessary: { enabled: true, readOnly: true },
analytics: { enabled: true },
},
language: {
default: "en",
translations: {
en: {
consentModal: {
title: "We use cookies",
description:
"Hi, this website uses essential cookies to ensure its proper operation and tracking cookies to understand how you interact with it. The latter are set only after your consent.",
acceptAllBtn: "Accept all",
acceptNecessaryBtn: "Reject all",
showPreferencesBtn: "Manage individual preferences",
},
preferencesModal: {
title: "Cookie preferences",
acceptAllBtn: "Accept all",
acceptNecessaryBtn: "Reject all",
savePreferencesBtn: "Accept current selection",
closeIconLabel: "Close modal",
sections: [
{
title: "Strictly necessary cookies",
description:
"These cookies are essential for the proper functioning of this website. Without them, the website would not work properly.",
linkedCategory: "necessary",
cookieTable: {
headers: {
name: "Name",
domain: "Domain",
expiration: "Expiration",
description: "Description",
},
body: [
{
name: "rv-cookie",
domain: "validator.axe-api.com",
expiration: "6 months",
description: "Remembers your cookie preferences.",
},
],
},
},
{
title: "Performance and analytics",
description:
"These cookies collect information about how you use our website. All of the data is anonymized and cannot be used to identify you.",
linkedCategory: "analytics",
cookieTable: {
headers: {
name: "Name",
domain: "Domain",
expiration: "Expiration",
description: "Description",
},
body: [
{
name: "^_ga",
domain: "google.com",
expiration: "2 years",
description:
"Used to distinguish users by assigning a unique client ID.",
},
{
name: "^_ga_",
domain: "google.com",
expiration: "2 years",
description:
"Used by Google Analytics 4 to persist session state for a specific property.",
},
{
name: "^_gid",
domain: "google.com",
expiration: "24 hours",
description:
"Used to distinguish users and track user behavior for 24 hours after visiting the site.",
},
{
name: "^_gat",
domain: "google.com",
expiration: "1 minute",
description:
"Used to throttle the request rate to Google Analytics servers.",
},
],
},
},
{
title: "More information",
description:
'For any queries regarding our cookie policy and your choices, please <a href="mailto:i.ozguradem@gmail.com">contact us</a>.',
},
],
},
},
},
},
});
});