Mister Denial Posted June 27, 2012 Share Posted June 27, 2012 (edited) Hello everyone, does anyone know if it is possible to set up Prestashop to use the asynchronous GA script rather than the classic one that loads in the header (and which often causes delay in page load)? I noticed that often when my website "freezes" for several seconds, the culprit is the analytics script - and on the Google forums I read that this is caused by using the legacy script, the new asynchronous script offered by Google fixes that problem. Does anyone know how to implement it? Because just using the standard analytics module that comes with PS won't do I guess. Thank you very much for your input and help! Dan Edited June 30, 2012 by Mister Denial (see edit history) Link to comment Share on other sites More sharing options...
sickz Posted June 27, 2012 Share Posted June 27, 2012 http://support.google.com/googleanalytics/bin/answer.py?hl=en&hlrm=de&answer=174090 there you go Link to comment Share on other sites More sharing options...
Mister Denial Posted June 29, 2012 Author Share Posted June 29, 2012 Hi sickz, thanks for your reply! What I actually wanted to know is how to best implement it in the PS end, because the analytics module will obviously not work unless modified. I guess it should be possible to copy-paste the code snippet into the header tag of the shop pages... ...but which file should I modify? header.tpl or php? Thanks for your input! I appreciate your time! Dan Link to comment Share on other sites More sharing options...
sickz Posted June 29, 2012 Share Posted June 29, 2012 Header.tpl You can Place it After the Last JavaScript Link to comment Share on other sites More sharing options...
Mister Denial Posted June 30, 2012 Author Share Posted June 30, 2012 Hi sickz! Thanks, works like a charm! TTFB impact is still about 0.2 seconds in asynchronous mode, but so far it looks like GA is not freezing the website anymore. Cheers! Dan 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