- Issue created by @Dubs
- 🇧🇪Belgium andreasderijcke Antwerpen / Gent
@Dubs We kind of have this already, but not configurable through a UI. See https://git.drupalcode.org/project/cookiepro_plus/-/blob/1.0.x/examples/... and https://git.drupalcode.org/project/cookiepro_plus/-/blob/1.0.x/examples/....
When reviewing and comparing with your current approach, a few concerns came to mind:
- Specificity: Categories should be assigned at least at library level, not module level, so a module can support progressive enhancement of functionality depending on the given consent.
- Aggregation incompatibility: this might be a problem in my solution as well, I've never used in the field so far, and keeping as much scripts aggregated as possible is a must have.
I need to wrap my head around this a bit more in the next weeks, to see if this might be worth investing time on this addition, without having a known demand.
I've always felt the 'auto-blocking' magic a bit too obscure and so far discouraged the use of it in combination with Drupal, in favour of complete control of what is to be blocked and when.
Anyway, to be continued.If you have additional insights and ideas, let us know!
- 🇬🇧United Kingdom Dubs
@andreasderijcke - thanks for responding.
I completely agree with both your points. I can change the code to support per module, probably with the option to flag the entire module too for ease of UI (think of all the Drupal core libraries, for example).
Aggregation will be trickier. I haven't looked at the new D10 APIs for this but I am hoping there would be a way to alter the groupings, in which case we simply need to group the libraries by type and add the appropriate attribute. The client we developed this for is still on 9, but hopefully will be persuaded to move to 10 soon.
Thanks again, and if you let me know the attributes for CookiePro I can throw together a plugin for it fairly quickly.
- 🇧🇪Belgium andreasderijcke Antwerpen / Gent
With "the attributes for CookiePro", I'm not entirely sure what you need, but I guess the info is on this page: https://my.onetrust.com/s/article/UUID-71e7d0a8-03d8-e272-e683-72cadded2ecf
If you need the exact consent categories (like 'C0004'), as those can be changed in CookiePro, they need to be configured in the module as well.
\Drupal\cookiepro_plus\CookiePro::getCategoryIds() will return them, keyed by the internal key constants as defined in https://git.drupalcode.org/project/cookiepro_plus/-/blob/1.0.x/src/Cooki... (CONF_CATEGORY_...).