Jump to content

Inserir <script> google analytics [Resolvido]


Recommended Posts

Pessoal bom dia !!!                      Presta 1.6.09  - www.vchdental.com.br

 

Após cadastro no Google analytics recebi minha ID e um código js para inserir nas páginas que desejo acompanhar.... Alguém pode me ajudar com o caminho da pasta FTP que devo inserir o código ???

 

PS- Já inseri ID no módulo do google analytics da minha loja.

 

 

 

Edited by VItor Hugo (see edit history)
  • Like 1
Link to comment
Share on other sites

Se vc. quiser inserir código que seja lido em todas as páginas, entao serve o ficheiro header.tpl do seu tema, na parte do body para tal,

 

assim como também o ficheiro  /config/config.inc.php bem em cima, se for código php ou script que vc. tenha no seu servidor. Neste caso após o <?php vc. inclue o script com o comando "include_once" ou "include".

Edited by selectshop.at (see edit history)
Link to comment
Share on other sites

Eu nao sei, mas parece que o módulo anda falhando. Também no fórum Inglês existem alguns tópicos referente a como inserir em todas as páginas, pois aparentemente nao funciona como deve. Para inserir código <script> que seja lido em todas as páginas melhor inserir no header.tpl mesmo no body-tag abaixo dos metas, juntamente como os outros <scripts> lá existentes. Isto funciona 100%.

Link to comment
Share on other sites

Percebi que o google atualizou boa parte de seus sistemas de analise. Agora estão funcionando sincronizados o google adwords, analytics e webmasters. Acho que pode ser isso que está fazendo os módulos falhar. o que não entendo é porque existem dois módulos do analytics... um Analytics que acabou de ser atualizado e outro API do Analytics....

Link to comment
Share on other sites

O módulo API nao funciona sem vc. instalar e configurar o módulo Google Analytics.

 

Please be aware the Google Analytics API module will only work if you either:

have installed and configured the “Google Analytics” module

or have already embedded the Google Analytics script into your shop.

 

a API é uma extensao do módulo. Veja aqui as funcoes que o Google lhe oferece: https://developers.google.com/analytics/

Edited by selectshop.at (see edit history)
Link to comment
Share on other sites

inseri dentro de Arquivo: /www/admin/themes/default/template/header.tpl

 

var tab_modules_list = '{if isset($tab_modules_list) && $tab_modules_list}{$tab_modules_list|addslashes}{/if}';
        var update_success_msg = '{l s='Update successful' js=1}';
        var errorLogin = '{l s='PrestaShop was unable to log in to Addons. Please check your credentials and your Internet connection.'}';
        var search_product_msg = '{l s='Search for a product' js=1}';
    </script>
<script>
  (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
  (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
  m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
  })(window,document,'script','//www.google-analytics.com/analytics.js','ga');

  ga('create', 'UA-544464578294-1', 'auto');
  ga('send', 'pageview');

</script>

{/if}
{if isset($css_files)}
{foreach from=$css_files key=css_uri item=media}
    <link href="{$css_uri|escape:'html':'UTF-8'}" rel="stylesheet" type="text/css"/>
{/foreach}

Link to comment
Share on other sites

visão geral do header.tpl

    *
    * 2007-2014 PrestaShop
    *
    * NOTICE OF LICENSE
    *
    * This source file is subject to the Academic Free License (AFL 3.0)
    * that is bundled with this package in the file LICENSE.txt.
    * It is also available through the world-wide-web at this URL:
    * http://opensource.org/licenses/afl-3.0.php
    * If you did not receive a copy of the license and are unable to
    * obtain it through the world-wide-web, please send an email
    * to [email protected] so we can send you a copy immediately.
    *
    * DISCLAIMER
    *
    * Do not edit or add to this file if you wish to upgrade PrestaShop to newer
    * versions in the future. If you wish to customize PrestaShop for your
    * needs please refer to http://www.prestashop.com for more information.
    *
    *  @author PrestaShop SA <[email protected]>
    *  @copyright  2007-2014 PrestaShop SA
    *  @license    http://opensource.org/licenses/afl-3.0.php  Academic Free License (AFL 3.0)
    *  International Registered Trademark & Property of PrestaShop SA
    *}
    <!DOCTYPE html>
    <!--[if lt IE 7]> <html class="no-js lt-ie9 lt-ie8 lt-ie7 lt-ie6 " lang="en"> <![endif]-->
    <!--[if IE 7]>    <html class="no-js lt-ie9 lt-ie8 ie7" lang="en"> <![endif]-->
    <!--[if IE 8]>    <html class="no-js lt-ie9 ie8" lang="en"> <![endif]-->
    <!--[if gt IE 8]> <html lang="fr" class="no-js ie9" lang="en"> <![endif]-->
    <html lang="{$iso}">
    <head>
        <meta charset="utf-8">
       
        <meta name="viewport" content="width=device-width, initial-scale=0.75, maximum-scale=0.75, user-scalable=0">
        <meta name="apple-mobile-web-app-capable" content="yes">
        <link rel="icon" type="image/x-icon" href="{$img_dir}favicon.ico" />
        <link rel="apple-touch-icon" href="{$img_dir}app_icon.png" />
     
        <meta name="robots" content="NOFOLLOW, NOINDEX">
        <title>{if $meta_title != ''}{$meta_title} • {/if}{$shop_name}</title>
        {if $display_header}
        <script type="text/javascript">
            var help_class_name = '{$controller_name|@addcslashes:'\''}';
            var iso_user = '{$iso_user|@addcslashes:'\''}';
            var full_language_code = '{$full_language_code|@addcslashes:'\''}';
            var country_iso_code = '{$country_iso_code|@addcslashes:'\''}';
            var _PS_VERSION_ = '{$smarty.const._PS_VERSION_|@addcslashes:'\''}';
            var roundMode = {$round_mode|intval};
    {if isset($shop_context)}
        {if $shop_context == Shop::CONTEXT_ALL}
            var youEditFieldFor = '{l s='This field will be modified for all your shops.' js=1}';
        {elseif $shop_context == Shop::CONTEXT_GROUP}
            var youEditFieldFor = '{l s='This field will be modified for all shops in this shop group:' js=1} <b>{$shop_name|@addcslashes:'\''}</b>';
        {else}
            var youEditFieldFor = '{l s='This field will be modified for this shop:' js=1} <b>{$shop_name|@addcslashes:'\''}</b>';
        {/if}
    {else}
            var youEditFieldFor = '';
    {/if}
            var autorefresh_notifications = '{$autorefresh_notifications|@addcslashes:'\''}';
            var new_order_msg = '{l s='A new order has been placed on your shop.' js=1}';
            var order_number_msg = '{l s='Order number:' js=1} ';
            var total_msg = '{l s='Total:' js=1} ';
            var from_msg = '{l s='From:' js=1} ';
            var see_order_msg = '{l s='View this order' js=1}';
            var new_customer_msg = '{l s='A new customer registered on your shop.' js=1}';
            var customer_name_msg = '{l s='Customer name:' js=1} ';
            var new_msg = '{l s='A new message was posted on your shop.' js=1}';
            var see_msg = '{l s='Read this message' js=1}';
            var token = '{$token|addslashes}';
            var token_admin_orders = '{getAdminToken tab='AdminOrders'}';
            var token_admin_customers = '{getAdminToken tab='AdminCustomers'}';
            var token_admin_customer_threads = '{getAdminToken tab='AdminCustomerThreads'}';
            var currentIndex = '{$currentIndex|@addcslashes:'\''}';
            var employee_token = '{getAdminToken tab='AdminEmployees'}';
            var choose_language_translate = '{l s='Choose language' js=1}';
            var default_language = '{$default_language|intval}';
            var admin_modules_link = '{$link->getAdminLink("AdminModules")|addslashes}';
            var tab_modules_list = '{if isset($tab_modules_list) && $tab_modules_list}{$tab_modules_list|addslashes}{/if}';
            var update_success_msg = '{l s='Update successful' js=1}';
            var errorLogin = '{l s='PrestaShop was unable to log in to Addons. Please check your credentials and your Internet connection.'}';
            var search_product_msg = '{l s='Search for a product' js=1}';
        </script>
     
    {/if}
    {if isset($css_files)}
    {foreach from=$css_files key=css_uri item=media}
        <link href="{$css_uri|escape:'html':'UTF-8'}" rel="stylesheet" type="text/css"/>
    {/foreach}
    {/if}
    {if isset($js_files)}
    {foreach from=$js_files item=js_uri}
        <script type="text/javascript" src="{$js_uri|escape:'html':'UTF-8'}"></script>
    {/foreach}
    {/if}
     
        {if isset($displayBackOfficeHeader)}
            {$displayBackOfficeHeader}
        {/if}
        {if isset($brightness)}
        <!--
            // @todo: multishop color
            <style type="text/css">
                div#header_infos, div#header_infos a#header_shopname, div#header_infos a#header_logout, div#header_infos a#header_foaccess {ldelim}color:{$brightness}{rdelim}
            </style>
        -->
        {/if}
    </head>
     
    {if $display_header}
        <body class="ps_back-office{if $employee->bo_menu} page-sidebar{if $collapse_menu} page-sidebar-closed{/if}{else} page-topbar{/if} {$smarty.get.controller|escape|strtolower}">
        {* begin  HEADER *}
        <header id="header" class="bootstrap">
            <nav id="header_infos" role="navigation">
                <div class="navbar-header">
                    <button id="header_nav_toggle" type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse-primary">
                        <i class="icon-reorder"></i>
                    </button>
     
                    <a id="header_shopname" href="{$default_tab_link|escape:'html':'UTF-8'}">
                        <img src="{$img_dir}prestashop-avatar.png" alt="{$shop_name|escape:'html':'UTF-8'}" />
                        {$shop_name}
                    </a>
     
                    <ul id="header_notifs_icon_wrapper">
    {if {$show_new_orders} == 1}
                        <li id="orders_notif" class="dropdown" data-type="order">
                            <a href="javascript:void(0);" class="dropdown-toggle notifs" data-toggle="dropdown">
                                <i class="icon-shopping-cart"></i>
                                <span id="orders_notif_number_wrapper" class="notifs_badge hide">
                                    <span id="orders_notif_value">0</span>
                                </span>
                            </a>
                            <div class="dropdown-menu notifs_dropdown">
                                <section id="orders_notif_wrapper" class="notifs_panel">
                                    <div class="notifs_panel_header">
                                        <h3>{l s='Latest Orders'}</h3>
                                    </div>
                                    <div id="list_orders_notif" class="list_notif">
                                        <span class="no_notifs">
                                            {l s='No new orders have been placed on your shop.'}
                                        </span>
                                    </div>
                                    <div class="notifs_panel_footer">
                                        <a href="index.php?controller=AdminOrders&token={getAdminToken tab='AdminOrders'}">{l s='Show all orders'}</a>
                                    </div>
                                </section>
                            </div>
                        </li>
    {/if}
    {if {$show_new_customers} == 1}
                        <li id="customers_notif" class="dropdown" data-type="customer">
                            <a href="javascript:void(0);" class="dropdown-toggle notifs" data-toggle="dropdown">
                                <i class="icon-user"></i>
                                <span id="customers_notif_number_wrapper" class="notifs_badge hide">
                                    <span id="customers_notif_value">0</span>
                                </span>
                            </a>
                            <div class="dropdown-menu notifs_dropdown">
                                <section id="customers_notif_wrapper" class="notifs_panel">
                                    <div class="notifs_panel_header">
                                        <h3>{l s='Latest Registrations'}</h3>
                                    </div>
                                    <div id="list_customers_notif" class="list_notif">
                                        <span class="no_notifs">
                                            {l s='No new customers have registered on your shop.'}
                                        </span>
                                    </div>
                                    <div class="notifs_panel_footer">
                                        <a href="index.php?controller=AdminCustomers&token={getAdminToken tab='AdminCustomers'}">{l s='Show all customers'}</a>
                                    </div>
                                </section>
                            </div>
                        </li>
    {/if}
    {if {$show_new_messages} == 1}
                        <li id="customer_messages_notif" class="dropdown" data-type="customer_message">
                            <a href="javascript:void(0);" class="dropdown-toggle notifs" data-toggle="dropdown">
                                <i class="icon-envelope"></i>
                                <span id="customer_messages_notif_number_wrapper" class="notifs_badge hide">
                                    <span id="customer_messages_notif_value" >0</span>
                                </span>
                            </a>
                            <div class="dropdown-menu notifs_dropdown">
                                <section id="customer_messages_notif_wrapper" class="notifs_panel">
                                    <div class="notifs_panel_header">
                                        <h3>{l s='Latest Messages'}</h3>
                                    </div>
                                    <div id="list_customer_messages_notif" class="list_notif">
                                        <span class="no_notifs">
                                            {l s='No new messages have been posted on your shop.'}
                                        </span>
                                    </div>
                                    <div class="notifs_panel_footer">
                                        <a href="index.php?controller=AdminCustomerThreads&token={getAdminToken tab='AdminCustomerThreads'}">{l s='Show all messages'}</a>
                                    </div>
                                </section>
                            </div>
                        </li>
    {/if}
                    </ul>
     
    {if count($quick_access) > 0}
                    <ul id="header_quick">
                        <li class="dropdown">
                            <a href="#" id="quick_select" class="dropdown-toggle" data-toggle="dropdown">{l s='Quick Access'} <i class="icon-caret-down"></i></a>
                            <ul class="dropdown-menu">
                            {foreach $quick_access as $quick}
                                <li><a href="{$quick.link|escape:'html':'UTF-8'}" {if $quick.new_window} onclick="return !window.open(this.href);"{/if}><i class="icon-chevron-right"></i> {$quick.name}</a></li>
                            {/foreach}
                            </ul>
                        </li>
                    </ul>
    {/if}
                    <ul id="header_employee_box">
                        {if !isset($logged_on_addons) || !$logged_on_addons}
                            <li>
                                <a href="#" class="addons_connect toolbar_btn" data-toggle="modal" data-target="#modal_addons_connect" title="{l s='Addons'}">
                                    <i class="icon-chain-broken"></i>
                                    <span class="string-long">{l s='Not connected to PrestaShop Addons'}</span>
                                    <span class="string-short">{l s='Addons'}</span>
                                </a>
                            </li>
                        {/if}
    {if {$base_url[spam-filter]
                        <li>
                            <a href="{if isset($base_url_tc)}{$base_url_tc|escape:'html':'UTF-8'}{else}{$base_url|escape:'html':'UTF-8'}{/if}" id="header_foaccess" target="_blank" title="{l s='View my shop'}">
                                <i class="icon-star"></i>
                                <span class="string-long">{l s='My shop'}</span>
                                <span class="string-short">{l s='Shop'}</span>
                            </a>
                        </li>
    {/if}
                        <li id="employee_infos" class="dropdown">
                            <a href="{$link->getAdminLink('AdminEmployees')|escape:'html':'UTF-8'}&id_employee={$employee->id|intval}&updateemployee" class="employee_name dropdown-toggle" data-toggle="dropdown">
                                <span class="employee_avatar_small">
                                    {if isset($employee)}
                                    <img class="imgm img-thumbnail" alt="" src="{$employee->getImage()}" width="32" height="32" />
                                    {/if}
                                </span>
                                <span class="string-long">{$employee->firstname} {$employee->lastname}</span>
                                <span class="string-short">{l s='Me'}</span>
                                <i class="caret"></i>
                            </a>
                            <ul id="employee_links" class="dropdown-menu">
                                <li>
                                    <span class="employee_avatar">
                                        <img class="imgm img-thumbnail" alt="" src="{$employee->getImage()}" width="96" height="96" />
                                    </span>
                                </li>
                                <li class="text-center">{$employee->firstname} {$employee->lastname}</li>
                                <li class="divider"></li>
                                <li><a href="{$link->getAdminLink('AdminEmployees')|escape:'html':'UTF-8'}&id_employee={$employee->id|intval}&updateemployee"><i class="icon-wrench"></i> {l s='My preferences'}</a></li>
                                <li class="divider"></li>
                                <li><a id="header_logout" href="{$default_tab_link|escape:'html':'UTF-8'}&logout"><i class="icon-signout"></i> {l s='Sign out'}</a></li>
                            </ul>
                        </li>
                    </ul>
     
                    <span id="ajax_running">
                        <i class="icon-refresh icon-spin icon-fw"></i>
                    </span>
     
        {if isset($displayBackOfficeTop)}{$displayBackOfficeTop}{/if}
                </div>
            </nav>{* end header_infos*}
        </header>
     
        <div id="main">
            {include file='nav.tpl'}
     
            <div id="content" class="{if !$bootstrap}nobootstrap{else}bootstrap{/if}">
                {if isset($page_header_toolbar)}{$page_header_toolbar}{/if}
                {if isset($modal_module_list)}{$modal_module_list}{/if}
     
    {if $install_dir_exists}
                <div class="alert alert-warning">
                    {l s='For security reasons, you must also delete the /install folder.'}
                </div>
    {/if}
     
     
    {* end display_header*}
     
    {else}
        <body{if isset($lite_display) && $lite_display} class="ps_back-office display-modal"{/if}>     
            <div id="main">
                <div id="content" class="{if !$bootstrap}nobootstrap{else}bootstrap{/if}">
    {/if}


Edited by VItor Hugo (see edit history)
Link to comment
Share on other sites

Boas,

 

Deve colocar o seguinte codigo no ficheiro footer.tpl

{literal}
<script>
  (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
  (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
  m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
  })(window,document,'script','//www.google-analytics.com/analytics.js','ga');
  ga('create', 'UA-544464578294-1', 'auto');
  ga('send', 'pageview');
</script>
{/literal}
Link to comment
Share on other sites

Igualmente pode inserir no header.tpl, só que entre {literal} {/literal},  ou entao com o módulo indicado. Se for inserir no footer.tpl. atente para que vc. insira o cógido antes do body-tag for fechado </body>. Depois desta linha o código nao terá efeito e bem provavél que dê erro na página. ;)

Edited by selectshop.at (see edit history)
Link to comment
Share on other sites

Tanto o header, como o footer tem efeito em TODAS AS páginas da sua loja, pois o body-tag se abre no ficheiro header.tpl e se feche no ficheiro footer.tpl. Por isso é que eu escrevi que vai ter que inserir antes do </body> se for inserir no ficheiro footer.tpl. Se for inserir no ficheiro header entao depois doe <body> em qualquer lugar que for, de preferencia no bloco dos scripts ou seja abaixo dos metas.

Link to comment
Share on other sites

O ficheiro que postou no tópico #13, nao é um ficheiro original. Vc. está usando um tema próprio ?

 

Se vc. for deixar estas linhas:

 

<meta name="robots" content="NOFOLLOW, NOINDEX">
<title>{if $meta_title != ''}{$meta_title} • {/if}{$shop_name}</title>
 

 

O Google vai rejeitar a sua página. nofollow, noindex = página nao deve ser indexada e os links contidos idem nao indexados.

 

O title está com hieróglifos... 

• 

Nenhuma máquina de busca vai entender.

 

Original header Prestashop 1.6.0.9. vc. deverá deixar como está com excecao da insercao do código para o analytics:

{*
* 2007-2014 PrestaShop
*
* NOTICE OF LICENSE
*
* This source file is subject to the Academic Free License (AFL 3.0)
* that is bundled with this package in the file LICENSE.txt.
* It is also available through the world-wide-web at this URL:
* http://opensource.org/licenses/afl-3.0.php
* If you did not receive a copy of the license and are unable to
* obtain it through the world-wide-web, please send an email
* to [email protected] so we can send you a copy immediately.
*
* DISCLAIMER
*
* Do not edit or add to this file if you wish to upgrade PrestaShop to newer
* versions in the future. If you wish to customize PrestaShop for your
* needs please refer to http://www.prestashop.com for more information.
*
*  @author PrestaShop SA <[email protected]>
*  @copyright  2007-2014 PrestaShop SA
*  @license    http://opensource.org/licenses/afl-3.0.php  Academic Free License (AFL 3.0)
*  International Registered Trademark & Property of PrestaShop SA
*}
<!DOCTYPE HTML>
<!--[if lt IE 7]> <html class="no-js lt-ie9 lt-ie8 lt-ie7 " lang="{$lang_iso}"><![endif]-->
<!--[if IE 7]><html class="no-js lt-ie9 lt-ie8 ie7" lang="{$lang_iso}"><![endif]-->
<!--[if IE 8]><html class="no-js lt-ie9 ie8" lang="{$lang_iso}"><![endif]-->
<!--[if gt IE 8]> <html class="no-js ie9" lang="{$lang_iso}"><![endif]-->
<html lang="{$lang_iso}">
    <head>
        <meta charset="utf-8" />
        <title>{$meta_title|escape:'html':'UTF-8'}</title>
{if isset($meta_description) AND $meta_description}
        <meta name="description" content="{$meta_description|escape:'html':'UTF-8'}" />
{/if}
{if isset($meta_keywords) AND $meta_keywords}
        <meta name="keywords" content="{$meta_keywords|escape:'html':'UTF-8'}" />
{/if}
        <meta name="generator" content="PrestaShop" />
        <meta name="robots" content="{if isset($nobots)}no{/if}index,{if isset($nofollow) && $nofollow}no{/if}follow" />
        <meta name="viewport" content="width=device-width, minimum-scale=0.25, maximum-scale=1.6, initial-scale=1.0" />
        <meta name="apple-mobile-web-app-capable" content="yes" />
        <link rel="icon" type="image/vnd.microsoft.icon" href="{$favicon_url}?{$img_update_time}" />
        <link rel="shortcut icon" type="image/x-icon" href="{$favicon_url}?{$img_update_time}" />
{if isset($css_files)}
    {foreach from=$css_files key=css_uri item=media}
        <link rel="stylesheet" href="{$css_uri|escape:'html':'UTF-8'}" type="text/css" media="{$media|escape:'html':'UTF-8'}" />
    {/foreach}
{/if}
{if isset($js_defer) && !$js_defer && isset($js_files) && isset($js_def)}
    {$js_def}
    {foreach from=$js_files item=js_uri}
    <script type="text/javascript" src="{$js_uri|escape:'html':'UTF-8'}"></script>
    {/foreach}
{/if}
        {$HOOK_HEADER}

        <!--[if IE 8]>
        <script src="https://oss.maxcdn.com/libs/html5shiv/3.7.0/html5shiv.js"></script>
        <script src="https://oss.maxcdn.com/libs/respond.js/1.3.0/respond.min.js"></script>
        <![endif]-->
    </head>
    <body{if isset($page_name)} id="{$page_name|escape:'html':'UTF-8'}"{/if} class="{if isset($page_name)}{$page_name|escape:'html':'UTF-8'}{/if}{if isset($body_classes) && $body_classes|@count} {implode value=$body_classes separator=' '}{/if}{if $hide_left_column} hide-left-column{/if}{if $hide_right_column} hide-right-column{/if}{if isset($content_only) && $content_only} content_only{/if} lang_{$lang_iso}">
    {if !isset($content_only) || !$content_only}
        {if isset($restricted_country_mode) && $restricted_country_mode}
            <div id="restricted-country">
                <p>{l s='You cannot place a new order from your country.'} <span class="bold">{$geolocation_country|escape:'html':'UTF-8'}</span></p>
            </div>
        {/if}
        <div id="page">
            <div class="header-container">
                <header id="header">
                    <div class="banner">
                        <div class="container">
                            <div class="row">
                                {hook h="displayBanner"}
                            </div>
                        </div>
                    </div>
                    <div class="nav">
                        <div class="container">
                            <div class="row">
                                <nav>{hook h="displayNav"}</nav>
                            </div>
                        </div>
                    </div>
                    <div>
                        <div class="container">
                            <div class="row">
                                <div id="header_logo">
                                    <a href="{$base_dir}" title="{$shop_name|escape:'html':'UTF-8'}">
                                        <img class="logo img-responsive" src="{$logo_url}" alt="{$shop_name|escape:'html':'UTF-8'}"{if isset($logo_image_width) && $logo_image_width} width="{$logo_image_width}"{/if}{if isset($logo_image_height) && $logo_image_height} height="{$logo_image_height}"{/if}/>
                                    </a>
                                </div>
                                {if isset($HOOK_TOP)}{$HOOK_TOP}{/if}
                            </div>
                        </div>
                    </div>
                </header>
            </div>
            <div class="columns-container">
                <div id="columns" class="container">
                    {if $page_name !='index' && $page_name !='pagenotfound'}
                        {include file="$tpl_dir./breadcrumb.tpl"}
                    {/if}
                    <div id="slider_row" class="row">
                        <div id="top_column" class="center_column col-xs-12 col-sm-12">{hook h="displayTopColumn"}</div>
                    </div>
                    <div class="row">
                        {if isset($left_column_size) && !empty($left_column_size)}
                        <div id="left_column" class="column col-xs-12 col-sm-{$left_column_size|intval}">{$HOOK_LEFT_COLUMN}</div>
                        {/if}
                        {if isset($left_column_size) && isset($right_column_size)}{assign var='cols' value=(12 - $left_column_size - $right_column_size)}{else}{assign var='cols' value=12}{/if}
                        <div id="center_column" class="center_column col-xs-12 col-sm-{$cols|intval}">
    {/if}
Edited by selectshop.at (see edit history)
Link to comment
Share on other sites

  • 2 weeks later...
  • 1 year later...
boa tarde algum pode me ajudar tenho este arquivo header.tpl e e estou precisando inserir o codigo do anaytcs , quando insiro o codigo dentre das tag head o site sai for do ar . 

 

tentei nos doois </head> e dar erro

 

onde devo inserir dentro deste arquivo ??? 

aguardo resposta 

 

 

 

 

 

 

 

 

{*

 

* 2007-2013 PrestaShop

 

*

 

* NOTICE OF LICENSE

 

*

 

* This source file is subject to the Academic Free License (AFL 3.0)

 

* that is bundled with this package in the file LICENSE.txt.

 

* It is also available through the world-wide-web at this URL:

 


 

* If you did not receive a copy of the license and are unable to

 

* obtain it through the world-wide-web, please send an email

 

* to [email protected] so we can send you a copy immediately.

 

*

 

* DISCLAIMER

 

*

 

* Do not edit or add to this file if you wish to upgrade PrestaShop to newer

 

* versions in the future. If you wish to customize PrestaShop for your

 

* needs please refer to http://www.prestashop.com for more information.

 

*

 

*  @author PrestaShop SA <[email protected]>

 

*  @copyright  2007-2013 PrestaShop SA

 

*  @license    http://opensource.org/licenses/afl-3.0.php  Academic Free License (AFL 3.0)

 

*  International Registered Trademark & Property of PrestaShop SA

 

*}

 

<!DOCTYPE HTML>

 

<!--[if lt IE 7]> <html class="no-js lt-ie9 lt-ie8 lt-ie7 " lang="{$lang_iso}"> <![endif]-->

 

<!--[if IE 7]><html class="no-js lt-ie9 lt-ie8 ie7" lang="{$lang_iso}"> <![endif]-->

 

<!--[if IE 8]><html class="no-js lt-ie9 ie8" lang="{$lang_iso}"> <![endif]-->

 

<!--[if gt IE 8]> <html class="no-js ie9" lang="{$lang_iso}"> <![endif]-->

 

<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="{$lang_iso}">

 

<head>

 

<meta charset="utf-8">

 

<meta http-equiv="Content-Type" content="text/html; charset=utf-8">

 

<title>{$meta_title|escape:'htmlall':'UTF-8'}</title>

 

{if isset($meta_description) AND $meta_description}

 

<meta name="description" content="{$meta_description|escape:html:'UTF-8'}" />

 

{/if}

 

{if isset($meta_keywords) AND $meta_keywords}

 

<meta name="keywords" content="{$meta_keywords|escape:html:'UTF-8'}" />

 

{/if}

 

<meta name="generator" content="PrestaShop" />

 

    <meta name="robots" content="{if isset($nobots)}no{/if}index,{if isset($nofollow) && $nofollow}no{/if}follow" />

 

<meta name="author" content="Prestashop 1.5">   

 

    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1" />    

 

<script>

 

    if (navigator.userAgent.match(/Android/i)) {

 

        var viewport = document.querySelector("meta[name=viewport]");

 

        viewport.setAttribute('content', 'initial-scale=1.0,maximum-scale=1.0,user-scalable=no,width=device-width,height=device-height,target-densitydpi=low-dpi');

 

    }

 

if(navigator.userAgent.match(/Android/i)){

 

    window.scrollTo(0,1);

 

 }

 

</script>     <meta name="apple-mobile-web-app-capable" content="yes" /> 

 

<link rel="icon" type="image/vnd.microsoft.icon" href="{$favicon_url}?{$img_update_time}" />

 

<link rel="shortcut icon" type="image/x-icon" href="{$favicon_url}?{$img_update_time}" />

 

<script type="text/javascript">

 

var baseDir = '{$content_dir}';

 

var baseUri = '{$base_uri}';

 

var static_token = '{$static_token}';

 

var token = '{$token}';

 

var priceDisplayPrecision = ' {$priceDisplayPrecision*$currency->decimals}';

 

var priceDisplayMethod = '{$priceDisplay}';

 

var roundMode = '{$roundMode}';

 

</script>

 

<link href="{$css_dir}normalize.css" rel="stylesheet" type="text/css" media="all" />

 

<link href="{$css_dir}bootstrap.css" rel="stylesheet" type="text/css" media="all" />

 

<link href="{$css_dir}bootstrap-responsive.css" rel="stylesheet" type="text/css" media="all" />

 


 


 

<link href="{$css_dir}font.css" rel="stylesheet" type="text/css" media="all" />

 

{if isset($css_files)}

 

{foreach from=$css_files key=css_uri item=media}

 

<link href="{$css_uri}" rel="stylesheet" type="text/css" media="{$media}" />

 

{/foreach}

 

{/if}   

 

<link href="{$css_dir}320.css" rel="stylesheet" type="text/css" media="all" />

 

<link href="{$css_dir}480.css" rel="stylesheet" type="text/css" media="all" />

 

<link href="{$css_dir}768.css" rel="stylesheet" type="text/css" media="all" />

 

{if isset($js_files)}

 

{foreach from=$js_files item=js_uri}

 

<script type="text/javascript" src="{$js_uri}"></script>

 

{/foreach}

 

{/if}

 

<script src="{$js_dir}/source/bootstrap.js"></script>

 

<script src="{$js_dir}/source/plugins.js"></script>

 

<script src="{$js_dir}/source/footable.js"></script>

 

<script src="{$js_dir}/source/jquery.core-ui-select.js"></script> 

 

<script src="{$js_dir}/source/jquery.scrollpane.js"></script>

 

<script src="{$js_dir}/source/jquery.uniform.js"></script> 

 

<script src="{$js_dir}/source/jquery.mousewheel.js"></script>

 

<script src="{$js_dir}/source/mainscript.js"></script>

 

<script src="{$js_dir}/source/modernizr-2.5.3.min.js"></script>

 

{$HOOK_HEADER}

 

<script src="{$js_dir}/source/jquery.carouFredSel-6.2.1.js"></script>

 

<script src="{$js_dir}/source/jquery.touchSwipe.min.js"></script>

 

 

 

</head>

 

    <!--[if lt IE 9]><div style='clear:both;height:59px;padding:0 15px 0 15px;position:relative;z-index:10000;text-align:center;'><a href="http://www.microsoft.com/windows/internet-explorer/default.aspx?ocid=ie6_countdown_bannercode"><img src="http://storage.ie6countdown.com/assets/100/images/banners/warning_bar_0000_us.jpg" border="0" height="42" width="820" alt="You are using an outdated browser. For a faster, safer browsing experience, upgrade for free today." /></a></div><![endif]-->

 

<body {if isset($page_name)}id="{$page_name|escape:'htmlall':'UTF-8'}"{/if} class="{if $hide_left_column}hide-left-column{/if} {if $hide_right_column}hide-right-column{/if} {if $content_only} content_only {/if}">

 

    {if !$content_only}

 

{if isset($restricted_country_mode) && $restricted_country_mode}

 

<div id="restricted-country">

 

  <p>{l s='You cannot place a new order from your country.'} <span class="bold">{$geolocation_country}</span></p>

 

</div>

 

{/if}

 

<div id="wrapp">

 

       <div id="wrapp_2">

 

          <header id="header" class="container ">

 

            <div  id="header-inner" >

 

        <a id="header_logo" href="{$base_dir}" title="{$shop_name|escape:'htmlall':'UTF-8'}">

 

                     <img class="logo" src="{$logo_url}" alt="{$shop_name|escape:'htmlall':'UTF-8'}" {if $logo_image_width}width="{$logo_image_width}"{/if} {if $logo_image_height}height="{$logo_image_height}" {/if} />

 

                  </a>

 

          {$HOOK_TOP}

 

         </div>

<script>

  (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){

  (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),

  m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)

  })(window,document,'script','https://www.google-analytics.com/analytics.js,ga');

 

  ga('create', 'UA-39300803-1', 'auto');

  ga('send', 'pageview');

 

</script>

 

 

           </header>

 

<div id="columns" class="container ">

 

                 <div class="row ">  

 

                 <div class="loader_page">    

 

                                <aside id="left_column"  class="span3 column" style=" display:none">

 

                                   {$HOOK_LEFT_COLUMN}

 

                                </aside>   

 

                         <div id="center_column" class="center_column {if $page_name == 'index'}span12 {else}span9 {/if}clearfix">

 

{/if} 

Link to comment
Share on other sites

Boa  noite a todos gostaria de uma ajuda. 

Estou tentendo instalar o codigo do adwords remarketing no Footer conforme fui orientando mas dar erro .

 

O googel fala que 

Metadata
Code Snippet
Conversion ID
990279403
Conversion Label
bwv9CMWjhwUQ6-2Z2AM
Conversion Value
1.00
Where to optimize
 
No HTTP response detected
 
Missing line breaks may cause issues.
 
 
 

 

 

 Estou enviando ao arquivo abaixo quem poder me ajudar o que fiz de errado que nao esta dando certo ??? 

{** 2007-2013 PrestaShop** NOTICE OF LICENSE** This source file is subject to the Academic Free License (AFL 3.0)* that is bundled with this package in the file LICENSE.txt.* It is also available through the world-wide-web at this URL:* http://opensource.org/licenses/afl-3.0.php* If you did not receive a copy of the license and are unable to* obtain it through the world-wide-web, please send an email* to [email protected] so we can send you a copy immediately.** DISCLAIMER** Do not edit or add to this file if you wish to upgrade PrestaShop to newer* versions in the future. If you wish to customize PrestaShop for your* needs please refer to http://www.prestashop.com for more information.**  @author PrestaShop SA <[email protected]>*  @copyright  2007-2013 PrestaShop SA*  @license    http://opensource.org/licenses/afl-3.0.php  Academic Free License (AFL 3.0)*  International Registered Trademark & Property of PrestaShop SA*} {if !$content_only} </div><!-- Right --><aside id="right_column"  class="span3 column right_home">                 {$HOOK_RIGHT_COLUMN}</aside></div> </div>     </div><div class="footer-bg-mob">    <footer class="container ">       <div class="row modules">           {$HOOK_FOOTER}      </div>    </footer> </div>           </div> </div>  {/if}<script type="text/javascript">
/* <![CDATA[ */
var google_conversion_id = 990279403;
var google_conversion_language = "pt";
var google_conversion_format = "2";
var google_conversion_color = "ffffff";
var google_conversion_label = "bwv9CMWjhwUQ6-2Z2AM";
var google_conversion_value = 1.00;
var google_conversion_currency = "BRL";
var google_remarketing_only = false;
/* ]]> */
</script>
<script type="text/javascript" src="//www.googleadservices.com/pagead/conversion.js">
</script>
<noscript>
<div style="display:inline;">
<img height="1" width="1" style="border-style:none;" alt="" src="//www.googleadservices.com/pagead/conversion/990279403/?value=1.00&currency_code=BRL&label=bwv9CMWjhwUQ6-2Z2AM&guid=ON&script=0"/>
</div>
</noscript>
</body></html>
 
 
 
 
Segundo problema e a respeito inserir o codigo do analytics no header,tpl tambe dar erro , quando insiro o codigo e envio a pagina sai fora do ar veja o codigo abaixo :: 
 
{*
 
* 2007-2013 PrestaShop
 
*
 
* NOTICE OF LICENSE
 
*
 
* This source file is subject to the Academic Free License (AFL 3.0)
 
* that is bundled with this package in the file LICENSE.txt.
 
* It is also available through the world-wide-web at this URL:
 
 
* If you did not receive a copy of the license and are unable to
 
* obtain it through the world-wide-web, please send an email
 
* to [email protected] so we can send you a copy immediately.
 
*
 
* DISCLAIMER
 
*
 
* Do not edit or add to this file if you wish to upgrade PrestaShop to newer
 
* versions in the future. If you wish to customize PrestaShop for your
 
* needs please refer to http://www.prestashop.com for more information.
 
*
 
*  @author PrestaShop SA <[email protected]>
 
*  @copyright  2007-2013 PrestaShop SA
 
*  @license    http://opensource.org/licenses/afl-3.0.php  Academic Free License (AFL 3.0)
 
*  International Registered Trademark & Property of PrestaShop SA
 
*}
 
<!DOCTYPE HTML>
 
<!--[if lt IE 7]> <html class="no-js lt-ie9 lt-ie8 lt-ie7 " lang="{$lang_iso}"> <![endif]-->
 
<!--[if IE 7]><html class="no-js lt-ie9 lt-ie8 ie7" lang="{$lang_iso}"> <![endif]-->
 
<!--[if IE 8]><html class="no-js lt-ie9 ie8" lang="{$lang_iso}"> <![endif]-->
 
<!--[if gt IE 8]> <html class="no-js ie9" lang="{$lang_iso}"> <![endif]-->
 
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="{$lang_iso}">
 
<head>
 
<meta charset="utf-8">
 
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
 
<title>{$meta_title|escape:'htmlall':'UTF-8'}</title>
 
{if isset($meta_description) AND $meta_description}
 
<meta name="description" content="{$meta_description|escape:html:'UTF-8'}" />
 
{/if}
 
{if isset($meta_keywords) AND $meta_keywords}
 
<meta name="keywords" content="{$meta_keywords|escape:html:'UTF-8'}" />
 
{/if}
 
<meta name="generator" content="PrestaShop" />
 
    <meta name="robots" content="{if isset($nobots)}no{/if}index,{if isset($nofollow) && $nofollow}no{/if}follow" />
 
<meta name="author" content="Prestashop 1.5">   
 
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1" />    
 
<script>
 
    if (navigator.userAgent.match(/Android/i)) {
 
        var viewport = document.querySelector("meta[name=viewport]");
 
        viewport.setAttribute('content', 'initial-scale=1.0,maximum-scale=1.0,user-scalable=no,width=device-width,height=device-height,target-densitydpi=low-dpi');
 
    }
 
if(navigator.userAgent.match(/Android/i)){
 
    window.scrollTo(0,1);
 
 }
 
</script>     <meta name="apple-mobile-web-app-capable" content="yes" /> 
 
<link rel="icon" type="image/vnd.microsoft.icon" href="{$favicon_url}?{$img_update_time}" />
 
<link rel="shortcut icon" type="image/x-icon" href="{$favicon_url}?{$img_update_time}" />
 
<script type="text/javascript">
 
var baseDir = '{$content_dir}';
 
var baseUri = '{$base_uri}';
 
var static_token = '{$static_token}';
 
var token = '{$token}';
 
var priceDisplayPrecision = ' {$priceDisplayPrecision*$currency->decimals}';
 
var priceDisplayMethod = '{$priceDisplay}';
 
var roundMode = '{$roundMode}';
 
</script>
 
<link href="{$css_dir}normalize.css" rel="stylesheet" type="text/css" media="all" />
 
<link href="{$css_dir}bootstrap.css" rel="stylesheet" type="text/css" media="all" />
 
<link href="{$css_dir}bootstrap-responsive.css" rel="stylesheet" type="text/css" media="all" />
 
 
 
<link href="{$css_dir}font.css" rel="stylesheet" type="text/css" media="all" />
 
{if isset($css_files)}
 
{foreach from=$css_files key=css_uri item=media}
 
<link href="{$css_uri}" rel="stylesheet" type="text/css" media="{$media}" />
 
{/foreach}
 
{/if}   
 
<link href="{$css_dir}320.css" rel="stylesheet" type="text/css" media="all" />
 
<link href="{$css_dir}480.css" rel="stylesheet" type="text/css" media="all" />
 
<link href="{$css_dir}768.css" rel="stylesheet" type="text/css" media="all" />
 
{if isset($js_files)}
 
{foreach from=$js_files item=js_uri}
 
<script type="text/javascript" src="{$js_uri}"></script>
 
{/foreach}
 
{/if}
 
<script src="{$js_dir}/source/bootstrap.js"></script>
 
<script src="{$js_dir}/source/plugins.js"></script>
 
<script src="{$js_dir}/source/footable.js"></script>
 
<script src="{$js_dir}/source/jquery.core-ui-select.js"></script> 
 
<script src="{$js_dir}/source/jquery.scrollpane.js"></script>
 
<script src="{$js_dir}/source/jquery.uniform.js"></script> 
 
<script src="{$js_dir}/source/jquery.mousewheel.js"></script>
 
<script src="{$js_dir}/source/mainscript.js"></script>
 
<script src="{$js_dir}/source/modernizr-2.5.3.min.js"></script>
 
{$HOOK_HEADER}
 
<script src="{$js_dir}/source/jquery.carouFredSel-6.2.1.js"></script>
 
<script src="{$js_dir}/source/jquery.touchSwipe.min.js"></script>
 
 
 
</head>
 
    <!--[if lt IE 9]><div style='clear:both;height:59px;padding:0 15px 0 15px;position:relative;z-index:10000;text-align:center;'><a href="http://www.microsoft.com/windows/internet-explorer/default.aspx?ocid=ie6_countdown_bannercode"><img src="http://storage.ie6countdown.com/assets/100/images/banners/warning_bar_0000_us.jpg" border="0" height="42" width="820" alt="You are using an outdated browser. For a faster, safer browsing experience, upgrade for free today." /></a></div><![endif]-->
 
<body {if isset($page_name)}id="{$page_name|escape:'htmlall':'UTF-8'}"{/if} class="{if $hide_left_column}hide-left-column{/if} {if $hide_right_column}hide-right-column{/if} {if $content_only} content_only {/if}">
 
    {if !$content_only}
 
{if isset($restricted_country_mode) && $restricted_country_mode}
 
<div id="restricted-country">
 
  <p>{l s='You cannot place a new order from your country.'} <span class="bold">{$geolocation_country}</span></p>
 
</div>
 
{/if}
 
<div id="wrapp">
 
       <div id="wrapp_2">
 
          <header id="header" class="container ">
 
            <div  id="header-inner" >
 
        <a id="header_logo" href="{$base_dir}" title="{$shop_name|escape:'htmlall':'UTF-8'}">
 
                     <img class="logo" src="{$logo_url}" alt="{$shop_name|escape:'htmlall':'UTF-8'}" {if $logo_image_width}width="{$logo_image_width}"{/if} {if $logo_image_height}height="{$logo_image_height}" {/if} />
 
                  </a>
 
          {$HOOK_TOP}
 
         </div>
<script>
  (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
  (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
  m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
  })(window,document,'script','https://www.google-analytics.com/analytics.js,ga');
 
  ga('create', 'UA-39300803-1', 'auto');
  ga('send', 'pageview');
 
</script>
 
 
           </header>
 
<div id="columns" class="container ">
 
                 <div class="row ">  
 
                 <div class="loader_page">    
 
                                <aside id="left_column"  class="span3 column" style=" display:none">
 
                                   {$HOOK_LEFT_COLUMN}
 
                                </aside>   
 
                         <div id="center_column" class="center_column {if $page_name == 'index'}span12 {else}span9 {/if}clearfix">
 
{/if} 
 
 
 
 
Aguardo uma resposta quem pode me ajudar resolver isto,
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...