Skip to content

Commit 24c43b2

Browse files
committed
replace cookie consent solution
1 parent 9331a5e commit 24c43b2

File tree

5 files changed

+1480
-1
lines changed

5 files changed

+1480
-1
lines changed

_includes/cookie-consent.html

Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
<!-- The free cookie consent is provided by https://silktide.com/consent-manager/ -->
2+
<link rel="stylesheet" id="silktide-consent-manager-css" href="{{ '/assets/cookie-consent/silktide-consent-manager.css' | relative_url }}">
3+
<script src="{{ '/assets/cookie-consent/silktide-consent-manager.js' | relative_url }}"></script>
4+
<script>
5+
silktideCookieBannerManager.updateCookieBannerConfig({
6+
background: {
7+
showBackground: true
8+
},
9+
cookieIcon: {
10+
position: "bottomLeft"
11+
},
12+
cookieTypes: [
13+
{
14+
id: "necessary",
15+
name: "Necessary",
16+
description: "<p>These cookies are necessary for the website to function properly and cannot be switched off. They help with things like logging in and setting your privacy preferences.</p>",
17+
required: true,
18+
onAccept: function() {
19+
// Add logic for the required Necessary here, when needed
20+
}
21+
},
22+
{
23+
id: "analytics",
24+
name: "Analytics",
25+
description: "<p>These cookies help us improve the site by tracking which pages are most popular and how visitors move around the site.</p>",
26+
required: false,
27+
onAccept: function() {
28+
gtag('consent', 'update', {
29+
analytics_storage: 'granted',
30+
});
31+
dataLayer.push({
32+
'event': 'consent_accepted_analytics',
33+
});
34+
},
35+
onReject: function() {
36+
gtag('consent', 'update', {
37+
analytics_storage: 'denied',
38+
});
39+
}
40+
}
41+
],
42+
text: {
43+
banner: {
44+
description: "<p>We use cookies on our site to enhance your user experience, provide personalized content, and analyze our traffic. <a href=\"{{ site.url }}/privacy-policy\" target=\"_blank\">Privacy Policy.</a></p>",
45+
acceptAllButtonText: "Accept all",
46+
acceptAllButtonAccessibleLabel: "Accept all cookies",
47+
rejectNonEssentialButtonText: "Reject non-essential",
48+
rejectNonEssentialButtonAccessibleLabel: "Reject non-essential",
49+
preferencesButtonText: "Preferences",
50+
preferencesButtonAccessibleLabel: "Toggle preferences"
51+
},
52+
preferences: {
53+
title: "Customize your cookie preferences",
54+
description: "<p>We respect your right to privacy. You can choose not to allow some types of cookies. Your cookie preferences will apply across our website. <a href=\"{{ site.url }}/privacy-policy\" target=\"_blank\">Privacy Policy.</a></p>",
55+
creditLinkText: "Get this banner for free",
56+
creditLinkAccessibleLabel: "Get this banner for free"
57+
}
58+
},
59+
position: {
60+
banner: "bottomCenter"
61+
}
62+
});
63+
</script>

_includes/head.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
<link rel="dns-prefetch" href="//use.fontawesome.com">
88

99
{%- if jekyll.environment == 'production' -%}
10-
<script id="CookieConsent" src="https://policy.app.cookieinformation.com/uc.js" data-culture="EN" data-gcm-version="2.0" type="text/javascript"></script>
10+
{%- include cookie-consent.html -%}
1111
{%- endif -%}
1212

1313
{%- seo -%}

assets/cookie-consent/README.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
The free cookie consent is provided by https://silktide.com/consent-manager/

0 commit comments

Comments
 (0)