{*
!!!!! Bacha, spousta nastavení je tady dvakrát! Jednou pro komponentí a jednou pro nekomponentí shopy !!!!!
*}
{change_translations_domain domain='marketingSettingsWindowTab'}
<div id="flapMarketing" class="tab-pane fade boxFlex">
{ifmodule COMPONENTS}
     {block "gtm"}
      <h1 class="h4 main-panel-title">
         Google Tag Manager
         <a href="javascript:help('analytics', '1');" class="pull-right badge badge-secondary"><i
                    class="bi bi-question-circle"></i></a>
      </h1>
         <div class="form-group">
            <div class="col-md-2 control-label">
               {'GTMPriceCurrency'|translate}
            </div>
            <div class="col-md-2">
               {get_contexts currency=1 assign="contexts"}
               <select class="selecter" name="data[analytics][google_tag_manager][currency]">
                  <option value="">{'GTMPriceCurrencyDefault'|translate}</option>
                  {foreach $contexts.currency->getSupported() as $cur}
                     <option value="{$cur->getId()}" {if $body.data.analytics.google_tag_manager.currency == $cur->getId()}selected="selected"{/if}>{$cur->getName()}</option>
                  {/foreach}
               </select>
            </div>

            <div class="col-md-2 control-label">
               {'GTMPricesWithoutVAT'|translate}
               <a class="help-tip" data-toggle="tooltip" title="{'GTMPricesWithoutVATInfo'|translate}">
                  <i class="bi bi-question-circle"></i></a>
            </div>
            <div class="col-md-1">
               {print_toggle name="analytics][google_tag_manager][withoutVAT"  value={$body.data.analytics.google_tag_manager.withoutVAT}}
            </div>

            <div class="col-md-3 control-label">
               {'GTMPurchaseWithoutDelivery'|translate}
               <a class="help-tip" data-toggle="tooltip" title="{'GTMPurchaseWithoutDeliveryInfo'|translate}">
                  <i class="bi bi-question-circle"></i></a>
            </div>
            <div class="col-md-1">
               {print_toggle name="analytics][google_tag_manager][withoutDelivery"  value={$body.data.analytics.google_tag_manager.withoutDelivery}}
            </div>

         </div>


         <h1 class="h4 main-panel-title">
            &nbsp;&nbsp;Client Side GTM
            <a href="javascript:help('analytics', '1');" class="pull-right badge badge-secondary"><i
                       class="bi bi-question-circle"></i></a>
         </h1>
         <div class="form-group">
            <div class="col-md-2 control-label">
               ID
            </div>
            <div class="col-md-5">
               <input type="text" class="form-control input-sm" name="data[analytics][google_tag_manager][ID]"
                      value="{$body.data.analytics.google_tag_manager.ID}">
            </div>
         </div>
         {*  Aby se dalo i na betě/review/locale zapnout ostré GTM *}
         {if isDevelopment()}
            <div class="form-group">
               <div class="col-md-2 control-label two-lines">
                  {'GTMReallyRun'|translate}
                  <a class="help-tip" data-toggle="tooltip" title="{'GTMReallyRunInfo'|translate}">
                     <i class="bi bi-question-circle"></i></a>
               </div>
               <div class="col-md-1">
                  {print_toggle name="analytics][google_tag_manager][reallyRun"  value={$body.data.analytics.google_tag_manager.reallyRun}}
               </div>
            </div>
         {/if}

         <div class="form-group">
            <div class="col-md-2 control-label">
               {'GTMShaSalt'|translate}
            </div>
            <div class="col-md-5">
               <input type="text" class="form-control input-sm" name="data[analytics][google_tag_manager][sha_salt]"
                      value="{$body.data.analytics.google_tag_manager.sha_salt}">
            </div>
         </div>

         <div class="form-group">
            <div class="col-md-2 control-label">
               {'GTM_Domain'|translate}
            </div>
               <div class="col-md-5">
                  <input type="text" class="form-control input-sm" name="data[analytics][google_tag_manager][domain]"
                         value="{$body.data.analytics.google_tag_manager.domain}">
               </div>
         </div>

         {if $module.GTM__CONTAINER_CONFIG}
            <div class="form-group">
               <div class="col-md-2 control-label">
                  {'GTM_CC_FE_toggle'|translate}
               </div>
                  <div class="col-md-1">
                     {print_toggle name="analytics][google_tag_manager][container_config_fe"  value={$body.data.analytics.google_tag_manager.container_config_fe}}
                  </div>
            </div>

            <script type="text/javascript">
               $(document).ready(function() {
                   function toggleInputState() {
                      $('input[name="data[analytics][google_tag_manager][domain]"]')
                         .prop('readonly', $('input[name="data[analytics][google_tag_manager][container_config_fe]"]').is(':checked'));
                   }

                   toggleInputState();
                   $('input[name="data[analytics][google_tag_manager][container_config_fe]"]').change(function() {
                       toggleInputState();
                   });
               });

            </script>
         {/if}

         <h2 class="h5 main-panel-title">&nbsp;&nbsp;Server Side GTM</h2>
         <div class="form-group">
            <div class="col-md-2 control-label two-lines">
               {'GTMServerUrl'|translate}
               <a class="help-tip" data-toggle="tooltip" title="{'GTMServerUrlInfo'|translate}">
                  <i class="bi bi-question-circle"></i></a>
            </div>
            <div class="col-md-5">
               <input type="text" class="form-control input-sm" name="data[analytics][google_tag_manager][serverUrl]"
                      value="{$body.data.analytics.google_tag_manager.serverUrl}">
            </div>
         </div>
         <div class="form-group">
            <div class="col-md-2 control-label">
               {'GTMServerDebugHash'|translate}
            </div>
            <div class="col-md-5">
               <input type="text" class="form-control input-sm" name="data[analytics][google_tag_manager][debugHash]"
                      value="{$body.data.analytics.google_tag_manager.debugHash}">
            </div>
         </div>
         <div class="form-group">
            {foreach range(1,3) as $k}
                  <div class="{if $k == 1}col-md-offset-1{/if} col-md-1 control-label two-lines">
                    {$k}. GA4 ID pro cookie
                        <a class="help-tip" data-toggle="tooltip" title="Pro separování GA4 session ID z cookie">
                        <i class="bi bi-question-circle"></i></a>
                  </div>
                  <div class="col-md-2">
                     {$ga4measurementId = ($k>1) ? "ga4_measurement_id_$k" : "ga4_measurement_id"}
                     <input type="text" class="form-control input-sm" name="data[analytics][google_tag_manager][{$ga4measurementId}]"
                            value="{$body.data.analytics.google_tag_manager.$ga4measurementId}">
                  </div>
            {/foreach}
         </div>
         {if {findModule('gtm','container_config')}}
            <div class="form-group">
               <div class="col-md-2 control-label">
                  {'GTM_CC_SS_toggle'|translate}
               </div>
                  <div class="col-md-1">
                     {print_toggle name="analytics][google_tag_manager][container_config_ss"  value={$body.data.analytics.google_tag_manager.container_config_ss}}
                  </div>
            </div>
         {/if}
      {/block}


    {foreach ['google', 'facebook', 'seznam'] as $type}
      <h1 class="h4 main-panel-title">
         {$type|ucfirst} Site Verification
      </h1>
      <div data-form="{$type}_site_verifications_file">
         <div class="form-group">
            <div class="col-md-3">
               <a href="#" data-form-add class="btn btn-success btn-block"><span class="glyphicon glyphicon-plus"></span>&nbsp;{'buttonAddValue'|translate}</a>
            </div>
         </div>

         <div class="form-group">
            <div class="col-md-12">
               <div class="panel-group panel-group-lists">
                  <div class="panel">
                     <div class="panel-heading">
                        <div class="row">
                           <div class="col-md-3 text-left col-md-offset-1" style="padding-left: 0;">
                              <small><strong>{'VerificationString'|translate}</strong></small>
                           </div>
                           <div class="col-md-4 text-left col-md-offset-1" style="padding-left: 0;">
                              <small><strong>{'note'|translate}</strong></small>
                           </div>

                        </div>
                     </div>
                  </div>
                  {foreach array_merge([[]], $body.data.analytics["{$type}_site_verifications_file"]|default:[]) as $row}
                     <div class="panel" {if !$row@index} data-form-new style="display:none" {else} data-form-item {/if}>
                        <div class="panel-body bottom-space">
                           <div class="col-md-5">
                              <input type="text" class="form-control input-sm" name="data[analytics][{$type}_site_verifications_file][{$row@index}][value]"  value="{$row.value}">
                           </div>
                           <div class="col-md-5">
                              <input type="text" class="form-control input-sm" name="data[analytics][{$type}_site_verifications_file][{$row@index}][note]"  value="{$row.note}">
                           </div>
                           <div class="col-md-2 text-right">
                              <div class="btn-group">
                                 <a class="btn-sm btn btn-danger" title="{'buttonDeleteValue'|translate}" data-form-delete >
                                    <input class="hidden" type="checkbox" name="data[analytics][{$type}_site_verifications_file][{$row@index}][delete]">
                                    <span class="glyphicon glyphicon-remove"></span>
                                 </a>
                              </div>
                           </div>
                        </div>
                     </div>
                  {/foreach}
               </div>
            </div>
         </div>
      </div>
         <script type="application/javascript">
            initForm({
               selector: '[data-form={$type}_site_verifications_file]',
               jsonFriendly: true,
            });
         </script>
      {/foreach}


      <h1 class="h4 main-panel-title">
         Heureka
            <a class="help-tip" data-toggle="tooltip" title="Slouží pouze pro odesílání serverové části měření konverzí, frontendovou část je třeba implementovat přes GTM.">
               <i class="bi bi-question-circle"></i></a>
      </h1>
      <div class="form-group">
         <div class="col-md-2 control-label">
            {'VerifiedByCustomers'|translate}
         </div>
         <div class="col-md-5">
            <input type="text" class="form-control input-sm" name="data[analytics][heureka_overeno][ID]"
                   value="{$body.data.analytics.heureka_overeno.ID}">
         </div>
      </div>
      <div class="form-group">
         <div class="col-md-2 control-label">
            {'SendProductsToHeureka'|translate}
         </div>
         <div class="col-md-1">
            {print_toggle name="analytics][heureka_overeno][send_products"
               value={$body.data.analytics.heureka_overeno.send_products|default:'Y'}}
         </div>
      </div>

      <h1 class="h4 main-panel-title">
         Zboží.cz + Sklik
            <a class="help-tip" data-toggle="tooltip" title="Slouží pouze pro odesílání serverové části měření konverzí, frontendovou část je třeba implementovat přes GTM.">
               <i class="bi bi-question-circle"></i></a>
      </h1>
      <div class="form-group">
         <div class="col-md-2 control-label">
            {'ZboziIdStore'|translate}
         </div>
         <div class="col-md-5">
            <input type="text" class="form-control input-sm" name="data[analytics][zbozi_cz_feedback][ID]"
                   value="{$body.data.analytics.zbozi_cz_feedback.ID}">
         </div>
      </div>

      <div class="form-group">
         <div class="col-md-2 control-label">
            {'ZboziSecretKey'|translate}
         </div>
         <div class="col-md-5">
            <input type="text" class="form-control input-sm" name="data[analytics][zbozi_cz_feedback][secret_key]"
                   value="{$body.data.analytics.zbozi_cz_feedback.secret_key}">
         </div>
      </div>

      <div class="form-group">
         <div class="col-md-2 control-label">
            {'ZboziAPIKey'|translate}
         </div>
         <div class="col-md-5">
            <input type="text" class="form-control input-sm" name="data[analytics][zbozi_cz_feedback][API_key]"
                   value="{$body.data.analytics.zbozi_cz_feedback.API_key}">
         </div>
      </div>


      <h1 class="h4 main-panel-title">
         SupportBox
            <a class="help-tip" data-toggle="tooltip" title="Slouží pouze pro povolení přístupu supportboxu ke specifickým datům kontaktu z eshopu. Typicky podle emailu/tel poslední objednávka, telefon, ...">
               <i class="bi bi-question-circle"></i></a>
      </h1>
      <div class="form-group">
         <div class="col-md-2 control-label">
            SupportBox ID pro emaily
         </div>
         <div class="col-md-5">
            <input type="text" class="form-control input-sm" name="data[analytics][supportbox][id]"
                   value="{$body.data.analytics.supportbox.id}">
         </div>
      </div>
      <div class="form-group">
         <div class="col-md-2 control-label">
            SupportBox ID pro telefony
         </div>
         <div class="col-md-5">
            <input type="text" class="form-control input-sm" name="data[analytics][supportbox][id_phone]"
                   value="{$body.data.analytics.supportbox.id_phone}">
         </div>
      </div>

      <h1 class="h4 main-panel-title">
         Vivnetworks CJ
      </h1>
      <div class="form-group">
         <div class="col-md-2 control-label">
            CID
         </div>
         <div class="col-md-5">
            <input type="text" class="form-control input-sm" name="data[analytics][cjtracking][CID]"
                   value="{$body.data.analytics.cjtracking.CID}">
         </div>
      </div>
      <div class="form-group">
         <div class="col-md-2 control-label">
            TYPE / Action ID
         </div>
         <div class="col-md-5">
            <input type="text" class="form-control input-sm" name="data[analytics][cjtracking][TYPE]"
                   value="{$body.data.analytics.cjtracking.TYPE}">
         </div>
      </div>
      <div class="form-group">
         <div class="col-md-2 control-label">
            Sote Tag ID
         </div>
         <div class="col-md-5">
            <input type="text" class="form-control input-sm" name="data[analytics][cjtracking][tag]"
                   value="{$body.data.analytics.cjtracking.tag}">
         </div>
      </div>

      <h1 class="h4 main-panel-title">
         Cookiebot
      </h1>
      <div class="form-group">
         <div class="col-md-2 control-label">
            Domain Group ID
         </div>
         <div class="col-md-5">
            <input type="text" class="form-control input-sm" name="data[analytics][cookiebot][ID]"
                   value="{$body.data.analytics.cookiebot.ID}">
         </div>
      </div>

      <h1 class="h4 main-panel-title">
         Zákaznické recenze Google
      </h1>
      <div class="form-group">
         <div class="col-md-2 control-label">
            Merchant ID
         </div>
         <div class="col-md-5">
            <input type="text" class="form-control input-sm" name="data[analytics][google_customer_reviews][merchant_id]"
                   value="{$body.data.analytics.google_customer_reviews.merchant_id}">
         </div>
      </div>


      <div {if !isSuperuser()}style="display: none"{/if}>
         <h1 class="h4 main-panel-title">
            GrowthBook
            <span class="glyphicon glyphicon-flash" style="color: #aab2bd;" title="Vidí pouze superadmin"></span>
         </h1>
         <div class="form-group">
            <div class="col-md-2 control-label">
               Client Key
            </div>
            <div class="col-md-5">
               <input type="text" class="form-control input-sm" name="data[analytics][growthbook][key]"
                     value="{$body.data.analytics.growthbook.key}" placeholder="sdk-....">
            </div>
         </div>
     </div>

      {ifmodule LUIGIS_BOX}
       <div>
         <h1 class="h4 main-panel-title">
            Luigi's Box
         </h1>
         <div class="form-group">
            <div class="col-md-2 control-label">
               {'trackingCode'|translate:'LuigisBox'}
            </div>
            <div class="col-md-5">
               <input type="text" class="form-control input-sm" name="data[analytics][luigis_box][id]"
                      value="{$body.data.analytics.luigis_box.id}">
            </div>
         </div>
         <div class="form-group">
            <div class="col-md-2 control-label">
               {'apikey'|translate:'LuigisBox'}
            </div>
            <div class="col-md-5">
               <input type="text" class="form-control input-sm" name="data[analytics][luigis_box][key]"
                      value="{$body.data.analytics.luigis_box.key}">
            </div>
         </div>
         <div class="form-group">
            <div class="col-md-2 control-label">
                {'activate'|translate:'LuigisBox'}
            </div>
            <div class="col-md-2">
               {$selected = $body.data.analytics.luigis_box.search|default:'N'}
               {print_select name="data[analytics][luigis_box][search]" selected=$selected
                             var=['Y' => {'active'|translate}, 'N' => {'inactive'|translate}, 'A' => {'admin_only'|translate}]}
            </div>
         </div>
      </div>
      {/ifmodule}
{elsemodule}
      <h1 class="h4 main-panel-title">
         Google Analytics
         <a href="javascript:help('analytics', '1');" class="pull-right badge badge-secondary"><i
                    class="bi bi-question-circle"></i></a>
      </h1>
      <div class="form-group m-b-3">
         <div class="col-md-2 control-label">
            GA4 measurement ID
         </div>
         <div class="col-md-3">
            <input type="text" class="form-control input-sm" name="data[analytics][ga4][ID]"
                   value="{$body.data.analytics.ga4.ID}">
         </div>
      </div>

      {block "gtm"}
      <h1 class="h4 main-panel-title">
         Google Tag Manager
         <a href="javascript:help('analytics', '1');" class="pull-right badge badge-secondary"><i
                    class="bi bi-question-circle"></i></a>
      </h1>
         <div class="form-group">
            <div class="col-md-2 control-label">
               {'GTMPriceCurrency'|translate}
            </div>
            <div class="col-md-2">
               {get_contexts currency=1 assign="contexts"}
               <select class="selecter" name="data[analytics][google_tag_manager][currency]">
                  <option value="">{'GTMPriceCurrencyDefault'|translate}</option>
                  {foreach $contexts.currency->getSupported() as $cur}
                     <option value="{$cur->getId()}" {if $body.data.analytics.google_tag_manager.currency == $cur->getId()}selected="selected"{/if}>{$cur->getName()}</option>
                  {/foreach}
               </select>
            </div>

            <div class="col-md-2 control-label">
               {'GTMPricesWithoutVAT'|translate}
               <a class="help-tip" data-toggle="tooltip" title="{'GTMPricesWithoutVATInfo'|translate}">
                  <i class="bi bi-question-circle"></i></a>
            </div>
            <div class="col-md-1">
               {print_toggle name="analytics][google_tag_manager][withoutVAT"  value={$body.data.analytics.google_tag_manager.withoutVAT}}
            </div>

            <div class="col-md-3 control-label">
               {'GTMPurchaseWithoutDelivery'|translate}
               <a class="help-tip" data-toggle="tooltip" title="{'GTMPurchaseWithoutDeliveryInfo'|translate}">
                  <i class="bi bi-question-circle"></i></a>
            </div>
            <div class="col-md-1">
               {print_toggle name="analytics][google_tag_manager][withoutDelivery"  value={$body.data.analytics.google_tag_manager.withoutDelivery}}
            </div>

         </div>


         <h1 class="h4 main-panel-title">
            &nbsp;&nbsp;Client Side GTM
            <a href="javascript:help('analytics', '1');" class="pull-right badge badge-secondary"><i
                       class="bi bi-question-circle"></i></a>
         </h1>
         <div class="form-group">
            <div class="col-md-2 control-label">
               ID
            </div>
            <div class="col-md-5">
               <input type="text" class="form-control input-sm" name="data[analytics][google_tag_manager][ID]"
                      value="{$body.data.analytics.google_tag_manager.ID}">
            </div>
         </div>
         {*  Aby se dalo i na betě/review/locale zapnout ostré GTM *}
         {if isDevelopment()}
            <div class="form-group">
               <div class="col-md-2 control-label two-lines">
                  {'GTMReallyRun'|translate}
                  <a class="help-tip" data-toggle="tooltip" title="{'GTMReallyRunInfo'|translate}">
                     <i class="bi bi-question-circle"></i></a>
               </div>
               <div class="col-md-1">
                  {print_toggle name="analytics][google_tag_manager][reallyRun"  value={$body.data.analytics.google_tag_manager.reallyRun}}
               </div>
            </div>
         {/if}

         <div class="form-group">
            <div class="col-md-2 control-label">
               {'GTMShaSalt'|translate}
            </div>
            <div class="col-md-5">
               <input type="text" class="form-control input-sm" name="data[analytics][google_tag_manager][sha_salt]"
                      value="{$body.data.analytics.google_tag_manager.sha_salt}">
            </div>
         </div>
         <div class="form-group">
            <div class="col-md-2 control-label">
               {'GTM_DL_version'|translate}
            </div>
            <div class="col-md-5">
               {print_select name="data[analytics][google_tag_manager][gtm_dl_version]" selected=$body.data.analytics.google_tag_manager.gtm_dl_version|default:0 var=('DL_opinions'|translate)}
            </div>
            {if isSuperuser()}
               <div class="col-md-2 control-label">
                  <label>{'feEvents'|translate}</label>
                  <a class="help-tip" data-toggle="tooltip" title="Zaškrtne se v případě, že má e-shop FE eventy. V tom případě se při přepnutí na DL v2 vypne backendové měření AddToCart eventy, aby se neposílala 2x.">
                  <i class="bi bi-question-circle"></i></a>
                  <span class="glyphicon glyphicon-flash"></span>
               </div>
               <div class="col-md-1">
                  {print_toggle name="analytics][google_tag_manager][active_fe_events"  value={$body.data.analytics.google_tag_manager.active_fe_events}}
               </div>
             {else}
               <input type="hidden" name="data[analytics][google_tag_manager][active_fe_events]" value="{$body.data.analytics.google_tag_manager.active_fe_events}">
            {/if}
         </div>
         <div class="form-group">
            <div class="col-md-2 control-label">
               {'GTM_Domain'|translate}
            </div>
               <div class="col-md-5">
                  <input type="text" class="form-control input-sm" name="data[analytics][google_tag_manager][domain]"
                         value="{$body.data.analytics.google_tag_manager.domain}">
               </div>
         </div>

         {if {findModule('gtm','container_config')}}
         <div class="form-group">
            <div class="col-md-2 control-label">
               {'GTM_CC_FE_toggle'|translate}
            </div>
               <div class="col-md-1">
                  {print_toggle name="analytics][google_tag_manager][container_config_fe"  value={$body.data.analytics.google_tag_manager.container_config_fe}}
               </div>
         </div>

         <script type="text/javascript">
            $(document).ready(function() {
                function toggleInputState() {
                   $('input[name="data[analytics][google_tag_manager][domain]"]')
                      .prop('readonly', $('input[name="data[analytics][google_tag_manager][container_config_fe]"]').is(':checked'));
                }

                toggleInputState();
                $('input[name="data[analytics][google_tag_manager][container_config_fe]"]').change(function() {
                    toggleInputState();
                });
            });

         </script>
         {/if}

         <h2 class="h5 main-panel-title">&nbsp;&nbsp;Server Side GTM</h2>
         <div class="form-group">
            <div class="col-md-2 control-label two-lines">
               {'GTMServerUrl'|translate}
               <a class="help-tip" data-toggle="tooltip" title="{'GTMServerUrlInfo'|translate}">
                  <i class="bi bi-question-circle"></i></a>
            </div>
            <div class="col-md-5">
               <input type="text" class="form-control input-sm" name="data[analytics][google_tag_manager][serverUrl]"
                      value="{$body.data.analytics.google_tag_manager.serverUrl}">
            </div>
         </div>
         <div class="form-group">
            <div class="col-md-2 control-label">
               {'GTMServerDebugHash'|translate}
            </div>
            <div class="col-md-5">
               <input type="text" class="form-control input-sm" name="data[analytics][google_tag_manager][debugHash]"
                      value="{$body.data.analytics.google_tag_manager.debugHash}">
            </div>
         </div>
         {foreach range(1,3) as $k}
            <div class="form-group">
               <div class="col-md-2 control-label">
                 {$k}. GA4 ID pro cookie
                     <a class="help-tip" data-toggle="tooltip" title="Pro separování GA4 session ID z cookie">
                     <i class="bi bi-question-circle"></i></a>
               </div>
               <div class="col-md-5">
                  {$ga4measurementId = ($k>1) ? "ga4_measurement_id_$k" : "ga4_measurement_id"}
                  <input type="text" class="form-control input-sm" name="data[analytics][google_tag_manager][{$ga4measurementId}]"
                         value="{$body.data.analytics.google_tag_manager.$ga4measurementId}">
               </div>
            </div>
         {/foreach}

         {if {findModule('gtm','container_config')}}
         <div class="form-group">
            <div class="col-md-2 control-label">
               {'GTM_CC_SS_toggle'|translate}
            </div>
               <div class="col-md-1">
                  {print_toggle name="analytics][google_tag_manager][container_config_ss"  value={$body.data.analytics.google_tag_manager.container_config_ss}}
               </div>
         </div>
         {/if}
      {/block}
      <h1 class="h4 main-panel-title">
         Google Ads
         <a href="javascript:help('analytics', '2');" class="pull-right badge badge-secondary"><i
                    class="bi bi-question-circle"></i></a>
      </h1>
      <div class="form-group">
         <div class="col-md-2 control-label">
            ID
         <a class="help-tip" data-toggle="tooltip" title="{'adsDescr'|translate}">
               <i class="bi bi-question-circle"></i>
            </a>
         </div>
         <div class="col-md-5">
            <input type="text" class="form-control input-sm" name="data[analytics][google_conversion][ID]"
                   value="{$body.data.analytics.google_conversion.ID}">
         </div>
      </div>
      <div class="form-group">
         <div class="col-md-2 control-label">
            Label
         </div>
         <div class="col-md-5">
            <input type="text" class="form-control input-sm" name="data[analytics][google_conversion][label]"
                   value="{$body.data.analytics.google_conversion.label}">
         </div>
      </div>

      {foreach ['google', 'facebook', 'pinterest'] as $type}
      <h1 class="h4 main-panel-title">
         {$type|ucfirst} Site Verification
      </h1>
      <div data-form="{$type}_site_verification">
         <div class="form-group">
            <div class="col-md-3">
               <a href="#" data-form-add class="btn btn-success btn-block"><span class="glyphicon glyphicon-plus"></span>&nbsp;{'buttonAddValue'|translate}</a>
            </div>
         </div>

         <div class="form-group">
            <div class="col-md-12">
               <div class="panel-group panel-group-lists">
                  <div class="panel">
                     <div class="panel-heading">
                        <div class="row">
                           <div class="col-md-3 text-left col-md-offset-1" style="padding-left: 0;">
                              <small><strong>{'VerificationString'|translate}</strong></small>
                           </div>
                           <div class="col-md-4 text-left col-md-offset-1" style="padding-left: 0;">
                              <small><strong>{'note'|translate}</strong></small>
                           </div>

                        </div>
                     </div>
                  </div>
                  {foreach array_merge([[]], $body.data.analytics["{$type}_site_verifications"]|default:[]) as $row}
                     <div class="panel" {if !$row@index} data-form-new style="display:none" {else} data-form-item {/if}>
                        <div class="panel-body bottom-space">
                           <div class="col-md-5">
                              <input type="text" class="form-control input-sm" name="data[analytics][{$type}_site_verifications][{$row@index}][value]"  value="{$row.value}">
                           </div>
                           <div class="col-md-5">
                              <input type="text" class="form-control input-sm" name="data[analytics][{$type}_site_verifications][{$row@index}][note]"  value="{$row.note}">
                           </div>
                           <div class="col-md-2 text-right">
                              <div class="btn-group">
                                 <a class="btn-sm btn btn-danger" title="{'buttonDeleteValue'|translate}" data-form-delete >
                                    <input class="hidden" type="checkbox" name="data[analytics][{$type}_site_verifications][{$row@index}][delete]">
                                    <span class="glyphicon glyphicon-remove"></span>
                                 </a>
                              </div>
                           </div>
                        </div>
                     </div>
                  {/foreach}
               </div>
            </div>
         </div>
      </div>
         <script type="application/javascript">
            initForm({
               selector: '[data-form={$type}_site_verification]',
               jsonFriendly: true,
            });
         </script>
      {/foreach}
      <h1 class="h4 main-panel-title">
         Heureka
         <a href="javascript:help('analytics', '3');" class="pull-right badge badge-secondary"><i
                    class="bi bi-question-circle"></i></a>
      </h1>
      <div class="form-group">
         <div class="col-md-2 control-label">
            {'VerifiedByCustomers'|translate}
         </div>
         <div class="col-md-5">
            <input type="text" class="form-control input-sm" name="data[analytics][heureka_overeno][ID]"
                   value="{$body.data.analytics.heureka_overeno.ID}">
         </div>
      </div>
      <div class="form-group">
         <div class="col-md-2 control-label">
            {'SendProductsToHeureka'|translate}
         </div>
         <div class="col-md-1">
            {print_toggle name="analytics][heureka_overeno][send_products"
               value={$body.data.analytics.heureka_overeno.send_products|default:'Y'}}
         </div>
      </div>
      <div class="form-group">
         <div class="col-md-2 control-label">
            {'ConversionTracking'|translate}
         </div>
         <div class="col-md-5">
            <input type="text" class="form-control input-sm" name="data[analytics][heureka_conversion][ID]"
                   value="{$body.data.analytics.heureka_conversion.ID}">
         </div>
      </div>

      {get_contexts language=1 assign="contexts"}
      {$supportedLanguage = $contexts.language->getSupported()}
      {foreach $supportedLanguage as $lang}
         {if $lang.id == 'sk'}
            {$hasSkLanguage = true}
            {break}
         {/if}
      {/foreach}

      {* maji vyplnenou SK heureku a zaroven zapnuty SK jazyk (vicejazycny shop) - varovani *}
      {if ($body.data.analytics.heureka_overeno.ID_SK or $body.data.analytics.heureka_conversion.ID_SK) and $supportedLanguage|count > 1}
         {if $hasSkLanguage}
            <div class="row">
               <div class="col-md-5 col-md-push-2">
                  <p class="alert alert-warning">Přenést do Nastavení Eshopu > Slovenština > Měřící kódy:</p>
               </div>
            </div>
         {/if}
      {/if}

      {* maji vyplnenou SK heureku z dřívějška, nebo nemají zapnutý samostatný SK jazyk (jednojazycny shop) *}
      {if ($body.data.analytics.heureka_overeno.ID_SK or $body.data.analytics.heureka_conversion.ID_SK) or !$hasSkLanguage}
         <div class="form-group">
            <div class="col-md-2 control-label">
               {'VerifiedByCustomersSK'|translate}
            </div>
            <div class="col-md-5">
               <input type="text" class="form-control input-sm" name="data[analytics][heureka_overeno][ID_SK]"
                      value="{$body.data.analytics.heureka_overeno.ID_SK}">
            </div>
         </div>
         <div class="form-group">
            <div class="col-md-2 control-label">
               {'ConversionTrackingSK'|translate}
            </div>
            <div class="col-md-5">
               <input type="text" class="form-control input-sm" name="data[analytics][heureka_conversion][ID_SK]"
                      value="{$body.data.analytics.heureka_conversion.ID_SK}">
            </div>
         </div>
      {/if}

      <div class="form-group">
         <div class="col-md-2 control-label two-lines">
             {'backendConversionOnly'|translate}
         </div>
         <div class="col-md-1">
             {print_toggle name="analytics][heureka_conversion][backend_only"  value={$body.data.analytics.heureka_conversion.backend_only}}
         </div>
      </div>

      <h1 class="h4 main-panel-title">
         Zboží.cz + Sklik
         <a href="javascript:help('analytics', '5');" class="pull-right badge badge-secondary"><i
                    class="bi bi-question-circle"></i></a>
      </h1>
      <div class="form-group">
         <div class="col-md-2 control-label">
            {'ZboziIdStore'|translate}
         </div>
         <div class="col-md-5">
            <input type="text" class="form-control input-sm" name="data[analytics][zbozi_cz_feedback][ID]"
                   value="{$body.data.analytics.zbozi_cz_feedback.ID}">
         </div>
      </div>
      <div class="form-group">
         <div class="col-md-2 control-label">
            {'NewConversionTracking'|translate}
         </div>
         <div class="col-md-5">
            <input type="text" class="form-control input-sm" name="data[analytics][new_conversion_code][ID]"
                   value="{$body.data.analytics.new_conversion_code.ID}">
         </div>
      </div>

      <div class="form-group">
         <div class="col-md-2 control-label">
            {'SklikRetargetingId'|translate}
         </div>
         <div class="col-md-5">
            <input type="text" class="form-control input-sm" name="data[analytics][seznam_rtg][ID]"
                   value="{$body.data.analytics.seznam_rtg.ID}">
         </div>
      </div>
      <div class="form-group">
         <div class="col-md-2 control-label">
            {'ZboziSecretKey'|translate}
         </div>
         <div class="col-md-5">
            <input type="text" class="form-control input-sm" name="data[analytics][zbozi_cz_feedback][secret_key]"
                   value="{$body.data.analytics.zbozi_cz_feedback.secret_key}">
         </div>
      </div>
      <div class="form-group">
         <div class="col-md-2 control-label">
            {'ZboziAPIKey'|translate}
         </div>
         <div class="col-md-5">
            <input type="text" class="form-control input-sm" name="data[analytics][zbozi_cz_feedback][API_key]"
                   value="{$body.data.analytics.zbozi_cz_feedback.API_key}">
         </div>
      </div>
      <div class="form-group">
         <div class="col-md-2 control-label two-lines">
             {'backendConversionOnly'|translate}
         </div>
         <div class="col-md-1">
             {print_toggle name="analytics][new_conversion_code][backend_only"  value={$body.data.analytics.new_conversion_code.backend_only}}
         </div>
      </div>

      <h1 class="h4 main-panel-title">
         Seznam Webmaster
      </h1>
      <div class="form-group">
         <div class="col-md-2 control-label">
            {'VerificationString'|translate}
         </div>
         <div class="col-md-5">
            <input type="text" class="form-control input-sm" name="data[analytics][seznam_webmaster][id]"
                   value="{$body.data.analytics.seznam_webmaster.id}">
         </div>
      </div>

      <h1 class="h4 main-panel-title">
         Facebook Pixel
      </h1>
      <div class="form-group">
         <div class="col-md-2 control-label">
            FB Pixel ID
         </div>
         <div class="col-md-5">
            <input type="text" class="form-control input-sm" name="data[analytics][fb_pixel][id]"
                   value="{$body.data.analytics.fb_pixel.id}">
         </div>
      </div>


      <h1 class="h4 main-panel-title">
         Smartsupp Chat
      </h1>
      <div class="form-group">
         <div class="col-md-2 control-label">
            Smartsupp chat key
         </div>
         <div class="col-md-5">
            <input type="text" class="form-control input-sm" name="data[analytics][smartsapp][id]"
                   value="{$body.data.analytics.smartsapp.id}">
         </div>
      </div>

      <h1 class="h4 main-panel-title">
         SupportBox
      </h1>
      <div class="form-group">
         <div class="col-md-2 control-label">
            SupportBox ID pro emaily
         </div>
         <div class="col-md-5">
            <input type="text" class="form-control input-sm" name="data[analytics][supportbox][id]"
                   value="{$body.data.analytics.supportbox.id}">
         </div>
      </div>
      <div class="form-group">
         <div class="col-md-2 control-label">
            SupportBox ID pro telefony
         </div>
         <div class="col-md-5">
            <input type="text" class="form-control input-sm" name="data[analytics][supportbox][id_phone]"
                   value="{$body.data.analytics.supportbox.id_phone}">
         </div>
      </div>
      <div class="form-group">
         <div class="col-md-2 control-label">
            SupportBox ID pro chat
         </div>
         <div class="col-md-5">
            <input type="text" class="form-control input-sm" name="data[analytics][supportbox][id_chat]"
                   value="{$body.data.analytics.supportbox.id_chat}">
         </div>
      </div>

      <div class="form-group">
         <div class="col-md-2 control-label">
            SupportBox Secret pro chat
         </div>
         <div class="col-md-5">
            <input type="text" class="form-control input-sm" name="data[analytics][supportbox][secret_chat]"
                   value="{$body.data.analytics.supportbox.secret_chat}">
         </div>
      </div>

      <h1 class="h4 main-panel-title">
         Crisp
      </h1>
      <div class="form-group">
         <div class="col-md-2 control-label">
            Crisp ID
         </div>
         <div class="col-md-5">
            <input type="text" class="form-control input-sm" name="data[analytics][crisp][id]"
                   value="{$body.data.analytics.crisp.id}">
         </div>
      </div>

      <h1 class="h4 main-panel-title">
         AffilBox
      </h1>
      <div class="form-group">
         <div class="col-md-2 control-label">
            Adresa
         </div>
         <div class="col-md-5">
            <input type="text" class="form-control input-sm" name="data[analytics][affilbox][instance]"
                   value="{$body.data.analytics.affilbox.instance}">
         </div>
      </div>
      <div class="form-group">
         <div class="col-md-2 control-label">
            Inzerent
         </div>
         <div class="col-md-5">
            <input type="text" class="form-control input-sm" name="data[analytics][affilbox][inzerent]"
                   value="{$body.data.analytics.affilbox.inzerent}">
         </div>
      </div>
      <div class="form-group">
         <div class="col-md-2 control-label">
            Kampaň
         </div>
         <div class="col-md-5">
            <input type="text" class="form-control input-sm" name="data[analytics][affilbox][kampan]"
                   value="{$body.data.analytics.affilbox.kampan}">
         </div>
      </div>


      <h1 class="h4 main-panel-title">
         Vivnetworks CJ
      </h1>
      <div class="form-group">
         <div class="col-md-2 control-label">
            CID
         </div>
         <div class="col-md-5">
            <input type="text" class="form-control input-sm" name="data[analytics][cjtracking][CID]"
                   value="{$body.data.analytics.cjtracking.CID}">
         </div>
      </div>
      <div class="form-group">
         <div class="col-md-2 control-label">
            TYPE / Action ID
         </div>
         <div class="col-md-5">
            <input type="text" class="form-control input-sm" name="data[analytics][cjtracking][TYPE]"
                   value="{$body.data.analytics.cjtracking.TYPE}">
         </div>
      </div>
      <div class="form-group">
         <div class="col-md-2 control-label">
            Sote Tag ID
         </div>
         <div class="col-md-5">
            <input type="text" class="form-control input-sm" name="data[analytics][cjtracking][tag]"
                   value="{$body.data.analytics.cjtracking.tag}">
         </div>
      </div>

      <h1 class="h4 main-panel-title">
         Cookiebot
      </h1>
      <div class="form-group">
         <div class="col-md-2 control-label">
            Domain Group ID
         </div>
         <div class="col-md-5">
            <input type="text" class="form-control input-sm" name="data[analytics][cookiebot][ID]"
                   value="{$body.data.analytics.cookiebot.ID}">
         </div>
      </div>

      {if isSuperuser()}
         <h1 class="h4 main-panel-title">
            Foxentry
            <span class="glyphicon glyphicon-flash" style="color: #aab2bd;" title="Vidí pouze superadmin"></span>
         </h1>
         <div class="form-group">
            <div class="col-md-2 control-label">
               Foxentry ID
            </div>
            <div class="col-md-5">
               <input type="text" class="form-control input-sm" name="data[analytics][foxentry][ID]"
                      value="{$body.data.analytics.foxentry.ID}">
            </div>
         </div>
      {else}
          <input type="hidden" name="data[analytics][foxentry][ID]" value="{$body.data.analytics.foxentry.ID}">
      {/if}
      <h1 class="h4 main-panel-title">
         Zákaznické recenze Google
      </h1>
      <div class="form-group">
         <div class="col-md-2 control-label">
            Merchant ID
         </div>
         <div class="col-md-5">
            <input type="text" class="form-control input-sm" name="data[analytics][google_customer_reviews][merchant_id]"
                   value="{$body.data.analytics.google_customer_reviews.merchant_id}">
         </div>
      </div>

      <div {if !isSuperuser()}style="display: none"{/if}>
         <h1 class="h4 main-panel-title">
            GrowthBook
            <span class="glyphicon glyphicon-flash" style="color: #aab2bd;" title="Vidí pouze superadmin"></span>
         </h1>
         <div class="form-group">
            <div class="col-md-2 control-label">
               Client Key
            </div>
            <div class="col-md-5">
               <input type="text" class="form-control input-sm" name="data[analytics][growthbook][key]"
                     value="{$body.data.analytics.growthbook.key}" placeholder="sdk-....">
            </div>
         </div>
     </div>

    {ifmodule LUIGIS_BOX}
       <div>
         <h1 class="h4 main-panel-title">
            Luigi's Box
         </h1>
         <div class="form-group">
            <div class="col-md-2 control-label">
               {'trackingCode'|translate:'LuigisBox'}
            </div>
            <div class="col-md-5">
               <input type="text" class="form-control input-sm" name="data[analytics][luigis_box][id]"
                      value="{$body.data.analytics.luigis_box.id}">
            </div>
         </div>
         <div class="form-group">
            <div class="col-md-2 control-label">
               {'apikey'|translate:'LuigisBox'}
            </div>
            <div class="col-md-5">
               <input type="text" class="form-control input-sm" name="data[analytics][luigis_box][key]"
                      value="{$body.data.analytics.luigis_box.key}">
            </div>
         </div>
         <div class="form-group">
            <div class="col-md-2 control-label">
                {'activate'|translate:'LuigisBox'}
            </div>
            <div class="col-md-2">
               {$selected = $body.data.analytics.luigis_box.search|default:'N'}
               {print_select name="data[analytics][luigis_box][search]" selected=$selected
                             var=['Y' => {'active'|translate}, 'N' => {'inactive'|translate}, 'A' => {'admin_only'|translate}]}
            </div>
         </div>
      </div>
    {/ifmodule}
      <h1 class="h4 main-panel-title">
         Coworkers ChatBot
      </h1>
      <div class="form-group">
         <div class="col-md-2 control-label">
            URL
         </div>
         <div class="col-md-5">
            <input type="text" class="form-control input-sm" name="data[analytics][coworkers][chat_url]"
                   value="{$body.data.analytics.coworkers.chat_url}">
         </div>
      </div>
      {ifmodule TRUSTPILOT}
      <div>
         <h1 class="h4 main-panel-title">
            Trustpilot
         </h1>
         <div class="form-group">
            <div class="col-md-2 control-label">
               E-mail
            </div>
            <div class="col-md-5">
               <input type="text" class="form-control input-sm" name="data[analytics][trustpilot][email]"
                      value="{$body.data.analytics.trustpilot.email}">
            </div>
         </div>
      </div>
{/ifmodule}
{/ifmodule}
</div>
{/change_translations_domain}
