javascript for analytics