{% set gtmConfig = config('DtgsGoogleTagManagerSw6.config') %}
{% if gtmIsActive(gtmConfig.googleId) %}
{% if gtmConfig.pagehidingEnabled == true %}
{% for containerId in gtmGetContainerIds(gtmConfig.googleId) %}
<!-- Page-hiding snippet (recommended) -->
<style>.async-hide { opacity: 0 !important} </style>
<script{{ page.extensions.GoogleTagManagerConfig.usercentricsCode|raw }}>{% verbatim %}(function(a,s,y,n,c,h,i,d,e){s.className+=' '+y;h.start=1*new Date;
h.end=i=function(){s.className=s.className.replace(RegExp(' ?'+y),'')};
(a[n]=a[n]||[]).hide=h;setTimeout(function(){i();h.end=null},c);h.timeout=c;
})(window,document.documentElement,'async-hide','dataLayer',4000,
{'{% endverbatim %}{{ containerId }}':true});</script>{% endfor %}
{% endif %}
{% for containerId in gtmGetContainerIds(gtmConfig.googleId) %}
<script{{ page.extensions.GoogleTagManagerConfig.usercentricsCode|raw }}>{% verbatim %}(function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start':
new Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0],
j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src=
'{% endverbatim %}{{ gtmGetJsUrl(gtmConfig.customGtmJsUrl) }}{% verbatim %}?id='+i+dl;f.parentNode.insertBefore(j,f);
}{% endverbatim %})(window,document,'script','dataLayer','{{ containerId }}');</script>{% endfor %}
{% endif %}