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\Config;
|
||||||
use OxidEsales\Eshop\Core\Registry;
|
use OxidEsales\Eshop\Core\Registry;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
class ViewConfig extends ViewConfig_parent
|
class ViewConfig extends ViewConfig_parent
|
||||||
{
|
{
|
||||||
|
|
||||||
@ -112,7 +116,7 @@ class ViewConfig extends ViewConfig_parent
|
|||||||
*/
|
*/
|
||||||
public function getGtmScriptAttributes() :string
|
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()){
|
if (false === $this->shallUseOwnCookieManager()){
|
||||||
return "";
|
return "";
|
||||||
@ -123,29 +127,24 @@ class ViewConfig extends ViewConfig_parent
|
|||||||
or $this->sCookieManagerType === ManagerTypes::USERCENTRICS_MANUALLY
|
or $this->sCookieManagerType === ManagerTypes::USERCENTRICS_MANUALLY
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
if ($sCookieId) {
|
if ($sControlParameter) {
|
||||||
return 'data-usercentrics="' . $sCookieId . '" type="text/plain" async=""';
|
return 'data-usercentrics="' . $sControlParameter . '" type="text/plain" async=""';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($this->sCookieManagerType === ManagerTypes::CONSENTMANAGER)
|
if ($this->sCookieManagerType === ManagerTypes::CONSENTMANAGER)
|
||||||
{
|
{
|
||||||
if ($sCookieId) {
|
if ($sControlParameter) {
|
||||||
return 'async
|
return 'type="text/plain" class="cmplazyload" data-cmp-vendor="'.$sControlParameter.'"';
|
||||||
type="text/plain"
|
|
||||||
data-cmp-src="https://www.googletagmanager.com/gtm.js?id='.$this->getGtmContainerId().'"
|
|
||||||
class="cmplazyload"
|
|
||||||
data-cmp-vendor="s905"
|
|
||||||
';
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($this->sCookieManagerType === ManagerTypes::COOKIEFIRST){
|
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){
|
if ($this->sCookieManagerType === ManagerTypes::COOKIEBOT){
|
||||||
return 'type="text/plain" data-cookieconsent="' . $sCookieId .'"';
|
return 'type="text/plain" data-cookieconsent="' . $sControlParameter .'"';
|
||||||
}
|
}
|
||||||
|
|
||||||
return "";
|
return "";
|
||||||
@ -153,6 +152,7 @@ class ViewConfig extends ViewConfig_parent
|
|||||||
|
|
||||||
private $blGA4enabled = null;
|
private $blGA4enabled = null;
|
||||||
|
|
||||||
|
|
||||||
public function isGA4enabled()
|
public function isGA4enabled()
|
||||||
{
|
{
|
||||||
if ($this->blGA4enabled === null)
|
if ($this->blGA4enabled === null)
|
||||||
|
Loading…
Reference in New Issue
Block a user