bertismus Posted February 16, 2015 Share Posted February 16, 2015 The Google Analytics tracking snippet needs to be inside the <head></head> tags to get accurate reporting. but to keep the load time of the site low, it is best practice to move all JS to the bottom of the page. PS. 1.6 has an option in Admin (advanced parameters -> performance) to "Move Javascript to the end" Does anyone know how to keep that option enabled, but also keep the GA Tracking Code from moving to the bottom? Link to comment Share on other sites More sharing options...
Mickeel Posted March 5, 2015 Share Posted March 5, 2015 Any update on this? Link to comment Share on other sites More sharing options...
bellini13 Posted March 5, 2015 Share Posted March 5, 2015 I guess I would suggest removing the module, and then just hard coding the required javascript inside the header.tpl file of your theme. Link to comment Share on other sites More sharing options...
Mickeel Posted March 6, 2015 Share Posted March 6, 2015 I've tried that, and now I know why we dont need to do that. Google Asynchronous tracking automatically load the javascript after the page is loaded, no matter where we put the analytic js. So don't mind about moving it to the <head>. Thanks for replying btw Link to comment Share on other sites More sharing options...
Hobbes Posted September 15, 2015 Share Posted September 15, 2015 Hello, I just found this solution as i was looking to keep Google Tag Manager script just after the first <body>. 1 - Create a Media.php override that'll say to not move the scripts you want (details in the link below) 2 - insert data-keepinline="true" in the scripts you don't want to be moved All details here (in french) : http://www.prestarocket.com/blog/prestashop-google-tag-manager/ Link to comment Share on other sites More sharing options...
Recommended Posts