Switch to Async loading of google analytics script
Better Error Handling in javascript