-
-
Notifications
You must be signed in to change notification settings - Fork 12
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
✨ Feat (UI): Implement Granular Consent UI for GDPR Compliance 🍪 #44
Comments
Proposed Consent UI DesignTo collect cookie consent on AMP pages, we intend to incorporate the following AMP components in the design of the Consent UI:
To gather cookie consent on AMP pages, it's necessary to utilize the Our Consent UI is designed to manage the following specific user interactions:
The
The interaction between these elements is as follows:
References:
|
Cookie Consent SamplesCodePen:
Glitch: And more...: |
Some Known Issues of
|
This commit introduces the `amp-consent` extension into the HEAD element of the `_layouts/default.html` template file in our Jekyll theme. The addition of the `amp-consent` extension is a crucial step towards the development of a fully functional cookie consent notice. This extension enables the cookie consent notice to display appropriately and collect user consent effectively. This change ensures that our Jekyll theme is compliant with user consent requirements. See: ✨ Add Cookie Consent Notice Banner 🍪 #44
This commit develops a granular cookie consent UI, composed of three key visual components: - a consent banner featuring "Accept All" and "Preference" buttons, - a cookie preference modal that enables users to select their consent preferences, and - a round sticky button positioned at the bottom left corner of the screen that allows users to reopen the consent banner. This UI is constructed in `/consent/granular-user-consent.html` and its corresponding CSS styles are defined in `/css/amp_consent.css` under the `_includes` folder. The consent UI is designed to cater to four consent purposes: Essential, Functional, Analytics, and Advertising. This allows users to provide consent on a per-purpose basis, enhancing user control and privacy. The consent UI utilizes AMP (Accelerated Mobile Pages) technology, including the use of the `amp-consent`, `amp-bind`, and `amp-script` extensions to manage user interactions and consent states. Here's a brief overview of what the code does: 1. Use `amp-state` to hold the consent states for different types of cookies (essential, functional, analytics, advertising). 2. Use `amp-script` to load the stored consent states from the local storage and override the default values defined in the `amp-state`. 3. Use `amp-consent` to set up a consent UI and a post consent UI. The consent UI includes a consent banner and a cookie preference modal. 4. The consent banner has an "Accept All" button and a "Preferences" button. The "Preferences" button made up with multiple instances, each instance is associated with a different set of consent purposes and is shown or hidden based on the current consent state. 5. The cookie preference modal allows users to select their consent preferences for different types of cookies. It also includes "Accept" and "Decline" buttons. 6. The post consent UI includes a button that prompts the consent UI when clicked. The consent interface is incorporated into the default layout (_layouts/default.html) using Jekyll include tags. To ensure the CSS styles for the consent UI are loaded at the start of the page load, we import the `amp_consent.css` into the HEAD element of the default layout. To make the consent UI immediately visible to users when the page loads, we import the `granular-user-consent.html` into the default layout just below the `<body>` tag. see: #44
This change makes the `amp-script` extension mandatory, which is necessary for the custom script to be able to access the localstorage, where the stored consent states are kept. Without this change, the custom script would not be able to read the stored consent states and would not be able to function properly. See: #44
This commit update the cookie consent UI to read the stored consent states from the LocalStorage using the key `amp-store:{{ site.url }}` instead of the previously used `amp-store:http://127.0.0.1:4000`. This change provides a more accurate and reliable way of retrieving consent states, as it is now tied to the specific site domain rather than a local host address. This will improve the overall functionality of the cookie consent feature and enhance the user experience. See: #44
This commit update the cookie consent UI to read the stored consent states from the LocalStorage using the key `amp-store:{{ site.url }}` instead of the previously used `amp-store:http://127.0.0.1:4000`. This change provides a more accurate and reliable way of retrieving consent states, as it is now tied to the specific site domain rather than a local host address. This will improve the overall functionality of the cookie consent feature and enhance the user experience. See: #44
This commit introduces several key updates to further enhance user control over the cookie consent interface and the import of AMP extensions. - Modified to allow enabling or disabling the cookie consent interface by setting `consent=true/false` in the `_config.yml` file. This provides greater flexibility in managing user consent preferences. - Modified to conditionally import the minified `amp-consent.css`, `amp-consent` and `amp-script` extensions. This change optimizes the loading based on the specific needs of the page, improving overall performance. - Modified the `granular-user-consent.html` to allow removing the `data-ampdevmode` attribute from the custom script by setting `consent_dev_mode=false`. This remains particularly useful when building the site with the AMP Optimizer, which generates the hash for the script and inserts the `<meta>` tag automatically. - Added `consent=true` and `consent_dev_mode=false` in the `_config.yml` file for the demo site. These updates collectively aim to provide users with more control over their site's consent interface and AMP extension usage, while also improving site performance and development efficiency. See: #44
This commit update the cookie consent UI to read the stored consent states from the LocalStorage using the key `amp-store:{{ site.url }}` instead of the previously used `amp-store:http://127.0.0.1:4000`. This change provides a more accurate and reliable way of retrieving consent states, as it is now tied to the specific site domain rather than a local host address. This will improve the overall functionality of the cookie consent feature and enhance the user experience. See: #44
This commit introduces several key updates to further enhance user control over the cookie consent interface and the import of AMP extensions. - Modified to allow enabling or disabling the cookie consent interface by setting `consent=true/false` in the `_config.yml` file. This provides greater flexibility in managing user consent preferences. - Modified to conditionally import the minified `amp-consent.css`, `amp-consent` and `amp-script` extensions. This change optimizes the loading based on the specific needs of the page, improving overall performance. - Modified the `granular-user-consent.html` to allow removing the `data-ampdevmode` attribute from the custom script by setting `consent_dev_mode=false`. This remains particularly useful when building the site with the AMP Optimizer, which generates the hash for the script and inserts the `<meta>` tag automatically. - Added `consent=true` and `consent_dev_mode=false` in the `_config.yml` file for the demo site. These updates collectively aim to provide users with more control over their site's consent interface and AMP extension usage, while also improving site performance and development efficiency. See: #44
This commit adds the `data-block-on-consent-purposes="functional"` attribute to the `amp-iframe` component used for Disqus Comments. This change ensures that the Disqus comments feature will only function if the user has given their consent, in compliance with GDPR and other privacy regulations, when the consent UI is enabled. This enhances the privacy controls of the site and respects user preferences. The addition of this attribute does not affect the overall performance of the site or the Disqus comments feature. It simply adds an additional layer of user consent verification before the Disqus comments functionality is enabled. See: #44
This commit adds the `data-block-on-consent-purposes="functional"` attribute to the `amp-addthis` component. This change ensures that the AddThis share buttons feature will only function if the user has given their consent, in compliance with GDPR and other privacy regulations, when the consent UI is enabled. This enhances the privacy controls of the site and respects user preferences. See: #44
This commit adds the `data-block-on-consent-purposes="advertising"` attribute to both the `amp-ad` and `amp-auto-ads` components. This change ensures that the Adsense ads will only be displayed if the user has given their consent for advertising cookies, in compliance with GDPR and other privacy regulations, when the consent UI is enabled. See: #44
Added the `data-block-on-consent-purposes="analytics"` attribute to `amp-analytics` components. This change ensures that the Google Analytics will only tracking events if the user has given their consent for analytics cookies, in compliance with GDPR and other privacy regulations, when the consent UI is enabled. See: #44
This commit introduces several key updates to further enhance user control over the cookie consent interface and the import of AMP extensions. - Modified to allow enabling or disabling the cookie consent interface by setting `consent=true/false` in the `_config.yml` file. This provides greater flexibility in managing user consent preferences. - Modified to conditionally import the minified `amp-consent.css`, `amp-consent` and `amp-script` extensions. This change optimizes the loading based on the specific needs of the page, improving overall performance. - Modified the `granular-user-consent.html` to allow removing the `data-ampdevmode` attribute from the custom script by setting `consent_dev_mode=false`. This remains particularly useful when building the site with the AMP Optimizer, which generates the hash for the script and inserts the `meta` tag automatically. - Added `consent=true` and `consent_dev_mode=false` in the `_config.yml` file for the demo site. These updates collectively aim to provide users with more control over their site's consent interface and AMP extension usage, while also improving site performance and development efficiency. Additionally, the documentation in the `config-guide.md` has been updated to reflect these changes and provide guidance on how to use this new feature. See: #44
This commit adds the `data-block-on-consent-purposes="functional"` attribute to the `amp-iframe` component used for Disqus Comments. This change ensures that the Disqus comments feature will only function if the user has given their consent, in compliance with GDPR and other privacy regulations, when the consent UI is enabled. This enhances the privacy controls of the site and respects user preferences. The addition of this attribute does not affect the overall performance of the site or the Disqus comments feature. It simply adds an additional layer of user consent verification before the Disqus comments functionality is enabled. See: #44
This commit adds the `data-block-on-consent-purposes="functional"` attribute to the `amp-addthis` component. This change ensures that the AddThis share buttons feature will only function if the user has given their consent, in compliance with GDPR and other privacy regulations, when the consent UI is enabled. This enhances the privacy controls of the site and respects user preferences. See: #44
This commit adds the `data-block-on-consent-purposes="advertising"` attribute to both the `amp-ad` and `amp-auto-ads` components. This change ensures that the Adsense ads will only be displayed if the user has given their consent for advertising cookies, in compliance with GDPR and other privacy regulations, when the consent UI is enabled. See: #44
Added the `data-block-on-consent-purposes="analytics"` attribute to `amp-analytics` components. This change ensures that the Google Analytics will only tracking events if the user has given their consent for analytics cookies, in compliance with GDPR and other privacy regulations, when the consent UI is enabled. See: #44
This commit introduces several key updates to further enhance user control over the cookie consent interface and the import of AMP extensions. - Modified to allow enabling or disabling the cookie consent interface by setting `consent=true/false` in the `_config.yml` file. This provides greater flexibility in managing user consent preferences. - Modified to conditionally import the minified `amp-consent.css`, `amp-consent` and `amp-script` extensions. This change optimizes the loading based on the specific needs of the page, improving overall performance. - Modified the `granular-user-consent.html` to allow removing the `data-ampdevmode` attribute from the custom script by setting `consent_dev_mode=false`. This remains particularly useful when building the site with the AMP Optimizer, which generates the hash for the script and inserts the `meta` tag automatically. - Added `consent=true` and `consent_dev_mode=false` in the `_config.yml` file for the demo site. These updates collectively aim to provide users with more control over their site's consent interface and AMP extension usage, while also improving site performance and development efficiency. Additionally, the documentation in the `config-guide.md` has been updated to reflect these changes and provide guidance on how to use this new feature. See: #44
This commit adds the `data-block-on-consent-purposes="functional"` attribute to the `amp-iframe` component used for Disqus Comments. This change ensures that the Disqus comments feature will only function if the user has given their consent, in compliance with GDPR and other privacy regulations, when the consent UI is enabled. This enhances the privacy controls of the site and respects user preferences. The addition of this attribute does not affect the overall performance of the site or the Disqus comments feature. It simply adds an additional layer of user consent verification before the Disqus comments functionality is enabled. See: #44
This commit adds the `data-block-on-consent-purposes="functional"` attribute to the `amp-addthis` component. This change ensures that the AddThis share buttons feature will only function if the user has given their consent, in compliance with GDPR and other privacy regulations, when the consent UI is enabled. This enhances the privacy controls of the site and respects user preferences. See: #44
This commit adds the `data-block-on-consent-purposes="advertising"` attribute to both the `amp-ad` and `amp-auto-ads` components. This change ensures that the Adsense ads will only be displayed if the user has given their consent for advertising cookies, in compliance with GDPR and other privacy regulations, when the consent UI is enabled. See: #44
Added the `data-block-on-consent-purposes="analytics"` attribute to `amp-analytics` components. This change ensures that the Google Analytics will only tracking events if the user has given their consent for analytics cookies, in compliance with GDPR and other privacy regulations, when the consent UI is enabled. See: #44
This commit removes the `data-ampdevmode` attribute from the `<amp-script>` component in non-development environments. This attribute is used to enable development-specific features, such as the ability to load scripts from a local server. However, it can also lead to unintended behavior in production environments, such as preventing scripts from running or causing validation errors. By removing this attribute in non-development environments, we ensure that AMP pages are always served with the correct configuration and that scripts are executed as intended. To address this issue, this commit adds two new options to the site configuration: - `amp_optimizer`: Set true if you run AMP Optimizer after building the Jekyll site. Defaults to false. - `script_hash`: A hash for the get_stored_consentStates script. Defaults to empty. Fixes #58 See also #44
This commit removes the `data-ampdevmode` attribute from the `<amp-script>` component in non-development environments. This attribute is used to enable development-specific features, such as the ability to load scripts from a local server. However, it can also lead to unintended behavior in production environments, such as preventing scripts from running or causing validation errors. By removing this attribute in non-development environments, we ensure that AMP pages are always served with the correct configuration and that scripts are executed as intended. To address this issue, this commit adds two new options to the site configuration: - `amp_optimizer`: Set true if you run AMP Optimizer after building the Jekyll site. Defaults to false. - `script_hash`: A hash for the get_stored_consentStates script. Defaults to empty. Fixes #58 See also #44
This commit removes the `data-ampdevmode` attribute from the `<amp-script>` component in non-development environments. This attribute is used to enable development-specific features, such as the ability to load scripts from a local server. However, it can also lead to unintended behavior in production environments, such as preventing scripts from running or causing validation errors. By removing this attribute in non-development environments, we ensure that AMP pages are always served with the correct configuration and that scripts are executed as intended. To address this issue, this commit adds two new options to the site configuration: - `amp_optimizer`: Set true if you run AMP Optimizer after building the Jekyll site. Defaults to false. - `script_hash`: A hash for the get_stored_consentStates script. Defaults to empty. Fixes #58 See also #44
ConsentManager CMPTo configure Step-by-Step Configuration
Example ConfigurationHere's a complete example of how your AMP page might look with the <!doctype html>
<html ⚡>
<head>
<meta charset="utf-8">
<title>AMP Consent Example</title>
<link rel="canonical" href="self.html">
<meta name="viewport" content="width=device-width,minimum-scale=1,initial-scale=1">
<script async src="https://cdn.ampproject.org/v0.js"></script>
<script async custom-element="amp-consent" src="https://cdn.ampproject.org/v0/amp-consent-0.1.js"></script>
<meta name="amp-consent-blocking" content="amp-ad">
</head>
<body>
<amp-consent id="ConsentManager" layout="nodisplay" type="ConsentManager">
<script type="application/json">
{
"postPromptUI": "postPromptUI",
"clientConfig": {
"cdid": "Your CMP Code-ID",
"params": ""
}
}
</script>
<div id="postPromptUI">
<button on="tap:ConsentManager.prompt()" role="button">Manage privacy settings</button>
</div>
</amp-consent>
<amp-ad data-block-on-consent type="doubleclick" width="300" height="250" layout="responsive"></amp-ad>
<amp-analytics data-block-on-consent type="googleanalytics"></amp-analytics>
</body>
</html> For more detailed instructions and examples, you can refer to the AMP example ConsentManager documentation. This should help you get started with integrating ConsentManager CMP on your AMP pages. |
Ensuring Compliance with
|
Title: Implement Granular Consent UI for GDPR Compliance
Description
The current AMP-ready Jekyll theme includes services that utilize cookies to store user data. To ensure compliance with the General Data Protection Regulation (GDPR), we need to implement a granular consent UI that allows users to control their cookies on a per-purpose basis.
Problem
The theme does not currently provide users with a way to opt in or out of specific cookie purposes, which could result in non-compliance with GDPR requirements.
Proposed Solution
We propose implementing a Consent UI that includes the following features:
Possible Implementations
One possible implementation could involve using a third-party consent management platform (CMP) that is AMP-compatible. CMPs provide a range of features out-of-the-box, including granular consent options, data collection, and reporting.
Another approach could be to develop a custom Consent UI using AMP elements. This would require more development effort but could provide greater control over the UI's design and functionality.
Benefits
Implementing a granular Consent UI will provide the following benefits:
Timeline
This feature should be prioritized and completed within the next sprint.
Assignee
To be assigned after discussion and review of proposed implementations.
Additional Notes
Development of a custom Consent UI using AMP elements
Objectives
Tasks
Phase 1: Design and Development
Phase 2: Integration and Testing
Phase 3: Deployment and Maintenance
Additional Tasks
The text was updated successfully, but these errors were encountered: