...

View Full Version : javascript code into a js file and import into html



gerble1000
07-03-2012, 11:10 PM
i need a way of putting google analytics code into a js file and importing it into the browser. so i dont have to keep editing the index for all clients using the same site template.
i thought <script src="analytics.js"></script> would do this.
but it does not seem to work.
is there an easy way to achieve this

felgall
07-03-2012, 11:56 PM
That script tag will work provided that you put the correct JavaScript code in the analytics.js file.

gerble1000
07-04-2012, 12:08 AM
ok i will have a play tomorow and see how i get on
chears

gerble1000
07-04-2012, 05:20 PM
i got it working chears



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum