-
Notifications
You must be signed in to change notification settings - Fork 809
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
AMP Support for Cookies and Consent #15722
Conversation
* Adds a `amp-consent` component when the AMP site is being viewed based on the widget settings
This is an automated check which relies on |
Nice work. Thanks |
@jeherve This is ready for review. I see there is a notice to Should this be added? I see the original widget template file is not in there. |
Yeah, you should be able to add the file you modified to jetpack/bin/phpcs-whitelist.js Line 1 in db3e471
|
Cool! I've added it 👍 |
Internal reference: D43710-code |
…etpack_AMP_Support
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This works well for me now. Merging!
r207915-wpcom |
Adds an
amp-consent
component when the AMP site is being viewed based on the Cookies and Consent widget settings.Fixes #14398 (EU Cookie Law Widget)
Is this a new feature or does it add/remove features to an existing part of Jetpack?
Testing instructions:
![Screenshot 2020-05-08 at 13 34 32](https://user-images.githubusercontent.com/49400/81401998-d5399580-9130-11ea-8c09-9173f8c7449b.png)
* Customise the widget options as desired * Go to the AMP frontend by adding `?amp` to the end of your site url and ensure the consent banner shows up and is customised as per the options selected on the widget.Additional considerations
I was able to apply most of the settings from the widget to the AMP version of the widget, however the the AMP Consent tag does now allow us to expire after a certain number of days, unless we do server side consent and not client side.
Additionally, the is an option to accept consent on first scroll or after a certain amount of time has passed. However, with AMP we would be able to hide the notice on the above parameters, but there does not appear to be a way to hide and accept the notice. So even though it disappears, the consent would not have been accepted.
I feel for AMP, we should just force the user to click Accept for the modal to be removed. Here are the options I'm talking about:
Lastly, there are no widget areas on the "Reader" mode template. So it's not possible to add this. widget to that theme unless a user customises the theme and adds widget areas.