{if $dbcfg.analytics.google_tag_manager.ID}
    {get_elnino_gtm assign=gtm}

   {if $gtm}
        <script type="text/javascript">
           var google_tag_params = {$gtm->getGoogleTagParamsData($pageType, array_merge(['body' => $body ], $context)) nofilter};

           dataLayer.push({ 'google_tag_params': google_tag_params{if $pageType == 'conversion'}{strip}{* TODO: tohle se mi fakt nelibi, je to fuj hnus, ale neni cas*}
               {if !$body.order->getData('conversion_sent')},
               {$gtm->getTransactionData('conversion', ['body' => $body ])|rtrim:'}'|ltrim:'{' nofilter}
               {/if}
               {/strip}{/if} });

        </script>

        {include "block.data.layers.script.tpl"}
    {/if}
{/if}
