agtatsi Posted July 22, 2014 Share Posted July 22, 2014 Which is preferable to paste google analytics code in footer.tpl or in header.tpl??? Link to comment Share on other sites More sharing options...
vekia Posted July 22, 2014 Share Posted July 22, 2014 in my opinion in header.tpl as google suggests (to place code in header section) 1 Link to comment Share on other sites More sharing options...
agtatsi Posted July 24, 2014 Author Share Posted July 24, 2014 I paste google analytics code in footer.tpl before the closing </body> tag and results haven't appeared in google analytics... How can I paste google analytics code in header.tpl??? Link to comment Share on other sites More sharing options...
vekia Posted July 24, 2014 Share Posted July 24, 2014 what code you paste? and also, what ps version you use? Link to comment Share on other sites More sharing options...
agtatsi Posted July 25, 2014 Author Share Posted July 25, 2014 I paste this code....<script> (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){ (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o), m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m) })(window,document,'script','//www.google-analytics.com/analytics.js','ga'); ga('create', 'UA-53026177-1', 'auto'); ga('send', 'pageview'); </script> I use 1.5 ps version..!!! 1 Link to comment Share on other sites More sharing options...
SiteWalls.com Posted July 26, 2014 Share Posted July 26, 2014 On header. I tried to paste in footer, when i went to verify my site in webmaster tools, it said there is no google analytics code. When i pasted it in header, my site successfully verified using webmaster tools owner. Well, there are many alternatives in verifying ownership in webmaster tools, but the failure to read analytic codes seemed that it is better to put in header. 1 Link to comment Share on other sites More sharing options...
agtatsi Posted July 26, 2014 Author Share Posted July 26, 2014 (edited) ok..thank you.!One more question in which point in header.tpl file I should paste the code from google analytics ???? For example before the closing tag </head> or somewhere else????? Should I modify the code or I should let it as it given by google analytics????? Edited July 26, 2014 by agtatsi (see edit history) Link to comment Share on other sites More sharing options...
El Patron Posted July 26, 2014 Share Posted July 26, 2014 Which is preferable to paste google analytics code in footer.tpl or in header.tpl??? the best practice is to use the Google Analytics module, to find in modules search bar type analytics, you can then install and configure. This uses the correct hook to place the needed code in your header. Of course if you are using custom code then you would want to modify the header.tpl. 1 Link to comment Share on other sites More sharing options...
agtatsi Posted July 27, 2014 Author Share Posted July 27, 2014 This means that I should install the google analytics module in case I paste the code from google analytics in header.tpl file..????? Link to comment Share on other sites More sharing options...
El Patron Posted July 27, 2014 Share Posted July 27, 2014 This means that I should install the google analytics module in case I paste the code from google analytics in header.tpl file..????? using module you would not need to paste code in header.tpl 1 Link to comment Share on other sites More sharing options...
agtatsi Posted July 27, 2014 Author Share Posted July 27, 2014 I paste the code from google analytics in header.tpl and results haven't appeared........Probably I have made something wrong..!! Link to comment Share on other sites More sharing options...
El Patron Posted July 27, 2014 Share Posted July 27, 2014 Hi, do not modify header.tpl install analtyics module, configure and enter your UI then your google analytics code will be presented for each page. 1 Link to comment Share on other sites More sharing options...
agtatsi Posted July 27, 2014 Author Share Posted July 27, 2014 Thank you.! Then should I do something else???? The results will be appeared 24 hours later??? Link to comment Share on other sites More sharing options...
El Patron Posted July 27, 2014 Share Posted July 27, 2014 I don't think there is any 'wait' time, once installed and configured simply visit your google analtyics, use 'real time-->overview', then in another browser visit your shop. then you should see your visit in the anaytics real time overview screen. 1 Link to comment Share on other sites More sharing options...
SiteWalls.com Posted July 27, 2014 Share Posted July 27, 2014 Thank you.! Then should I do something else???? The results will be appeared 24 hours later??? results will not come that instant on the first placement.. AFAIK 1 Link to comment Share on other sites More sharing options...
habib002 Posted August 18, 2014 Share Posted August 18, 2014 Many thanks to the members of this forum I know huge information about google analytics tracking that is more effective for me and my websites. 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