- Issue created by @imran1217
Using Disabled scripts with Opt-in. Don't track visitors unless they specifically give consent. (GDPR compliant) option causes issue with link edit in CKEditor5
- Enable EU Cookie Compliance with google_tag module
- Create GTM container from google tag settings page.
- Add below GTM script file in Disabled scripts of EU Cookie Compliance settings page
<your-site-domain>/sites/default/files/google_tag/<gtm_wcms>/google_tag.script.js
- Create content of article type and in body field add a link, then click on the link it will redirect page to link.
disabled scripts caches the script into: public://eu_cookie_compliance/eu_cookie_compliance.script.js
Which is loaded always even on admin page from code
/**
* React to a config object being saved.
*
* @param \Drupal\Core\Config\ConfigCrudEvent $event
* Config crud event.
*/
public function configSave(ConfigCrudEvent $event) {
if (($event->getConfig()->getName() === 'eu_cookie_compliance.settings')) {
$disabled_javascripts = $event->getConfig()->get('disabled_javascripts');
if ($disabled_javascripts) {
$script_snippet = 'window.euCookieComplianceLoadScripts = function(category) {' . $this->getDisabledJsScriptSnippet($disabled_javascripts) . "}";
We should only load/add script where needed, maybe using library.
Active
1.24
Code