diff --git a/Modules/Core/ViewConfig.php b/Modules/Core/ViewConfig.php index f2a2a64..d73af43 100644 --- a/Modules/Core/ViewConfig.php +++ b/Modules/Core/ViewConfig.php @@ -115,8 +115,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 ""; @@ -144,6 +143,10 @@ class ViewConfig extends ViewConfig_parent } } + if ($this->sCookieManagerType === ManagerTypes::COOKIEFIRST){ + return 'type="text/plain" data-cookiefirst-category="' . $sCookieId .'"'; + } + return ""; }