-
-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #109 from chriskyfung:fixes/improve-cookie-consent
Comprehensive Update to Consent Handling, Integration, and Documentation
- Loading branch information
Showing
11 changed files
with
172 additions
and
48 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
{{ content }} |
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,53 @@ | ||
--- | ||
layout: blank | ||
--- | ||
|
||
<div id="disqus_thread"></div> | ||
<script> | ||
window.addEventListener('message', receiveMessage, false); | ||
function receiveMessage(event) | ||
{ | ||
if (event.data) { | ||
var msg; | ||
try { | ||
msg = JSON.parse(event.data); | ||
} catch (err) { | ||
// Do nothing | ||
} | ||
if (!msg) | ||
return false; | ||
|
||
if (msg.name === 'resize' || msg.name === 'rendered') { | ||
window.parent.postMessage({ | ||
sentinel: 'amp', | ||
type: 'embed-size', | ||
height: document.body.offsetHeight | ||
}, '*'); | ||
} | ||
} | ||
} | ||
</script> | ||
<script> | ||
/** | ||
* RECOMMENDED CONFIGURATION VARIABLES: EDIT AND UNCOMMENT THE SECTION BELOW TO INSERT DYNAMIC VALUES FROM YOUR PLATFORM OR CMS. | ||
* LEARN WHY DEFINING THESE VARIABLES IS IMPORTANT: https://disqus.com/admin/universalcode/#configuration-variables | ||
*/ | ||
var disqus_config = function () { | ||
var params = new URLSearchParams(window.location.search); | ||
this.page.url = params.get("url"); | ||
this.page.title = params.get("title"); | ||
}; | ||
(function() { // DON'T EDIT BELOW THIS LINE | ||
var d = document, s = d.createElement('script'); | ||
|
||
s.src = 'https://{{ site.amp_disqus.shortname }}.disqus.com/embed.js'; | ||
|
||
s.setAttribute('data-timestamp', +new Date()); | ||
(d.head || d.body).appendChild(s); | ||
})(); | ||
</script> | ||
<style> | ||
iframe[src*="ads-iframe"] { | ||
display:none; | ||
} | ||
</style> |
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,40 @@ | ||
--- | ||
layout: blank | ||
--- | ||
|
||
<!doctype html> | ||
<html lang="en"> | ||
|
||
<head> | ||
<meta charset="UTF-8"> | ||
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | ||
<meta http-equiv="X-UA-Compatible" content="ie=edge"> | ||
<meta name="robots" content="noindex"> | ||
<title>AMP Cookie Consent</title> | ||
</head> | ||
|
||
<body class="iubenda-cookie-solution"> | ||
<span class="iubenda-cs-preferences-link"></span> | ||
<script type="text/javascript"> | ||
var _iub = _iub || []; | ||
// Your own Privacy Controls and Cookie Solution configuration | ||
_iub.csConfiguration = { | ||
lang: 'en', | ||
siteId: {{ site.iubenda.siteId }}, // Your own site ID | ||
cookiePolicyId: {{ site.iubenda.cookiePolicyId }}, // Your own cookie policy ID | ||
enableTcf: true, | ||
askConsentIfCMPNotFound: true, | ||
googleAdditionalConsentMode: true, | ||
googleAdsPreferenceManagement: true, | ||
floatingPreferencesButtonDisplay: false, | ||
banner: { | ||
acceptButtonDisplay: true, // Recommended | ||
customizeButtonDisplay: true, // Recommended | ||
rejectButtonDisplay: true // Advisable | ||
} | ||
}; | ||
</script> | ||
<script type="text/javascript" src="//cdn.iubenda.com/cs/iubenda_cs.js" charset="UTF-8" async></script> | ||
</body> | ||
|
||
</html> |
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