var/cache/dev_h35a3f23e42c28eb372681dff5106855a/twig/6a/6a0f67835af95092acb7c1f30b706d0d050431bb16ef14389d66bb47537b28e2.php line 52

Open in your IDE?
  1. <?php
  2. use Twig\Environment;
  3. use function Shopware\Core\Framework\Adapter\Twig\sw_get_attribute;
  4. use function Shopware\Core\Framework\Adapter\Twig\sw_escape_filter;
  5. use Twig\Error\LoaderError;
  6. use Twig\Error\RuntimeError;
  7. use Twig\Extension\SandboxExtension;
  8. use Twig\Markup;
  9. use Twig\Sandbox\SecurityError;
  10. use Twig\Sandbox\SecurityNotAllowedTagError;
  11. use Twig\Sandbox\SecurityNotAllowedFilterError;
  12. use Twig\Sandbox\SecurityNotAllowedFunctionError;
  13. use Twig\Source;
  14. use Twig\Template;
  15. /* @WbmTagManagerEcomm/storefront/layout/meta.html.twig */
  16. class __TwigTemplate_e77eb899ae5e17a227b20d5254ca9fe4 extends Template
  17. {
  18.     private $source;
  19.     private $macros = [];
  20.     public function __construct(Environment $env)
  21.     {
  22.         parent::__construct($env);
  23.         $this->source $this->getSourceContext();
  24.         $this->blocks = [
  25.             'layout_head_meta_tags_charset' => [$this'block_layout_head_meta_tags_charset'],
  26.             'wbm_layout_head_tag_manager_data_layer_push' => [$this'block_wbm_layout_head_tag_manager_data_layer_push'],
  27.             'wbm_layout_head_tag_manager_snippet' => [$this'block_wbm_layout_head_tag_manager_snippet'],
  28.         ];
  29.     }
  30.     protected function doGetParent(array $context)
  31.     {
  32.         // line 2
  33.         return "@Storefront/storefront/layout/meta.html.twig";
  34.     }
  35.     protected function doDisplay(array $context, array $blocks = [])
  36.     {
  37.         $macros $this->macros;
  38.         $__internal_5a27a8ba21ca79b61932376b2fa922d2 $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
  39.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template""@WbmTagManagerEcomm/storefront/layout/meta.html.twig"));
  40.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
  41.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template""@WbmTagManagerEcomm/storefront/layout/meta.html.twig"));
  42.         $this->parent $this->loadTemplate("@Storefront/storefront/layout/meta.html.twig""@WbmTagManagerEcomm/storefront/layout/meta.html.twig"2);
  43.         $this->parent->display($contextarray_merge($this->blocks$blocks));
  44.         
  45.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
  46.         
  47.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
  48.     }
  49.     // line 3
  50.     public function block_layout_head_meta_tags_charset($context, array $blocks = [])
  51.     {
  52.         $macros $this->macros;
  53.         $__internal_5a27a8ba21ca79b61932376b2fa922d2 $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
  54.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""layout_head_meta_tags_charset"));
  55.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
  56.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""layout_head_meta_tags_charset"));
  57.         // line 4
  58.         echo "    ";
  59.         $this->displayParentBlock("layout_head_meta_tags_charset"$context$blocks);
  60.         echo "
  61.     ";
  62.         // line 5
  63.         $this->displayBlock('wbm_layout_head_tag_manager_data_layer_push'$context$blocks);
  64.         // line 19
  65.         echo "    ";
  66.         $this->displayBlock('wbm_layout_head_tag_manager_snippet'$context$blocks);
  67.         
  68.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
  69.         
  70.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
  71.     }
  72.     // line 5
  73.     public function block_wbm_layout_head_tag_manager_data_layer_push($context, array $blocks = [])
  74.     {
  75.         $macros $this->macros;
  76.         $__internal_5a27a8ba21ca79b61932376b2fa922d2 $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
  77.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""wbm_layout_head_tag_manager_data_layer_push"));
  78.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
  79.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""wbm_layout_head_tag_manager_data_layer_push"));
  80.         // line 6
  81.         echo "        <script>
  82.             let gtmIsTrackingProductClicks = Boolean(";
  83.         // line 7
  84.         echo sw_get_attribute($this->env$this->source, ($context["wbmTagManagerConfig"] ?? null), "isTrackingProductClicks", [], "any"falsefalsefalse7);
  85.         echo "), gtmContainerId = '";
  86.         echo sw_get_attribute($this->env$this->source, ($context["wbmTagManagerConfig"] ?? null), "gtmContainerId", [], "any"falsefalsefalse7);
  87.         echo "', hasSWConsentSupport = Boolean(Number(";
  88.         echo sw_escape_filter($this->envsw_get_attribute($this->env$this->source, ($context["wbmTagManagerConfig"] ?? null), "hasSWConsentSupport", [], "any"falsefalsefalse7), "html"nulltrue);
  89.         echo "));
  90.             window.wbmScriptIsSet = false;
  91.         </script>
  92.         ";
  93.         // line 10
  94.         if (($context["dataLayer"] ?? null)) {
  95.             echo "<script ";
  96.             echo sw_get_attribute($this->env$this->source, ($context["wbmTagManagerConfig"] ?? null), "dataLayerScriptTagAttributes", [], "any"falsefalsefalse10);
  97.             echo ">";
  98.             // line 12
  99.             echo "
  100.             window.dataLayer = window.dataLayer || [];
  101.             window.dataLayer.push(";
  102.             echo ($context["dataLayer"] ?? null);
  103.             // line 14
  104.             echo ");
  105.             ";
  106.             if (($context["onEvent"] ?? null)) {
  107.                 // line 15
  108.                 echo "
  109.             var onEventDataLayer = JSON.parse('";
  110.                 echo ($context["onEvent"] ?? null);
  111.                 // line 16
  112.                 echo "');
  113.             ";
  114.             }
  115.             // line 17
  116.             echo "        </script>";
  117.         }
  118.         // line 18
  119.         echo "    ";
  120.         
  121.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
  122.         
  123.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
  124.     }
  125.     // line 19
  126.     public function block_wbm_layout_head_tag_manager_snippet($context, array $blocks = [])
  127.     {
  128.         $macros $this->macros;
  129.         $__internal_5a27a8ba21ca79b61932376b2fa922d2 $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
  130.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""wbm_layout_head_tag_manager_snippet"));
  131.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
  132.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""wbm_layout_head_tag_manager_snippet"));
  133.         // line 20
  134.         echo "        ";
  135.         if (sw_get_attribute($this->env$this->source, ($context["wbmTagManagerConfig"] ?? null), "gtmContainerId", [], "any"falsefalsefalse20)) {
  136.             echo "<!-- WbmTagManagerEcomm Head Snippet Start -->
  137.         <script id=\"wbmTagManger\" ";
  138.             // line 21
  139.             echo sw_get_attribute($this->env$this->source, ($context["wbmTagManagerConfig"] ?? null), "scriptTagAttributes", [], "any"falsefalsefalse21);
  140.             echo ">";
  141.             // line 27
  142.             echo "
  143.             function getCookie(name) {
  144.                 var cookieMatch = document.cookie.match(name + '=(.*?)(;|\$)');
  145.                 return cookieMatch && decodeURI(cookieMatch[1]);
  146.             }
  147.             var gtmCookieSet = getCookie('";
  148.             echo sw_escape_filter($this->envsw_get_attribute($this->env$this->source, ($context["wbmTagManagerConfig"] ?? null), "wbmCookieEnabledName", [], "any"falsefalsefalse27), "html"nulltrue);
  149.             // line 28
  150.             echo "');
  151.             ";
  152.             if (twig_test_empty(sw_get_attribute($this->env$this->source, ($context["wbmTagManagerConfig"] ?? null), "gtmFunctionOverwrite", [], "any"falsefalsefalse28))) {
  153.                 // line 29
  154.                 echo "
  155.             var googleTag = 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='https://www.googletagmanager.com/gtm.js?id='+i+dl+'";
  156.                 echo twig_trim_filter(sw_get_attribute($this->env$this->source, ($context["wbmTagManagerConfig"] ?? null), "extendedUrlParameter", [], "any"falsefalsefalse29));
  157.                 // line 30
  158.                 echo "';f.parentNode.insertBefore(j,f);};
  159.             ";
  160.             } else {
  161.                 // line 31
  162.                 echo "
  163.             var googleTag = ";
  164.                 echo sw_escape_filter($this->envsw_get_attribute($this->env$this->source, ($context["wbmTagManagerConfig"] ?? null), "gtmFunctionOverwrite", [], "any"falsefalsefalse31), "html"nulltrue);
  165.                 // line 32
  166.                 echo "
  167.             ";
  168.             }
  169.             // line 42
  170.             echo "
  171.             if (hasSWConsentSupport && gtmCookieSet === null) {
  172.                 window.wbmGoogleTagmanagerId = gtmContainerId;
  173.                 window.wbmScriptIsSet = false;
  174.                 window.googleTag = googleTag;
  175.             } else {
  176.                 window.wbmScriptIsSet = true;
  177.                 googleTag(window, document, 'script', 'dataLayer', gtmContainerId);
  178.                 googleTag = null;
  179.             }";
  180.             echo "
  181.         </script><!-- WbmTagManagerEcomm Head Snippet End -->";
  182.         }
  183.         // line 44
  184.         echo "    ";
  185.         
  186.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
  187.         
  188.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
  189.     }
  190.     public function getTemplateName()
  191.     {
  192.         return "@WbmTagManagerEcomm/storefront/layout/meta.html.twig";
  193.     }
  194.     public function isTraitable()
  195.     {
  196.         return false;
  197.     }
  198.     public function getDebugInfo()
  199.     {
  200.         return array (  209 => 44,  194 => 42,  190 => 32,  186 => 31,  182 => 30,  178 => 29,  174 => 28,  165 => 27,  162 => 21,  157 => 20,  147 => 19,  137 => 18,  134 => 17,  130 => 16,  126 => 15,  121 => 14,  116 => 12,  111 => 10,  101 => 7,  98 => 6,  88 => 5,  77 => 19,  75 => 5,  70 => 4,  60 => 3,  37 => 2,);
  201.     }
  202.     public function getSourceContext()
  203.     {
  204.         return new Source("{% sw_extends '@Storefront/storefront/layout/meta.html.twig' %}
  205. {% block layout_head_meta_tags_charset %}
  206.     {{ parent() }}
  207.     {% block wbm_layout_head_tag_manager_data_layer_push %}
  208.         <script>
  209.             let gtmIsTrackingProductClicks = Boolean({{ wbmTagManagerConfig.isTrackingProductClicks|raw }}), gtmContainerId = '{{ wbmTagManagerConfig.gtmContainerId|raw }}', hasSWConsentSupport = Boolean(Number({{ wbmTagManagerConfig.hasSWConsentSupport }}));
  210.             window.wbmScriptIsSet = false;
  211.         </script>
  212.         {% if dataLayer %}<script {{ wbmTagManagerConfig.dataLayerScriptTagAttributes|raw }}>{% verbatim %}
  213.             window.dataLayer = window.dataLayer || [];
  214.             window.dataLayer.push({% endverbatim %}{{ dataLayer|raw }}{% verbatim %});
  215.             {% endverbatim %}{% if onEvent %}{% verbatim %}
  216.             var onEventDataLayer = JSON.parse('{% endverbatim %}{{ onEvent|raw }}{% verbatim %}');
  217.             {% endverbatim %}{% endif %}
  218.         </script>{% endif %}
  219.     {% endblock %}
  220.     {% block wbm_layout_head_tag_manager_snippet %}
  221.         {% if wbmTagManagerConfig.gtmContainerId %}<!-- WbmTagManagerEcomm Head Snippet Start -->
  222.         <script id=\"wbmTagManger\" {{ wbmTagManagerConfig.scriptTagAttributes|raw }}>{% verbatim %}
  223.             function getCookie(name) {
  224.                 var cookieMatch = document.cookie.match(name + '=(.*?)(;|\$)');
  225.                 return cookieMatch && decodeURI(cookieMatch[1]);
  226.             }
  227.             var gtmCookieSet = getCookie('{% endverbatim %}{{ wbmTagManagerConfig.wbmCookieEnabledName }}{% verbatim %}');
  228.             {% endverbatim %}{% if wbmTagManagerConfig.gtmFunctionOverwrite is empty %}{% verbatim %}
  229.             var googleTag = 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='https://www.googletagmanager.com/gtm.js?id='+i+dl+'{% endverbatim %}{{ wbmTagManagerConfig.extendedUrlParameter|trim|raw }}{% verbatim %}';f.parentNode.insertBefore(j,f);};
  230.             {% endverbatim %}{% else %}{% verbatim %}
  231.             var googleTag = {% endverbatim %}{{ wbmTagManagerConfig.gtmFunctionOverwrite }}{% verbatim %}
  232.             {% endverbatim %}{% endif %}{% verbatim %}
  233.             if (hasSWConsentSupport && gtmCookieSet === null) {
  234.                 window.wbmGoogleTagmanagerId = gtmContainerId;
  235.                 window.wbmScriptIsSet = false;
  236.                 window.googleTag = googleTag;
  237.             } else {
  238.                 window.wbmScriptIsSet = true;
  239.                 googleTag(window, document, 'script', 'dataLayer', gtmContainerId);
  240.                 googleTag = null;
  241.             }{% endverbatim %}
  242.         </script><!-- WbmTagManagerEcomm Head Snippet End -->{% endif %}
  243.     {% endblock %}
  244. {% endblock %}
  245. ""@WbmTagManagerEcomm/storefront/layout/meta.html.twig""/home/ploi/mesamis.websignaal.nl/vendor/store.shopware.com/wbmtagmanagerecomm/src/Resources/views/storefront/layout/meta.html.twig");
  246.     }
  247. }