jbeltran Posted November 25, 2016 Share Posted November 25, 2016 Hello, in the previous version there was a free module where to insert only the UA. In this version, there is no module yet. Where is the best place and how to insert the google code? Thank you. Link to comment Share on other sites More sharing options...
jbeltran Posted November 28, 2016 Author Share Posted November 28, 2016 Hello, still don't know where to add the SCRIPT from Google analytics for this version. I've tried to added it to head.tpl and it give me an error stoping the cart. Please, need help. Thank you. Link to comment Share on other sites More sharing options...
jbeltran Posted December 10, 2016 Author Share Posted December 10, 2016 (edited) Sharing where I've found where to add it /httpdocs/themes/classic/templates/layouts/layout-both-columns.tpl Hope it helps Edited December 10, 2016 by jbeltran (see edit history) 1 Link to comment Share on other sites More sharing options...
bynovita Posted January 6, 2017 Share Posted January 6, 2017 1.7.0.3 help Link to comment Share on other sites More sharing options...
GreddyMR2 Posted February 17, 2017 Share Posted February 17, 2017 Sharing where I've found where to add it /httpdocs/themes/classic/templates/layouts/layout-both-columns.tpl Hope it helps Hi, doesn't work for me. When I add it, page shows 500 error... Any ideas? Link to comment Share on other sites More sharing options...
rocky Posted February 18, 2017 Share Posted February 18, 2017 Did you add {literal} before the script code and {/literal} after it? That will prevent Smarty generating an error. 1 Link to comment Share on other sites More sharing options...
GreddyMR2 Posted February 18, 2017 Share Posted February 18, 2017 Did you add {literal} before the script code and {/literal} after it? That will prevent Smarty generating an error. I didn't... Have no idea about programming, just able to copy paste the code Works perfectly now, thanks! Link to comment Share on other sites More sharing options...
Malemi Posted February 22, 2017 Share Posted February 22, 2017 Opened an "improvement" report here, for anyone interested http://forge.prestashop.com/browse/BOOM-2378 It will be fixed in 1.7.1.1 1 Link to comment Share on other sites More sharing options...
Leonlt Posted February 23, 2017 Share Posted February 23, 2017 Hello, in the previous version there was a free module where to insert only the UA. In this version, there is no module yet. Where is the best place and how to insert the google code? Thank you. suitable module from the previous version Link to comment Share on other sites More sharing options...
Ornot Posted May 10, 2017 Share Posted May 10, 2017 Hi, here on ghitub https://github.com/PrestaShop/ganalytics Ornot Link to comment Share on other sites More sharing options...
Gr Graphic Designer Posted August 21, 2017 Share Posted August 21, 2017 / themes /YOUR THEME / templates / _partials / head.tpl insert to head.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','https://www.google-analytics.com/analytics.js,ga'); ga('create', 'YOUR SCRIPT-1', 'auto'); ga('send', 'pageview');</script>{/literal} WORKING 100% 2 Link to comment Share on other sites More sharing options...
w_t Posted December 3, 2018 Share Posted December 3, 2018 Scusatemi, io ho la versione 1.7.4.4 ma nel file head.tpl non c'è: {literal} ... {/literal} questo è il mio head.tpl: {block name='head_charset'} <meta charset="utf-8"> {/block} {block name='head_ie_compatibility'} <meta http-equiv="x-ua-compatible" content="ie=edge"> {/block} {block name='head_seo'} <title>{block name='head_seo_title'}{$page.meta.title}{/block}</title> <meta name="description" content="{block name='head_seo_description'}{$page.meta.description}{/block}"> <meta name="keywords" content="{block name='head_seo_keywords'}{$page.meta.keywords}{/block}"> {if $page.meta.robots !== 'index'} <meta name="robots" content="{$page.meta.robots}"> {/if} {if $page.canonical} <link rel="canonical" href="{$page.canonical}"> {/if} {block name='head_hreflang'} {foreach from=$urls.alternative_langs item=pageUrl key=code} <link rel="alternate" href="{$pageUrl}" hreflang="{$code}"> {/foreach} {/block} {/block} {block name='head_viewport'} <meta name="viewport" content="width=device-width, initial-scale=1"> {/block} {block name='head_icons'} <link rel="icon" type="image/vnd.microsoft.icon" href="{$shop.favicon}?{$shop.favicon_update_time}"> <link rel="shortcut icon" type="image/x-icon" href="{$shop.favicon}?{$shop.favicon_update_time}"> {/block} {block name='stylesheets'} {include file="_partials/stylesheets.tpl" stylesheets=$stylesheets} {/block} {block name='javascript_head'} {include file="_partials/javascript.tpl" javascript=$javascript.head vars=$js_custom_vars} {/block} {block name='hook_header'} {$HOOK_HEADER nofilter} {/block} {block name='hook_extra'}{/block} ho provato ad inserirlo su: {block name='hook_extra'} *** Google Analytics *** {/block} Ma non funziona, non da errore ma non funziona. Dato che vorrei inserire pure Yandex Metrica, devo per forza trovare il sistema giusto, manuale!! Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now