Extract analytics to separate file