add analytics into a js file