I am trying to use the EU Cookie Compliance module (GDPR Compliance).
I want to have separate categories that users can accept / reject and that the javasscripts associated with each category are loaded or not loaded accordingly.
This is what I tried to do.
There is an "Opt-in with categories. Allow visitors to choose which cookie categories they wish to opt for (compatible with GDPR)". option
I have configured several categories in the "Cookie categories with separate consent" box as follows
Strictly necessary cookies | tag one | some text
Google Analytics | tag two | some text | some text
Strictly necessary cookies: themes / custom / mytheme / js / tracking / Facebook_Pixel_Code.js
Google Analytics: themes / custom / mytheme / js / tracking / Google_Analytics.js
When I do this, the scripts "Google_Analytics.js" and "Facebook_Pixel_Code.js" are not loaded even if consent is given.
console.log ("ALL" + Drupal.eu_cookie_compliance.hasAgreed ());
console.log ("Strictly necessary cookies" + Drupal.eu_cookie_compliance.hasAgreed (& # 39; Strictly necessary cookies & # 39;));
console.log ("Google Analytics" + Drupal.eu_cookie_compliance.hasAgreed (& # 39; Google Analytics & # 39;));
console.log ("Category not existing" + Drupal.eu_cookie_compliance.hasAgreed (& # 39; Category not existing & # 39;));
"Strictly necessary cookies" and "Google Analytics" always show the correct configuration for consent with respect to those categories.
Did I configure it correctly or is it likely to be a mistake?