-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathexample.html
More file actions
36 lines (29 loc) · 1.03 KB
/
example.html
File metadata and controls
36 lines (29 loc) · 1.03 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
<!DOCTYPE html>
<meta charset="utf-8"/>
<link rel="icon" href="about:invalid"/>
<script src="adpc-request-consent.js"></script>
<b id="status">
The visitor has not (yet) consented to data processing for personalised recommendations.
</b>
<script>
const status = document.getElementById('status');
// We ask consent for one processing operation.
const consentRequests = [
{
id: "content_recommendation",
text: "Creating an interest profile based on the pages you visit, to recommend you more interesting content.",
onConsent: () => {
status.innerText = 'The visitor consents to data processing for personalised recommendations.';
// …enable content personalisation here…
},
onWithdraw: () => {
status.innerText = 'The visitor no longer consents to data processing for personalised recommendations.';
// …disable content personalisation here…
},
}
];
// Make the consent request.
AdpcRequestConsent(consentRequests).catch(error => {
status.innerText += `\n${error.message}`;
});
</script>