move analytics to separate file, to avoid being included multiple times