adjust set-param check

This commit is contained in:
MaxBUhe 2023-09-13 15:13:35 +02:00
parent 36b3aa9ef2
commit bb513e6ded
2 changed files with 4 additions and 8 deletions

View File

@ -121,7 +121,7 @@ class ViewConfig extends ViewConfig_parent
{ {
$sControlParameter = trim(Registry::getConfig()->getConfigParam('d3_gtm_settings_controlParameter')); $sControlParameter = trim(Registry::getConfig()->getConfigParam('d3_gtm_settings_controlParameter'));
if (false === $this->shallUseOwnCookieManager()){ if (false === $this->shallUseOwnCookieManager() or ($sControlParameter === '')){
return ""; return "";
} }
@ -130,16 +130,12 @@ class ViewConfig extends ViewConfig_parent
or $this->sCookieManagerType === ManagerTypes::USERCENTRICS_MANUALLY or $this->sCookieManagerType === ManagerTypes::USERCENTRICS_MANUALLY
) )
{ {
if ($sControlParameter) { return 'data-usercentrics="' . $sControlParameter . '" type="text/plain" async=""';
return 'data-usercentrics="' . $sControlParameter . '" type="text/plain" async=""';
}
} }
if ($this->sCookieManagerType === ManagerTypes::CONSENTMANAGER) if ($this->sCookieManagerType === ManagerTypes::CONSENTMANAGER)
{ {
if ($sControlParameter) { return 'type="text/plain" class="cmplazyload" data-cmp-vendor="'.$sControlParameter.'"';
return 'type="text/plain" class="cmplazyload" data-cmp-vendor="'.$sControlParameter.'"';
}
} }
if ($this->sCookieManagerType === ManagerTypes::COOKIEFIRST){ if ($this->sCookieManagerType === ManagerTypes::COOKIEFIRST){

View File

@ -133,7 +133,7 @@ $aModule = [
'group' => 'd3_gtm_settings_cookiemanager', 'group' => 'd3_gtm_settings_cookiemanager',
'name' => 'd3_gtm_settings_controlParameter', 'name' => 'd3_gtm_settings_controlParameter',
'type' => 'str', 'type' => 'str',
'value' => 'example', 'value' => '',
'position' => 999 'position' => 999
], ],
[ [