Move analytics to script.js