I am about to use GA, but I do not want to hardcode tracking code. I prefer saving this code with other configurations (in a file, database or other), and pass it to the script. Let say that I have some Java bean with application scope that in constructor – read tracking code from file and save it in one of the properties. Those properties are provide to a web module by getters and setters. I’m not good in javascript. How can I pass tracking code to the javascript? It surely will cause delay in runing this scritp, will not It cause any problems? What is the best solution?
Share
We’ve been using the google tracking code in external files and there is no problem with that. You can add it in an existing external javascript file and it will work fine.