Removed console.log() comments and added analytics