kostasnw Posted May 16, 2014 Share Posted May 16, 2014 Hello, From what I understand prestashop now defers all javascript to the bottom of the page even if the module is hooked at Header. But Google proposes that we should load the analytics library at the top of the page because the sooner it loads it is less probable to lose data. Is it possible to somehow override this behaviour only for google analytics? Link to comment Share on other sites More sharing options...
vekia Posted May 16, 2014 Share Posted May 16, 2014 add code manually to header.tpl file, as far as i know it should work Link to comment Share on other sites More sharing options...
eliteitsolutions.ie Posted May 16, 2014 Share Posted May 16, 2014 On 5/16/2014 at 10:48 AM, kostasnw said: Hello, From what I understand prestashop now defers all javascript to the bottom of the page even if the module is hooked at Header. But Google proposes that we should load the analytics library at the top of the page because the sooner it loads it is less probable to lose data. Is it possible to somehow override this behaviour only for google analytics? The easiest way I have found to do it was by loading your username in through the module called "Google Analytics" (Not Google Analytics API) All you do is enter in your UA number which can be found on your Google Analytics account. Which seems to be working perfect for me. How ever to link it to your prestashop dashboard is causing issue, which i have seen all over PS forum. Doesn't seem to be a fix for it at the moment. But you can just log in to your Google Analytics account and view it from there with live stats Link to comment Share on other sites More sharing options...
kostasnw Posted May 17, 2014 Author Share Posted May 17, 2014 Hello Benjy. I am using google analytics module (ganalytics) not Google Analytics API Thanks for the input vekia. this won't work either. seems that every piece of javascript code that passes through the smarty compiler gets moved to the bottom of the page. (even if CCC is turned completely off) 1 Link to comment Share on other sites More sharing options...
Recommended Posts