diff --git a/Application/views/blocks/_gtm_js.tpl b/Application/views/blocks/_gtm_js.tpl index 4ff4f37..5c4751c 100755 --- a/Application/views/blocks/_gtm_js.tpl +++ b/Application/views/blocks/_gtm_js.tpl @@ -5,7 +5,7 @@ [{assign var="d3GtmContainerIdString" value=$oViewConf->getGtmContainerId()}] -[{if $oViewConf->D3blShowGtmScript()}] +[{if $oViewConf->isGA4enabled() and $oViewConf->D3blShowGtmScript()}] [{if $d3GtmContainerIdString}] [{strip}] diff --git a/Modules/Core/ViewConfig.php b/Modules/Core/ViewConfig.php index 282671e..6e80c00 100644 --- a/Modules/Core/ViewConfig.php +++ b/Modules/Core/ViewConfig.php @@ -73,6 +73,10 @@ class ViewConfig extends ViewConfig_parent /** @var Config $oConfig */ $oConfig = Registry::getConfig(); + if (false === $this->isGA4enabled()){ + return false; + } + // No Cookie Manager in use if (!$this->shallUseOwnCookieManager()) { return true;