From a5f9cbdd9c6c31a2b6b0490886a3e5e296d89b8a Mon Sep 17 00:00:00 2001
From: Dharizza Espinach <dharizza@gmail.com>
Date: Wed, 4 Dec 2024 16:19:22 -0600
Subject: [PATCH 1/3] Enable privacy apps when applying the analytics recipe.

---
 recipes/drupal_cms_analytics/recipe.yml | 25 +++++++++++++++++++++++++
 1 file changed, 25 insertions(+)

diff --git a/recipes/drupal_cms_analytics/recipe.yml b/recipes/drupal_cms_analytics/recipe.yml
index 01a375fa..030f83ca 100644
--- a/recipes/drupal_cms_analytics/recipe.yml
+++ b/recipes/drupal_cms_analytics/recipe.yml
@@ -2,6 +2,9 @@ name: Analytics
 type: Drupal CMS
 description: Sets up the Google Tag module to track the traffic of your website using Google Analytics and Google Tag Manager.
 
+recipes:
+  - drupal_cms_privacy_basic
+
 install:
   - google_tag
 
@@ -28,6 +31,9 @@ config:
   strict: false
   import:
     google_tag: '*'
+    klaro:
+      - klaro.klaro_app.ga
+      - klaro.klaro_app.gtm
   actions:
     google_tag.settings:
       simpleConfigUpdate:
@@ -37,3 +43,22 @@ config:
         property_name: tag_container_ids
         value:
           - ${property_id}
+    klaro.klaro_app.ga:
+      setMultiple:
+        -
+          property_name: status
+          value: true
+        -
+          property_name: default
+          value: true
+    klaro.klaro_app.gtm:
+      setMultiple:
+        -
+          property_name: status
+          value: true
+        -
+          property_name: default
+          value: true
+    klaro.settings:
+      simpleConfigUpdate:
+        dialog_mode: notice
-- 
GitLab


From 5ed144d48b8fccd297e11034e829c2d0af8557cf Mon Sep 17 00:00:00 2001
From: Dharizza Espinach <55682-dharizza@users.noreply.drupalcode.org>
Date: Wed, 4 Dec 2024 22:45:23 +0000
Subject: [PATCH 2/3] Fix the way in which we set the status of the config
 entity.

---
 recipes/drupal_cms_analytics/recipe.yml | 14 ++++----------
 1 file changed, 4 insertions(+), 10 deletions(-)

diff --git a/recipes/drupal_cms_analytics/recipe.yml b/recipes/drupal_cms_analytics/recipe.yml
index 030f83ca..f8387923 100644
--- a/recipes/drupal_cms_analytics/recipe.yml
+++ b/recipes/drupal_cms_analytics/recipe.yml
@@ -44,19 +44,13 @@ config:
         value:
           - ${property_id}
     klaro.klaro_app.ga:
-      setMultiple:
-        -
-          property_name: status
-          value: true
-        -
+      enable: []
+      set:
           property_name: default
           value: true
     klaro.klaro_app.gtm:
-      setMultiple:
-        -
-          property_name: status
-          value: true
-        -
+      enable: []
+      set:
           property_name: default
           value: true
     klaro.settings:
-- 
GitLab


From 7b636945c0448435690df3d57be812792b3882b4 Mon Sep 17 00:00:00 2001
From: Dharizza Espinach <dharizza@gmail.com>
Date: Wed, 4 Dec 2024 16:52:49 -0600
Subject: [PATCH 3/3] Added dependency on drupal_cms_privacy_basic.

---
 recipes/drupal_cms_analytics/composer.json | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/recipes/drupal_cms_analytics/composer.json b/recipes/drupal_cms_analytics/composer.json
index b6b0d4c2..cf679f7f 100644
--- a/recipes/drupal_cms_analytics/composer.json
+++ b/recipes/drupal_cms_analytics/composer.json
@@ -4,7 +4,8 @@
     "description": "Sets up the Google Tag module to track the traffic of your website using Google Analytics and Google Tag Manager.",
     "require": {
         "drupal/core": ">=10.3",
-        "drupal/google_tag": "^2.0.7"
+        "drupal/google_tag": "^2.0.7",
+        "drupal/drupal_cms_privacy_basic": "*"
     },
     "version": "dev-main"
 }
-- 
GitLab