switch name of control-parameter; switch consentmanager-script-adjustments
# Conflicts: # Modules/Core/ViewConfig.php
This commit is contained in:
parent
36ac641233
commit
b2d8d597fd
@ -18,6 +18,10 @@ use OxidEsales\Eshop\Application\Controller\FrontendController;
|
||||
use OxidEsales\Eshop\Core\Config;
|
||||
use OxidEsales\Eshop\Core\Registry;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
class ViewConfig extends ViewConfig_parent
|
||||
{
|
||||
|
||||
@ -112,7 +116,7 @@ class ViewConfig extends ViewConfig_parent
|
||||
*/
|
||||
public function getGtmScriptAttributes() :string
|
||||
{
|
||||
$sCookieId = trim(Registry::getConfig()->getConfigParam('d3_gtm_settings_cookieName'));
|
||||
$sControlParameter = trim(Registry::getConfig()->getConfigParam('d3_gtm_settings_cookieName'));
|
||||
|
||||
if (false === $this->shallUseOwnCookieManager()){
|
||||
return "";
|
||||
@ -123,29 +127,24 @@ class ViewConfig extends ViewConfig_parent
|
||||
or $this->sCookieManagerType === ManagerTypes::USERCENTRICS_MANUALLY
|
||||
)
|
||||
{
|
||||
if ($sCookieId) {
|
||||
return 'data-usercentrics="' . $sCookieId . '" type="text/plain" async=""';
|
||||
if ($sControlParameter) {
|
||||
return 'data-usercentrics="' . $sControlParameter . '" type="text/plain" async=""';
|
||||
}
|
||||
}
|
||||
|
||||
if ($this->sCookieManagerType === ManagerTypes::CONSENTMANAGER)
|
||||
{
|
||||
if ($sCookieId) {
|
||||
return 'async
|
||||
type="text/plain"
|
||||
data-cmp-src="https://www.googletagmanager.com/gtm.js?id='.$this->getGtmContainerId().'"
|
||||
class="cmplazyload"
|
||||
data-cmp-vendor="s905"
|
||||
';
|
||||
if ($sControlParameter) {
|
||||
return 'type="text/plain" class="cmplazyload" data-cmp-vendor="'.$sControlParameter.'"';
|
||||
}
|
||||
}
|
||||
|
||||
if ($this->sCookieManagerType === ManagerTypes::COOKIEFIRST){
|
||||
return 'type="text/plain" data-cookiefirst-category="' . $sCookieId .'"';
|
||||
return 'type="text/plain" data-cookiefirst-category="' . $sControlParameter .'"';
|
||||
}
|
||||
|
||||
if ($this->sCookieManagerType === ManagerTypes::COOKIEBOT){
|
||||
return 'type="text/plain" data-cookieconsent="' . $sCookieId .'"';
|
||||
return 'type="text/plain" data-cookieconsent="' . $sControlParameter .'"';
|
||||
}
|
||||
|
||||
return "";
|
||||
@ -153,6 +152,7 @@ class ViewConfig extends ViewConfig_parent
|
||||
|
||||
private $blGA4enabled = null;
|
||||
|
||||
|
||||
public function isGA4enabled()
|
||||
{
|
||||
if ($this->blGA4enabled === null)
|
||||
|
Loading…
Reference in New Issue
Block a user