diff --git a/Application/Model/ManagerTypes.php b/Application/Model/ManagerTypes.php index 7ebda76..01c9db5 100644 --- a/Application/Model/ManagerTypes.php +++ b/Application/Model/ManagerTypes.php @@ -34,6 +34,8 @@ class ManagerTypes const CONSENTMANAGER = "CONSENTMANAGER"; + const COOKIEFIRST = "COOKIEFIRST"; + /** * @return array */ @@ -45,7 +47,8 @@ class ManagerTypes "net_cookie_manager" => self::NET_COOKIE_MANAGER, "oxps_usercentrics" => self::USERCENTRICS_MODULE, "usercentrics" => self::USERCENTRICS_MANUALLY, - "consentmanager" => self::CONSENTMANAGER + "consentmanager" => self::CONSENTMANAGER, + "cookiefirst" => self::COOKIEFIRST ]; } diff --git a/Application/views/admin/de/module_options.php b/Application/views/admin/de/module_options.php index 6f09746..8960fd6 100755 --- a/Application/views/admin/de/module_options.php +++ b/Application/views/admin/de/module_options.php @@ -31,10 +31,17 @@ $aLang = [ // for cookie manager settings 'SHOP_MODULE_GROUP_d3_gtm_settings_cookiemanager' => 'Cookie Manager Einstellungen', 'SHOP_MODULE_d3_gtm_settings_hasOwnCookieManager' => 'Cookie Manager nutzen?', + 'HELP_SHOP_MODULE_d3_gtm_settings_HAS_STD_MANAGER' => 'Mehr Informationen zu den genannten Coookie-Manager finden Sie auf den folgenden Home-Pages

+ Consentmanager
+ Usercentrics
+ Cookiefirst
+
+ Bei weiteren Fragen stehen wir gern zur Verfügung! Kontaktieren Sie uns einfach unter https://www.d3data.de/', 'SHOP_MODULE_d3_gtm_settings_HAS_STD_MANAGER' => 'Nutzen Sie eine der folgenden Einbindungen?
Dann wählen Sie bitte die zutreffende aus.', 'SHOP_MODULE_d3_gtm_settings_HAS_STD_MANAGER_NONE' => '---', 'SHOP_MODULE_d3_gtm_settings_HAS_STD_MANAGER_CONSENTMANAGER' => 'consentmanager', 'SHOP_MODULE_d3_gtm_settings_HAS_STD_MANAGER_USERCENTRICS' => 'usercentrics', + 'SHOP_MODULE_d3_gtm_settings_HAS_STD_MANAGER_COOKIEFIRST' => 'cookiefirst', 'SHOP_MODULE_d3_gtm_settings_cookieName' => 'CookieID', ]; diff --git a/Modules/Core/ViewConfig.php b/Modules/Core/ViewConfig.php index e09d54e..6d9fc0c 100644 --- a/Modules/Core/ViewConfig.php +++ b/Modules/Core/ViewConfig.php @@ -70,7 +70,7 @@ class ViewConfig extends ViewConfig_parent $this->defineCookieManagerType(); - $sCookieID = $oConfig->getConfigParam('d3_gtm_settings_cookieName'); + $sCookieID = trim($oConfig->getConfigParam('d3_gtm_settings_cookieName')); // Netensio Cookie Manager if ($this->sCookieManagerType === ManagerTypes::NET_COOKIE_MANAGER) { @@ -92,6 +92,7 @@ class ViewConfig extends ViewConfig_parent $this->sCookieManagerType === ManagerTypes::USERCENTRICS_MODULE or $this->sCookieManagerType === ManagerTypes::USERCENTRICS_MANUALLY or $this->sCookieManagerType === ManagerTypes::CONSENTMANAGER + or $this->sCookieManagerType === ManagerTypes::COOKIEFIRST or $this->sCookieManagerType === ManagerTypes::EXTERNAL_SERVICE ) { @@ -110,8 +111,7 @@ class ViewConfig extends ViewConfig_parent */ public function getGtmScriptAttributes() :string { - $oConfig = Registry::getConfig(); - $sCookieId = $oConfig->getConfigParam('d3_gtm_settings_cookieName'); + $sCookieId = trim(Registry::getConfig()->getConfigParam('d3_gtm_settings_cookieName')); if (false === $this->shallUseOwnCookieManager()){ return ""; @@ -139,6 +139,10 @@ class ViewConfig extends ViewConfig_parent } } + if ($this->sCookieManagerType === ManagerTypes::COOKIEFIRST){ + return 'type="text/plain" data-cookiefirst-category="' . $sCookieId .'"'; + } + return ""; } diff --git a/metadata.php b/metadata.php index 43e79ab..ddeb55d 100755 --- a/metadata.php +++ b/metadata.php @@ -128,7 +128,7 @@ $aModule = [ 'name' => 'd3_gtm_settings_HAS_STD_MANAGER', 'type' => 'select', 'value' => 'none', - 'constraints' => 'NONE|CONSENTMANAGER|USERCENTRICS', + 'constraints' => 'NONE|CONSENTMANAGER|USERCENTRICS|COOKIEFIRST', ], ] ]; \ No newline at end of file