Cookiebot support

Created on 20 February 2025, 5 days ago

Problem/Motivation

The module does not support cookiebot. But I can understand that adding support for such a specific application is not really what you want. Therefore I just share the patch. It is missing "settings", because I didnot have time to create these, but for people needing cookiebot this patch can lead them in the right way ;-).

✨ Feature request
Status

Needs work

Version

4.0

Component

Code

Created by

πŸ‡³πŸ‡±Netherlands joshahubbers

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

  • Issue created by @joshahubbers
  • πŸ‡³πŸ‡±Netherlands joshahubbers
  • πŸ‡³πŸ‡±Netherlands joshahubbers
  • πŸ‡³πŸ‡±Netherlands joshahubbers

    This is the patch. I know it is not to be comitted to the module this way, but for reference if someone needs it.

  • πŸ‡ΈπŸ‡°Slovakia kaszarobert

    There's a cookie consent solution for this module I made for the COOKiES modules: https://www.drupal.org/project/cookies_media_entity_facebook β†’
    There I basically modify the script tag this way:

    /**
     * Implements hook_preprocess_HOOK().
     */
    function cookies_media_entity_facebook_preprocess_media_entity_facebook(&$variables) {
      $variables['script_attributes']['data-sid'] = ['facebook'];
      $variables['script_attributes']['type'] = ['text/plain'];
    }
    

    I think a similair approach would be better to set the data-cookieconsent="marketing". Another question would be that since every cookie consent solution does things differently, should we commit to this repo as a submodule, or should we create separate module for that, or should we create a MR to include that to the Cookiebot module instead?

  • πŸ‡³πŸ‡±Netherlands joshahubbers

    Thanx @kaszarobert. Ik think you have a fair point here. Thinking about it, a hook like yours could be added to the module, only we don't use the module but it is integrated via google tag manager. So than we should incorporate it in a custom submodule for ourselves I think.

Production build 0.71.5 2024