I am trying to reduce page code by have ga.js in an external file and calling it. Problem is, it's not working. Is there any special tricks to getting Analytics working in an external Javascript file? <script src="ga.js"></script> </body> Code (markup): Then the external file is all the Javascript, with the <script></script> tags stripped of course.
i dont think so its possible to call external java script for Google analytics tracking. its possible in case if you are using wordpress as cms on your website. bz there are some plug ins avail for GA tracking. for reducing code size of website, now you can use asynchronous tracking for speeding up your website. how to use it ? see below link this will help you. http://analytics.blogspot.com/2009/12/google-analytics-launches-asynchronous.html