anndemeyer Posted June 3, 2014 Share Posted June 3, 2014 Hello, I have a problem installing statcounter code in prestashop 1.6. I pasted the statcounter code in footer.tpl or header.tpl. However as prestashop is reordening inline javascript to the bottom of the page, the <scripts> and <noscripts> code blocks does not seem to be in the right order anymore for statcounter to function propperly. Is there any work around? Ann Link to comment Share on other sites More sharing options...
sarah0173 Posted June 24, 2014 Share Posted June 24, 2014 I have the same problem, did you solve this issue ? Thank you Link to comment Share on other sites More sharing options...
anndemeyer Posted June 24, 2014 Author Share Posted June 24, 2014 No, still wailting... Link to comment Share on other sites More sharing options...
sarah0173 Posted June 25, 2014 Share Posted June 25, 2014 Solved ! You need to override Media.php : create a new document Media.phpwith some code that i can't post (file attached) And then, save the file in override/classes Next, add the code data-keepinline="true" in your scriptExemple : <script type="text/javascript" data-keepinline="true"> // this script will remain here when rendered alert( "hello!" ); </script> <script type="text/javascript"> // this script will be forced to the bottom of the page alert( "hello again!" ); </script> I hope it will work for you ! Media.php 1 Link to comment Share on other sites More sharing options...
GS VISION Posted August 12, 2014 Share Posted August 12, 2014 After adding the override and data attr to the code it disappeared. Removing it brought it back Link to comment Share on other sites More sharing options...
Recommended Posts