generated from alshedivat/al-folio
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add privacy policy, cookie policy and cookie consent using osano
- Loading branch information
1 parent
336c66e
commit 1da3ce8
Showing
15 changed files
with
375 additions
and
26 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
{% if site.enable_google_tag_manager %} | ||
<!-- Google Tag Manager (noscript) --> | ||
<noscript><iframe src="https://www.googletagmanager.com/ns.html?id={{ site.google_tag_manager }}" | ||
height="0" width="0" style="display:none;visibility:hidden"></iframe></noscript> | ||
<!-- End Google Tag Manager (noscript) --> | ||
{% endif %} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,82 @@ | ||
{% if site.enable_osano %} | ||
<!-- Osano Cookie Consent --> | ||
<script src="https://cdn.jsdelivr.net/npm/cookieconsent@3/build/cookieconsent.min.js"></script> | ||
<script> | ||
function consentAnalyticsStorage() { | ||
gtag('consent', 'update', { | ||
'analytics_storage': 'granted' | ||
}); | ||
} | ||
function denyAnalyticsStorage() { | ||
gtag('consent', 'update', { | ||
'analytics_storage': 'denied' | ||
}); | ||
} | ||
window.cookieconsent.initialise({ | ||
container: document.getElementById("osano-cookieconsent"), | ||
palette: { | ||
"popup": { | ||
"background": "#e7c000", | ||
"text": "#000" | ||
}, | ||
"button": { | ||
"background": "#009f06" | ||
}, | ||
"highlight": { | ||
"background": "#b71c1c" | ||
} | ||
}, | ||
content: { | ||
allow: 'Allow All', | ||
deny: 'Deny', | ||
link: 'Privacy Policy', | ||
href: '/terms/', | ||
header: 'A note to visitors', | ||
message: 'This website uses only necessary and statistics cookies to improve functionality and analyse traffic. It does not use marketing or tracking cookies and it does not process any personally identifiable information. Please visit Privacy Policy page for more details.' | ||
}, | ||
elements: { | ||
'messagelink': '<span id="cookieconsent:desc" class="cc-message-custom">\{\{message\}\} <strong><a aria-label="learn more about cookies" tabindex="0" class="cc-link" href="\{\{href\}\}" target="_self">\{\{link\}\}</a></strong></span>' | ||
}, | ||
type: "opt-in", | ||
revokable: true, | ||
animateRevokable: false, | ||
onInitialise: function (status) { | ||
var type = this.options.type; | ||
var didConsent = this.hasConsented(); | ||
if (type == 'opt-in' && didConsent) { | ||
// enable cookies | ||
consentAnalyticsStorage(); | ||
} | ||
if (type == 'opt-out' && !didConsent) { | ||
// disable cookies | ||
} | ||
}, | ||
onStatusChange: function (status, chosenBefore) { | ||
var type = this.options.type; | ||
var didConsent = this.hasConsented(); | ||
if (type == 'opt-in' && didConsent) { | ||
// enable cookies | ||
consentAnalyticsStorage(); | ||
} | ||
if (type == 'opt-out' && !didConsent) { | ||
// disable cookies | ||
} | ||
}, | ||
onRevokeChoice: function () { | ||
var type = this.options.type; | ||
if (type == 'opt-in') { | ||
denyAnalyticsStorage(); | ||
} | ||
if (type == 'opt-out') { | ||
// enable cookies | ||
consentAnalyticsStorage(); | ||
} | ||
}, | ||
law: { | ||
regionalLaw: false, | ||
}, | ||
location: true, | ||
}); | ||
</script> | ||
<!-- Osano Cookie Consent --> | ||
{% endif %} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.