ga: move javascript error tracking

Move the javascript error tracking to the ga.js file.