wp-toolbelt
wp-toolbelt copied to clipboard
Improving GDPR module
Hi, I have some suggestions for the GDPR (cookie) module. I have read the other opened and closed issues to try not to repeat them here, but I will link some of them, so we can have all on the same place. I was looking for a simple GPDR plugin and I saw that such thing does not exist. So I thought that it could be made just adding some extra functionality to your module. How difficult or easy it is,, I am afraid I am not a developer, so sorry if what I suggest it really complicated to build. So here is the list:
- Load code (or not) using Javascript. This way the module will work with Cache systems, this is already here on https://github.com/BinaryMoon/wp-toolbelt/issues/46
- Add a Header and Footer area on admin setting to add some custom scripts. This is already on the Machete plugin https://github.com/nilovelez/machete/ . The idea is to link them to the "Accept" button. This will make easier to add any scripts, but still keeping it simple and fast. I know it can be done using code, but it is complicate for most users.
- If we want to make it better, we could have 2 settings for this, one for "Functional scripts" that load every time, and one for "GDPR scripts" that will only load after acceptance. Of course the functional scripts can be added using other plugins (like machete), but it would be nice to have all here.
- And last one. Allow to add a class to scripts that are not set on the admin, but on content. This is useful for scripts that only appear on single pages or blog posts. For example, ads inline the content, or ads located on widgets or blocks.
For number 4, the complianz plugin use a class to identify the scripts that should be blocked (and other one for ignoring them but I do not think that is necessary) https://wordpress.org/plugins/complianz-gdpr/ https://complianz.io/whitelisting-inline-script/ Other plugins use a category. I was also thinking that it could be done with a shortcode, like this plugin does https://wordpress.org/plugins/dadi-cookie-consent-lite/ , so it will make much easier to add this into the widgets or into the content and then load or not the shortcode content. But I am not sure how this can be achieved with number 1 in mind so it works with cached pages.
I would love to help testing. I am not a developer, so not that good with code. What do you think?