farbod.de Posted September 20, 2018 Share Posted September 20, 2018 hi, i have prestashop 1.6.1 when i want use <script> code in head or every madules i get this error : Forbidden You don't have permission to access /admin/index.php on this server. like this code : <!-- Hotjar Tracking Code for https://website/ --> <script> (function(h,o,t,j,a,r){ h.hj=h.hj||function(){(h.hj.q=h.hj.q||[]).push(arguments)}; h._hjSettings={hjid:313617,hjsv:6}; a=o.getElementsByTagName('head')[0]; r=o.createElement('script');r.async=1; r.src=t+h._hjSettings.hjid+j+h._hjSettings.hjsv; a.appendChild(r); })(window,document,'https://static.hotjar.com/c/hotjar-','.js?sv='); </script> how i can solve it? every code with script have this error in my website Link to comment Share on other sites More sharing options...
HanzCZ Posted September 20, 2018 Share Posted September 20, 2018 Hi, insert this code to header.tpl of your theme and script above must be inside {literal}{/literal}: {literal} <!-- Hotjar Tracking Code for https://website/ --> <script> (function(h,o,t,j,a,r){ h.hj=h.hj||function(){(h.hj.q=h.hj.q||[]).push(arguments)}; h._hjSettings={hjid:313617,hjsv:6}; a=o.getElementsByTagName('head')[0]; r=o.createElement('script');r.async=1; r.src=t+h._hjSettings.hjid+j+h._hjSettings.hjsv; a.appendChild(r); })(window,document,'https://static.hotjar.com/c/hotjar-','.js?sv='); </script> {/literal} Link to comment Share on other sites More sharing options...
HanzCZ Posted September 20, 2018 Share Posted September 20, 2018 Or you can use this module: https://addons.prestashop.com/en/analytics-statistics/22220-hotjar-all-in-one-webshop-analytics-and-feedback.html?pab=1& 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