[Added] preventing wrong id-calling

This commit is contained in:
MaxBUhe 2024-04-11 11:34:16 +02:00
parent 6053219687
commit 4458fc55ee
1 changed files with 4 additions and 2 deletions

View File

@ -3,8 +3,10 @@
var dataLayer = [{$oViewConf->getGtmDataLayer()}] || [];
</script>
[{assign var="d3GtmContainerIdString" value=$oViewConf->getGtmContainerId()}]
[{if $oViewConf->D3blShowGtmScript()}]
[{if $oViewConf->getGtmContainerId()}]
[{if $d3GtmContainerIdString}]
[{strip}]
[{if $oViewConf->isGtmConsentModeSetActivated()}]
@ -32,7 +34,7 @@
j.async = true;
j.src = '[{$oViewConf->getServerSidetaggingJsDomain()}]?id=' + i + dl;
f.parentNode.insertBefore(j, f);
})(window, document, 'script', 'dataLayer', '[{$oViewConf->getGtmContainerId()}]');
})(window, document, 'script', 'dataLayer', '[{$d3GtmContainerIdString}]');
</script>
<!-- End Google Tag Manager -->
[{/strip}]