{"id":18248238,"url":"https://github.com/district09/drupal_module_dg-cookiebot","last_synced_at":"2025-04-08T19:51:35.749Z","repository":{"id":42431026,"uuid":"245413581","full_name":"district09/drupal_module_dg-cookiebot","owner":"district09","description":"Extends the contrib Cookiebot module with missing functionality","archived":false,"fork":false,"pushed_at":"2024-05-22T15:04:31.000Z","size":75,"stargazers_count":0,"open_issues_count":1,"forks_count":0,"subscribers_count":4,"default_branch":"1.x","last_synced_at":"2024-05-22T16:28:39.022Z","etag":null,"topics":["d09check22","web"],"latest_commit_sha":null,"homepage":null,"language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/district09.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-03-06T12:26:27.000Z","updated_at":"2024-05-22T16:28:41.260Z","dependencies_parsed_at":"2024-02-29T13:52:14.770Z","dependency_job_id":"15794513-7f9d-44c9-903a-4a17e4593e45","html_url":"https://github.com/district09/drupal_module_dg-cookiebot","commit_stats":null,"previous_names":[],"tags_count":9,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/district09%2Fdrupal_module_dg-cookiebot","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/district09%2Fdrupal_module_dg-cookiebot/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/district09%2Fdrupal_module_dg-cookiebot/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/district09%2Fdrupal_module_dg-cookiebot/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/district09","download_url":"https://codeload.github.com/district09/drupal_module_dg-cookiebot/tar.gz/refs/heads/1.x","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247918913,"owners_count":21018042,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["d09check22","web"],"created_at":"2024-11-05T09:36:20.510Z","updated_at":"2025-04-08T19:51:35.729Z","avatar_url":"https://github.com/district09.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Digipolis Cookiebot\n\nAdds extra functionality to the [Cookiebot module].\n\n[![Github][github-badge]][github-link]\n\n[![Build Status Master][travis-badge]][travis-link]\n[![Maintainability][codeclimate-maint-badge]][codeclimate-maint-link]\n[![Test Coverage][codeclimate-cover-badge]][codeclimate-cover-link]\n\nThe City of Ghent has opted for [Cookiebot] to allow visitors to approve loading\nof (third party) party cookies.\n\nThis module extends the [Cookiebot module] with extra functionality:\n\n* A placeholder filter to add the Cookiebot declaration into formatted text.\n\n## Installation\n\nAdd the git source to the composer repositories: edit `composer.json` in the\nproject root and add following lines in the `repositories` section:\n\n```json\n{\n    \"type\": \"composer\",\n    \"url\": \"https://digipolis.repo.repman.io\"\n}\n```\n\nAdd the following Cookiebot module patches to:\n\n- Have Cookiebot respect the language of the current page.\n- Fix Cookiebot auto blocking breaking Drupal core Domready functionality.\n\n```json\n\"drupal/cookiebot\": {\n    \"#3071334 Allow to set the language and multilingual support\": \"https://www.drupal.org/files/issues/2019-10-29/cookiebot-allow_to_set_the_language-3071334-8.patch\",\n    \"#3091260 Blockmode `Auto` will not work with core's domready library\": \"https://www.drupal.org/files/issues/2020-01-29/cookiebot-attach_behaviors-3091260-30.patch\"\n},\n```\n\nInstall the module using composer:\n\n```bash\ncomposer require gent-drupal/dg_cookiebot\n```\n\nEnable the module:\n\n```bash\ndrush -y en dg_cookiebot\n```\n\nUpdate the Cookiebot configuration at `admin/config/cookiebot`:\n\n* Enter the **Cookiebot Domain Group ID** (CBID).\n* Enable the **Automatically block all cookies** checkbox.\n* Enable the **Use the current Drupal language** checkbox.\n* Enable the **Exclude admin pages** checkbox.\n\nIt's possible to overwite the Cookiebot Domain Group ID (CBID) in the\n`settings.php` file:\n\n```php\n/**\n * Cookiebot.\n */\n$config['cookiebot.settings']['cookiebot_cbid'] = 'COOKIEBOT DOMAIN GROUP ID';\n```\n\n## Link to edit the Cookie consent\n\nOnce the user has set his cookie consent he has by default no link to\nreview/edit his consent.\n\n### Menu item\n\nAdd a menu item (e.g. to the footer menu) to update the cookie consent. The path\nof the menu item should be `/cookiebot-renew`. It will be automatically\nrewritten to trigger the cookie consent popup.\n\n### Use block\n\nThere is a \"Cookie settings link\" block available to add the Cookie consent link\nto a region on the website.\n\n### Custom link\n\nIt's always possible to add a custom link to trigger opening the cookie consent\npopup:\n\n```html\n\u003ca href=\"javascript:Cookiebot.renew()\"\u003eUpdate cookie consent\u003c/a\u003e\n```\n\n## Create cookie declaration page\n\nThis module adds a filter to replace a token within formatted text content by\nthe proper javascript tag to load the Cookie Declaration (list of cookies used\nwithin the website).\n\n### Add the text filter\n\n* Open `/admin/config/content/formats` and configure the text format where the\n  token should be used.\n* Enable the \"Replace Cookiebot declaration placeholder\" filter.\n* Make sure that the filter is the last one in the list.\n\n### Create the Cookie declaration page\n\n* Create a new page on the path `/cookie-declaration`.\n* Add to the content (formatted text) the `[COOKIEBOT_DECLARATION]` placeholder\n  where the list of cookies in use should be displayed.\n\n### Update Cookiebot configuration\n\nThe cookie consent popup is by default loaded on all page, also on the page\ncontaining the cookie declaration. Add this page to the excluded paths.\n\n* Open the Cookiebot configuration on `admin/config/cookiebot`.\n* Add `/cookie-declaration` to the \"Exclude paths\".\n\nThe Cookies declartion will now be loaded on the `/cookie-declaration` page.\n\n## Video without cookies\n\nServices like Youtube and Vimeo provide by default iframes that track the users\nwith cookies. They provide a no-cookie domain but that is not wat is used by\ndefault.\n\nTo avoid loading this iframes and the cookies that come with them, Cookiebot\nremoves the iframe content until the visitor has allowed marketing cookies.\n\nThis is how video's can be embeded without cookies:\n\n### Patch the video_embed_field module\n\nAdd patches to the [video_embed_field module] so is has an option to embed video\nwithout cookies:\n\n```json\n    \"drupal/video_embed_field\": {\n      \"#2998257 Provide 'do not track' option for vimeo\": \"https://www.drupal.org/files/issues/2019-02-18/video_embed_field_2998257_5.patch\",\n      \"#2973246 Youtube Privacy Enhanced Mode\": \"https://www.drupal.org/files/issues/2019-06-08/video_embed_field_youtube_nocookie_2973246_41.patch\"\n    },\n```\n\nOpen the `admin/config/media/video-embed-field` page and change the \"Privacy\nmode\" to \"Enabled\".\n\nThis module will set the proper consent category to the video embed iframes so\nthey will no longer be blocked.\n\n[Cookiebot]: https://www.cookiebot.com/\n[Cookiebot module]: https://www.drupal.org/project/cookiebot\n[video_embed_field module]: https://www.drupal.org/project/video_embed_field\n\n[link-drupal]: https://www.drupal.org/project/drupal\n[link-package]: https://github.com/digipolisgent/php_package_dg-flanders-basicregisters\n\n[github-badge]: https://img.shields.io/badge/github-DigipolisGent_Cookiebot-blue.svg?logo=github\n[github-link]: https://github.com/digipolisgent/drupal_module_dg-cookiebot\n\n[travis-badge]: https://travis-ci.com/digipolisgent/drupal_module_dg-cookiebot.svg?token=anXPs46DEwgxP8RmJPAJ\u0026branch=1.x \"Travis build master\"\n[travis-link]: https://travis-ci.com/digipolisgent/drupal_module_dg-cookiebot/branches\n\n[codeclimate-maint-badge]: https://api.codeclimate.com/v1/badges/5f2e8b272e71e2143b93/maintainability\n[codeclimate-maint-link]: https://codeclimate.com/repos/5e6242ba0a957401b6012c05/maintainability\n[codeclimate-cover-badge]: https://api.codeclimate.com/v1/badges/5f2e8b272e71e2143b93/test_coverage\n[codeclimate-cover-link]: https://codeclimate.com/repos/5e6242ba0a957401b6012c05/test_coverage\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdistrict09%2Fdrupal_module_dg-cookiebot","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdistrict09%2Fdrupal_module_dg-cookiebot","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdistrict09%2Fdrupal_module_dg-cookiebot/lists"}